diff options
Diffstat (limited to 'src/entityimpl.h')
-rw-r--r-- | src/entityimpl.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/entityimpl.h b/src/entityimpl.h index 5ed9dfa..4a71e39 100644 --- a/src/entityimpl.h +++ b/src/entityimpl.h @@ -12,9 +12,10 @@ __attribute__((constructor)) static void init_##X() { _##X = X; } \ static void X([[maybe_unused]] Entity *this, [[maybe_unused]] Game *g) -#define IMPL_INIT(X) static void init(Entity *, int, int, int, int); \ -__attribute__((constructor)) static void init_tag() { \ +#define IMPL_INIT(X,P) static void init(Entity *, int, int, int, int); \ +__attribute__((constructor)) static void init_tag(void) { \ entitytags[num_entitytags].init = init; \ + entitytags[num_entitytags].parent = P; \ entitytags[num_entitytags++].name = #X; \ } \ static void _init(Entity *this); \ |