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.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'layer_box.h') diff --git a/layer_box.h b/layer_box.h index 413ee07..1e4e5e3 100644 --- a/layer_box.h +++ b/layer_box.h @@ -7,18 +7,17 @@ #include "osc_server.h" #include "layer.h" -#define LayerBox_Info_Name "box" -#define LayerBox_Info_Types "iii" /* r, g, b */ +#define COLOR_TYPES "iii" /* r, g, b */ class LayerBox : public Layer { Sint16 x1, y1, x2, y2; Uint8 r, g, b, a; public: - static void register_layer() {} - LayerBox(const char *name, SDL_Rect geo, float opacity, SDL_Color color); + + static CtorInfo ctor_info; static Layer * ctor_osc(const char *name, SDL_Rect geo, float opacity, lo_arg **argv) { @@ -27,6 +26,7 @@ public: }; return new LayerBox(name, geo, opacity, color); } + ~LayerBox(); void frame(SDL_Surface *target); -- cgit v1.2.3