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_image.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'layer_image.h') diff --git a/layer_image.h b/layer_image.h index e374053..5f2271f 100644 --- a/layer_image.h +++ b/layer_image.h @@ -9,9 +9,6 @@ #include "osc_graphics.h" #include "layer.h" -#define LayerImage_Info_Name "image" -#define LayerImage_Info_Types "s" /* file */ - class LayerImage : public Layer { SDL_Surface *surf_alpha; /* with per-surface alpha */ SDL_Surface *surf_scaled; /* scaled image */ @@ -21,17 +18,18 @@ class LayerImage : public Layer { float alphav; public: - static void register_layer() {} - LayerImage(const char *name, SDL_Rect geo = (SDL_Rect){0, 0, 0, 0}, float opacity = 1., const char *file = NULL); + + static CtorInfo ctor_info; static Layer * ctor_osc(const char *name, SDL_Rect geo, float opacity, lo_arg **argv) { return new LayerImage(name, geo, opacity, &argv[0]->s); } + ~LayerImage(); void frame(SDL_Surface *target); -- cgit v1.2.3