add NPC_GROUP macro

This commit is contained in:
Alex Bates 2020-10-20 04:29:42 +01:00
parent 24ce2e9752
commit 9a60b9f311
No known key found for this signature in database
GPG Key ID: 5E11C2DB78877706
2 changed files with 5 additions and 2 deletions

View File

@ -192,6 +192,9 @@ typedef struct {
/* 0x08 */ s32 battleID; /* 0x08 */ s32 battleID;
} NpcGroupList[]; // size = 0x0C } NpcGroupList[]; // size = 0x0C
#define NPC_GROUP(npcs, battleID) { sizeof(npcs) / sizeof(StaticNpc), &npcs, battleID }
#define NPC_GROUP_LIST_END() { 0, 0, 0 }
Enemy* get_enemy(NpcId npcId); Enemy* get_enemy(NpcId npcId);
#endif #endif

View File

@ -187,8 +187,8 @@ StaticNpc goomba_npc = {
}; };
NpcGroupList npc_groups = { NpcGroupList npc_groups = {
{ sizeof(goomba_npc) / sizeof(StaticNpc), &goomba_npc, 0x00010003 }, NPC_GROUP(goomba_npc, 0x00010003),
{ 0, 0, 0 }, NPC_GROUP_LIST_END(),
}; };
// *INDENT-OFF* // *INDENT-OFF*