diff options
| author | theo3 <arisstephenson2@gmail.com> | 2022-03-28 17:26:07 -0700 |
|---|---|---|
| committer | theo3 <arisstephenson2@gmail.com> | 2022-03-28 17:26:07 -0700 |
| commit | 6cf555f074375c8134ce44b8ba68095a3a90ec46 (patch) | |
| tree | 20da0ca1bb72f2682bdf78ac116417b12f731707 /src/object | |
| parent | 52439a0fc8cf34aeb4612b43cb7a0894add0ae57 (diff) | |
figurine cleanup
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/figurineDevice.c | 30 | ||||
| -rw-r--r-- | src/object/fileScreenObjects.c | 4 | ||||
| -rw-r--r-- | src/object/objectB.c | 4 |
3 files changed, 17 insertions, 21 deletions
diff --git a/src/object/figurineDevice.c b/src/object/figurineDevice.c index a9efe80c..f4c5602c 100644 --- a/src/object/figurineDevice.c +++ b/src/object/figurineDevice.c @@ -82,7 +82,7 @@ void FigurineDevice_Init(FigurineDeviceEntity* this) { super->action = super->type + 1; switch (super->type) { case 0: - if (CheckLocalFlag(0x5e)) { + if (CheckLocalFlag(SHOP07_TANA)) { this->unk_7a = 1; sub_080787B4(super); } else { @@ -134,7 +134,7 @@ void FigurineDevice_Action1(FigurineDeviceEntity* this) { if (super->interactType != 0) { super->interactType = 0; ResetPlayerAnimationAndAction(); - if (CheckLocalFlag(0x5e)) { + if (CheckLocalFlag(SHOP07_TANA)) { this->unk_7a = 2; SetRoomFlag(2); MenuFadeIn(7, 0xff); @@ -160,7 +160,7 @@ void FigurineDevice_Action2(FigurineDeviceEntity* this) { switch (this->unk_7a) { case 0: if (CheckRoomFlag(0)) { - if (CheckLocalFlag(0x5e)) { + if (CheckLocalFlag(SHOP07_TANA)) { this->unk_7a = 1; } else { this->unk_7a = 2; @@ -168,7 +168,7 @@ void FigurineDevice_Action2(FigurineDeviceEntity* this) { } break; case 2: - SetLocalFlag(0x5e); + SetLocalFlag(SHOP07_TANA); case 1: this->unk_7a = 0; sub_08088328((FigurineDeviceEntity*)super->child); @@ -330,23 +330,19 @@ void sub_08088034(FigurineDeviceEntity* this) { void sub_0808804C(FigurineDeviceEntity* this) { u8 result = 0; - if (gSave.unk6 != 0) { + if (gSave.saw_staffroll) { result = 9; } else if (CheckGlobalFlag(LV5_CLEAR)) { result = 7; - } else if (CheckLocalFlagByBank(0x800, 0x77)) { + } else if (CheckLocalFlagByBank(FLAG_BANK_9, LV5_31_CAP_0)) { result = 6; - } else if (CheckLocalFlagByBank(0x300, 0x32)) { + } else if (CheckLocalFlagByBank(FLAG_BANK_3, OUBO_KAKERA)) { result = 5; } else if (CheckGlobalFlag(LV4_CLEAR)) { result = 4; } else if (CheckGlobalFlag(LV3_CLEAR)) { result = 3; -#if defined(JP) || defined(DEMO_JP) || defined(EU) - } else if (CheckLocalFlagByBank(0x100, 0x9b)) { -#else - } else if (CheckLocalFlagByBank(0x100, 0x9c)) { -#endif + } else if (CheckLocalFlagByBank(FLAG_BANK_1, SOUGEN_08_TORITSUKI)) { result = 2; } else if (CheckGlobalFlag(LV2_CLEAR)) { result = 1; @@ -374,8 +370,8 @@ void sub_080880D8(FigurineDeviceEntity* this) { } gSave.field_0x9[0] = this->unk_80; } - if (CheckLocalFlag(0x5f) && (this->unk_80 != gSave.stats.filler[0])) { - ClearLocalFlag(0x5f); + if (CheckLocalFlag(SHOP07_COMPLETE) && (this->unk_80 != gSave.stats.filler[0])) { + ClearLocalFlag(SHOP07_COMPLETE); } } } @@ -387,7 +383,7 @@ void sub_0808826C(FigurineDeviceEntity* this) { s32 tmp = 0x64; tmp *= ((this->unk_80 - gSave.stats.filler[0])); tmp = tmp / this->unk_80; - if (tmp == 0 && !CheckLocalFlag(0x5f)) { + if (tmp == 0 && !CheckLocalFlag(SHOP07_COMPLETE)) { tmp = 1; } this->unk_83 = tmp; @@ -463,7 +459,7 @@ void sub_08088478(void) { messageIndex = 0x4329; break; case 0x82: - if (gSave.unk6 != 0) { + if (gSave.saw_staffroll) { messageIndex = 0x4327; } else { messageIndex = 0x4328; @@ -521,7 +517,7 @@ void sub_08088574(void) { #else if (CheckRoomFlag(9)) { #endif - if (CheckLocalFlag(0x5f)) { + if (CheckLocalFlag(SHOP07_COMPLETE)) { index = 0x4313; } else { index = 0x430c; diff --git a/src/object/fileScreenObjects.c b/src/object/fileScreenObjects.c index c7cac4e7..d08dce01 100644 --- a/src/object/fileScreenObjects.c +++ b/src/object/fileScreenObjects.c @@ -163,7 +163,7 @@ void sub_0808E988(Entity* this) { } void sub_0808E9F4(Entity* this) { - if (sub_0808E950() && gSave.unk6) { + if (sub_0808E950() && gSave.saw_staffroll) { this->spriteSettings.draw = 2; } else { this->spriteSettings.draw = 0; @@ -294,7 +294,7 @@ void sub_0808EBB8(Entity* this) { case 0: break; case 1: - y = ((SaveHeader*)0x2000000)->language * 16 + 24; + y = gSaveHeader->language * 16 + 24; x = 112; break; case 2: diff --git a/src/object/objectB.c b/src/object/objectB.c index fbf4ef50..efdf0c09 100644 --- a/src/object/objectB.c +++ b/src/object/objectB.c @@ -69,14 +69,14 @@ void ObjectB_Action1(ObjectBEntity* this) { case 0x43: break; default: - SoundReq(SFX_109); + SoundReq(SFX_ITEM_GET); break; } break; case 2: GiveItem(super->type, super->type2); this->unk_68 = gUnk_080FD964[super->type].unk_6; - SoundReq(SFX_109); + SoundReq(SFX_ITEM_GET); break; case 5: tmp = GetInventoryValue((u32)super->type); |
