4 #define REGISTER(initfunc, ns, array, counter, id, class) \
6 void Register_##ns##_##id##_init(entity this) { } \
7 void Register_##ns##_##id() { \
8 entity this = NEW(class); \
10 this.m_id = ns##_COUNT; \
11 array[counter++] = this; \
12 Register_##ns##_##id##_init(this); \
14 ACCUMULATE_FUNCTION(initfunc, Register_##ns##_##id) \
15 [[accumulate]] void Register_##ns##_##id##_init(entity this)