mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
add FORMATION_ID macro
This commit is contained in:
parent
8077a8f3cb
commit
056fbac32c
@ -192,10 +192,10 @@ typedef struct Enemy {
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 npcCount;
|
||||
/* 0x04 */ StaticNpc* npcs;
|
||||
/* 0x08 */ s32 battleID;
|
||||
/* 0x08 */ FormationID formationID;
|
||||
} NpcGroupList[]; // size = 0x0C
|
||||
|
||||
#define NPC_GROUP(npcs, battleID) { sizeof(npcs) / sizeof(StaticNpc), &npcs, battleID }
|
||||
#define NPC_GROUP(npcs, formationID) { sizeof(npcs) / sizeof(StaticNpc), &npcs, formationID }
|
||||
#define NPC_GROUP_LIST_END() { 0, 0, 0 }
|
||||
|
||||
Enemy* get_enemy(NpcId npcId);
|
||||
|
@ -10,4 +10,7 @@
|
||||
#define UNK_FUN_PTR(name) void(*name)(void)
|
||||
#define UNK_ARGS
|
||||
|
||||
typedef s32 FormationID;
|
||||
#define FORMATION_ID(section, stage, index) (section << 16) + (stage << 8) + index
|
||||
|
||||
#endif
|
||||
|
@ -191,7 +191,7 @@ static StaticNpc goomba_npc = {
|
||||
};
|
||||
|
||||
static NpcGroupList npc_groups = {
|
||||
NPC_GROUP(goomba_npc, 0x00010003),
|
||||
NPC_GROUP(goomba_npc, FORMATION_ID(1, 0, 3)),
|
||||
NPC_GROUP_LIST_END(),
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user