diff options
| author | notyourav <65437533+notyourav@users.noreply.github.com> | 2022-07-10 16:02:30 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-10 16:02:30 -0700 |
| commit | 4ef3f4e351b81b706ce6013ae84b17d013e4ca5a (patch) | |
| tree | 642020b2ad4936b7e3307e13967765e442e32766 /src | |
| parent | a0b679237a9ca5d83b3f698b05ce657e5e86e6be (diff) | |
| parent | c1fa780d2d9676381cbc3f06ad38d2ad4dbadf57 (diff) | |
Merge pull request #529 from hatal175/useflagsenum
Diffstat (limited to 'src')
| -rw-r--r-- | src/npc/sittingPerson.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/npc/sittingPerson.c b/src/npc/sittingPerson.c index 2a8f3772..043aae5f 100644 --- a/src/npc/sittingPerson.c +++ b/src/npc/sittingPerson.c @@ -78,26 +78,16 @@ void sub_08063874(Entity* this) { this->animationState = this->timer; } -#if defined(EU) || defined(DEMO_JP) || defined(JP) -#define SUB_0806387C_FLAG 0xd7 -#define SUB_0806387C_FLAG2 0xce -#define SUB_0806390C_FLAG 0xd6 -#else -#define SUB_0806387C_FLAG 0xda -#define SUB_0806387C_FLAG2 0xd1 -#define SUB_0806390C_FLAG 0xd9 -#endif - void sub_0806387C(Entity* this) { s32 r4 = 3; s32 r5; s32 val, val2; u16* ptr; - if (CheckLocalFlag(SUB_0806387C_FLAG) == 0) { + if (CheckLocalFlag(MACHI_MES_50) == 0) { r4 = 0; - SetLocalFlag(SUB_0806387C_FLAG); + SetLocalFlag(MACHI_MES_50); } else { - if (CheckLocalFlag(SUB_0806387C_FLAG2) == 0) { + if (CheckLocalFlag(SHOP05_OPEN) == 0) { r5 = 0; for (r4 = 1; r4 <= 0x82; r4++) { if (ReadBit(gUnk_02002B0E, r4)) { @@ -108,7 +98,7 @@ void sub_0806387C(Entity* this) { r4 = 1; if (r5 > 0x81) { r4 = 2; - SetLocalFlag(SUB_0806387C_FLAG2); + SetLocalFlag(SHOP05_OPEN); RestorePrevTileEntity(0xa17, 1); RestorePrevTileEntity(0xa57, 1); } @@ -125,9 +115,9 @@ void sub_0806387C(Entity* this) { void sub_0806390C(Entity* this) { u32 r5 = 1; - if (CheckLocalFlag(SUB_0806390C_FLAG) == 0) { + if (CheckLocalFlag(MACHI_MES_60) == 0) { r5 = 0; - SetLocalFlag(SUB_0806390C_FLAG); + SetLocalFlag(MACHI_MES_60); (*(u32**)&this->cutsceneBeh)[0x5] = 1; } |
