4 #define ITEM_HANDLE(signal, ...) __Item_Send_##signal(__VA_ARGS__)
5 CLASS(GameItem, Object)
6 METHOD(GameItem, show, void(entity this))
7 void GameItem_show(entity this) { print("A game item\n"); }
8 void ITEM_HANDLE(Show, entity this) { this.show(this); }
13 #define REGISTER_ITEM(id, class, body) \
15 void RegisterItems_##id() { \
16 const entity this = NEW(class); \
18 ITEMS[ITEM_COUNT++] = this; \
21 ACCUMULATE_FUNCTION(RegisterItems, RegisterItems_##id)