From 7110cea433b6aa4ce973b5c89c9ff9721e64ef55 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 26 Sep 2012 21:09:43 +0200 Subject: moved layer registration from OSCServer into main.cpp using new OSCServer::register_layer() method also use a static CtorInfo structure in every layer class instead of macros --- layer_box.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'layer_box.cpp') diff --git a/layer_box.cpp b/layer_box.cpp index a05e971..b720d5c 100644 --- a/layer_box.cpp +++ b/layer_box.cpp @@ -6,10 +6,12 @@ #include "osc_graphics.h" #include "layer_box.h" +Layer::CtorInfo LayerBox::ctor_info = {"box", COLOR_TYPES}; + LayerBox::LayerBox(const char *name, SDL_Rect geo, float opacity, SDL_Color color) : Layer(name) { - color_osc_id = register_method("color", "iii", + color_osc_id = register_method("color", COLOR_TYPES, (OSCServer::MethodHandlerCb)color_osc); LayerBox::geo(geo); -- cgit v1.2.3