Commented a bunch and renamed functions

This commit is contained in:
Reinmmar 2023-08-23 13:18:25 +02:00
parent 968c0ba5cc
commit 1d9edca76a
1 changed files with 149 additions and 149 deletions

View File

@ -31,13 +31,13 @@ typedef struct {
/*0x7e*/ u8 unk_7e[2]; /*0x7e*/ u8 unk_7e[2];
/*0x80*/ u8 unk_80; /*0x80*/ u8 unk_80;
#endif #endif
/*0x81*/ u8 unk_81; /*0x81*/ u8 shells;
#ifdef EU #ifdef EU
/*0x82*/ u8 unk_82; /*0x82*/ u8 prevChance;
/*0x83*/ u8 unk_83; /*0x83*/ u8 chance;
#else #else
/*0x82*/ s8 unk_82; /*0x82*/ s8 prevChance;
/*0x83*/ s8 unk_83; /*0x83*/ s8 chance;
#endif #endif
} FigurineDeviceEntity; } FigurineDeviceEntity;
@ -46,14 +46,14 @@ extern u8 gUnk_020227F0;
void sub_0808804C(FigurineDeviceEntity*); void sub_0808804C(FigurineDeviceEntity*);
void sub_08087F58(FigurineDeviceEntity*); void sub_08087F58(FigurineDeviceEntity*);
void sub_08088328(FigurineDeviceEntity*); void FigurineDevice_Draw(FigurineDeviceEntity*);
void sub_0808826C(FigurineDeviceEntity*); void sub_0808826C(FigurineDeviceEntity*);
void sub_080882A8(FigurineDeviceEntity*); void sub_080882A8(FigurineDeviceEntity*);
void sub_080880D8(FigurineDeviceEntity*); void sub_080880D8(FigurineDeviceEntity*);
void FigurineDevice_ChangeShellAmount(FigurineDeviceEntity*, s32); void FigurineDevice_ChangeShellAmount(FigurineDeviceEntity*, s32);
void FigurineDevice_PlayErrorSound(FigurineDeviceEntity*); void FigurineDevice_PlayErrorSound(FigurineDeviceEntity*);
bool32 sub_08088160(FigurineDeviceEntity*, s32); bool32 sub_08088160(FigurineDeviceEntity*, s32);
void sub_08088424(FigurineDeviceEntity*); void FigurineDevice_GetChanceBasedOffFigurineCount(FigurineDeviceEntity*);
void FigurineDevice_Init(FigurineDeviceEntity*); void FigurineDevice_Init(FigurineDeviceEntity*);
void FigurineDevice_Action1(FigurineDeviceEntity*); void FigurineDevice_Action1(FigurineDeviceEntity*);
void FigurineDevice_Action2(FigurineDeviceEntity*); void FigurineDevice_Action2(FigurineDeviceEntity*);
@ -108,7 +108,7 @@ void FigurineDevice_Init(FigurineDeviceEntity* this) {
case 3: case 3:
super->timer = 30; super->timer = 30;
super->subtimer = 0; super->subtimer = 0;
this->unk_81 = 1; this->shells = 1;
this->unk_7a = 0; this->unk_7a = 0;
this->unk_7b = 0; this->unk_7b = 0;
this->unk_80 = 0; this->unk_80 = 0;
@ -165,7 +165,7 @@ void FigurineDevice_Action2(FigurineDeviceEntity* this) {
SetLocalFlag(SHOP07_TANA); SetLocalFlag(SHOP07_TANA);
case 1: case 1:
this->unk_7a = 0; this->unk_7a = 0;
sub_08088328((FigurineDeviceEntity*)super->child); FigurineDevice_Draw((FigurineDeviceEntity*)super->child);
ClearRoomFlag(0); ClearRoomFlag(0);
entity = CreateObject(FIGURINE_DEVICE, 2, 0); entity = CreateObject(FIGURINE_DEVICE, 2, 0);
if (entity != NULL) { if (entity != NULL) {
@ -233,7 +233,7 @@ void FigurineDevice_Action4(FigurineDeviceEntity* this) {
return; return;
} }
this->unk_7a = 1; this->unk_7a = 1;
this->unk_81 = 1; this->shells = 1;
ClearRoomFlag(1); ClearRoomFlag(1);
sub_0808826C(this); sub_0808826C(this);
sub_080882A8(this); sub_080882A8(this);
@ -252,7 +252,7 @@ void FigurineDevice_Action4(FigurineDeviceEntity* this) {
sub_08050384(); sub_08050384();
return; return;
} }
old_81 = this->unk_81; old_81 = this->shells;
#ifndef EU #ifndef EU
if ((gInput.heldKeys & R_BUTTON) != 0) { if ((gInput.heldKeys & R_BUTTON) != 0) {
tmp = 10; tmp = 10;
@ -271,7 +271,7 @@ void FigurineDevice_Action4(FigurineDeviceEntity* this) {
FigurineDevice_ChangeShellAmount(this, -tmp); FigurineDevice_ChangeShellAmount(this, -tmp);
break; break;
} }
if (old_81 != this->unk_81) { if (old_81 != this->shells) {
sub_080882A8(this); sub_080882A8(this);
} }
#else #else
@ -283,7 +283,7 @@ void FigurineDevice_Action4(FigurineDeviceEntity* this) {
FigurineDevice_ChangeShellAmount(this, -1); FigurineDevice_ChangeShellAmount(this, -1);
break; break;
} }
if (old_81 != this->unk_81) { if (old_81 != this->shells) {
sub_080882A8(this); sub_080882A8(this);
} }
#endif #endif
@ -297,7 +297,7 @@ void FigurineDevice_Action4(FigurineDeviceEntity* this) {
gMessage.textWindowPosX = 1; gMessage.textWindowPosX = 1;
gMessage.textWindowPosY = 0xc; gMessage.textWindowPosY = 0xc;
#endif #endif
gMessage.rupees = this->unk_81; gMessage.rupees = this->shells;
break; break;
} }
} }
@ -315,93 +315,93 @@ void sub_08087F58(FigurineDeviceEntity* this) {
void FigurineDevice_ChangeShellAmount(FigurineDeviceEntity* this, s32 shellDifference) { void FigurineDevice_ChangeShellAmount(FigurineDeviceEntity* this, s32 shellDifference) {
#ifdef EU #ifdef EU
u32 newAmount2;
u32 newAmount; u32 newAmount;
u32 newChance;
newAmount = this->unk_83 + shellDifference; newChance = this->chance + shellDifference;
if (CheckLocalFlag(SHOP07_COMPLETE)) { if (CheckLocalFlag(SHOP07_COMPLETE)) {
FigurineDevice_PlayErrorSound(this); FigurineDevice_PlayErrorSound(this);
return; return;
} }
if (shellDifference < 0) { if (shellDifference < 0) {
if (newAmount < this->unk_82) { if (newChance < this->prevChance) {
if (this->unk_83 != this->unk_82) { if (this->chance != this->prevChance) {
this->unk_83 = this->unk_82; this->chance = this->prevChance;
this->unk_81 = 1; this->shells = 1;
SoundReq(SFX_TEXTBOX_CHOICE); SoundReq(SFX_TEXTBOX_CHOICE);
} else { } else {
FigurineDevice_PlayErrorSound(this); FigurineDevice_PlayErrorSound(this);
} }
} else { } else {
this->unk_83 = newAmount; this->chance = newChance;
this->unk_81 += shellDifference; this->shells += shellDifference;
SoundReq(SFX_TEXTBOX_CHOICE); SoundReq(SFX_TEXTBOX_CHOICE);
} }
return; return;
} }
newAmount2 = this->unk_81 + shellDifference; newAmount = this->shells + shellDifference;
if (newAmount2 > (s32)gSave.stats.shells) { if (newAmount > gSave.stats.shells) {
if (gSave.stats.shells != this->unk_81) { if (gSave.stats.shells != this->shells) {
newAmount2 = gSave.stats.shells; newAmount = gSave.stats.shells;
shellDifference = (gSave.stats.shells - this->unk_81); shellDifference = (gSave.stats.shells - this->shells);
newAmount = this->unk_83 + shellDifference; newChance = this->chance + shellDifference;
} else { } else {
FigurineDevice_PlayErrorSound(this); FigurineDevice_PlayErrorSound(this);
return; return;
} }
} else if (newAmount > 100) { } else if (newChance > 100) {
if (this->unk_83 == 100) { if (this->chance == 100) {
FigurineDevice_PlayErrorSound(this); FigurineDevice_PlayErrorSound(this);
return; return;
} else { } else {
newAmount = 100; newChance = 100;
shellDifference = (newAmount - this->unk_83); shellDifference = (newChance - this->chance);
newAmount2 = this->unk_81 + shellDifference; newAmount = this->shells + shellDifference;
} }
} }
#else #else
s32 newAmount2;
s32 newAmount; s32 newAmount;
s32 prevAmount, prevAmount2; s32 newChance;
s32 prevChance, prevShells;
if (CheckLocalFlag(SHOP07_COMPLETE)) { if (CheckLocalFlag(SHOP07_COMPLETE)) {
FigurineDevice_PlayErrorSound(this); FigurineDevice_PlayErrorSound(this);
return; return;
} }
// This could probably be done without prevAmount and prevAmount2 // This could probably be done without prevChance and prevShells
prevAmount = this->unk_83; prevChance = this->chance;
newAmount = prevAmount + shellDifference; newChance = prevChance + shellDifference;
if (shellDifference < 0) { if (shellDifference < 0) {
if (newAmount < this->unk_82) { if (newChance < this->prevChance) {
if (this->unk_83 != this->unk_82) { if (this->chance != this->prevChance) {
this->unk_83 = this->unk_82; this->chance = this->prevChance;
this->unk_81 = 1; this->shells = 1;
SoundReq(SFX_TEXTBOX_CHOICE); SoundReq(SFX_TEXTBOX_CHOICE);
} else { } else {
FigurineDevice_PlayErrorSound(this); FigurineDevice_PlayErrorSound(this);
} }
} else { } else {
this->unk_83 = newAmount; this->chance = newChance;
this->unk_81 += shellDifference; this->shells += shellDifference;
SoundReq(SFX_TEXTBOX_CHOICE); SoundReq(SFX_TEXTBOX_CHOICE);
} }
return; return;
} }
prevAmount2 = this->unk_81; prevShells = this->shells;
newAmount2 = prevAmount2 + shellDifference; newAmount = prevShells + shellDifference;
if (newAmount2 > gSave.stats.shells) { if (newAmount > gSave.stats.shells) {
if (gSave.stats.shells != this->unk_81) { if (gSave.stats.shells != this->shells) {
newAmount2 = gSave.stats.shells; newAmount = gSave.stats.shells;
shellDifference = (gSave.stats.shells - this->unk_81); shellDifference = (gSave.stats.shells - this->shells);
newAmount = prevAmount + shellDifference; newChance = prevChance + shellDifference;
#ifdef JP #ifdef JP
if (newAmount > 100) { if (newChance > 100) {
newAmount = 100; newChance = 100;
shellDifference = (newAmount - prevAmount); shellDifference = (newChance - prevChance);
newAmount2 = prevAmount2 + shellDifference; newAmount = prevShells + shellDifference;
} }
#endif #endif
} else { } else {
@ -410,23 +410,23 @@ void FigurineDevice_ChangeShellAmount(FigurineDeviceEntity* this, s32 shellDiffe
} }
} }
#ifdef JP #ifdef JP
else if (newAmount > 100) { else if (newChance > 100) {
#else #else
if (newAmount > 100) { if (newChance > 100) {
#endif #endif
if (this->unk_83 == 100) { if (this->chance == 100) {
FigurineDevice_PlayErrorSound(this); FigurineDevice_PlayErrorSound(this);
return; return;
} else { } else {
newAmount = 100; newChance = 100;
shellDifference = (newAmount - prevAmount); shellDifference = (newChance - prevChance);
newAmount2 = prevAmount2 + shellDifference; newAmount = prevShells + shellDifference;
} }
} }
#endif #endif
this->unk_83 = newAmount; this->chance = newChance;
this->unk_81 = newAmount2; this->shells = newAmount;
SoundReq(SFX_TEXTBOX_CHOICE); SoundReq(SFX_TEXTBOX_CHOICE);
} }
@ -562,14 +562,14 @@ NONMATCH("asm/non_matching/figurineDevice/sub_08088160.inc",
END_NONMATCH END_NONMATCH
void sub_0808826C(FigurineDeviceEntity* this) { void sub_0808826C(FigurineDeviceEntity* this) {
s32 tmp = 0x64; s32 tmp = 100;
tmp *= ((this->unk_80 - gSave.stats.figurineCount)); tmp *= this->unk_80 - gSave.stats.figurineCount;
tmp = tmp / this->unk_80; tmp /= this->unk_80;
if (tmp == 0 && !CheckLocalFlag(SHOP07_COMPLETE)) { if (tmp == 0 && !CheckLocalFlag(SHOP07_COMPLETE)) {
tmp = 1; tmp = 1;
} }
this->unk_83 = tmp; this->chance = tmp;
this->unk_82 = this->unk_83; this->prevChance = this->chance;
} }
void sub_080882A8(FigurineDeviceEntity* this) { void sub_080882A8(FigurineDeviceEntity* this) {
@ -591,8 +591,8 @@ void sub_080882A8(FigurineDeviceEntity* this) {
static const u16 gUnk_08120AE4[] = { TEXT_INDEX(TEXT_CARLOV, 0x18), TEXT_INDEX(TEXT_CARLOV, 0x19) }; static const u16 gUnk_08120AE4[] = { TEXT_INDEX(TEXT_CARLOV, 0x18), TEXT_INDEX(TEXT_CARLOV, 0x19) };
u8* ptr; u8* ptr;
sub_08050384(); sub_08050384();
sub_08057044(this->unk_81, gUnk_020227E8, 0x202020); sub_08057044(this->shells, gUnk_020227E8, 0x202020);
sub_08057044(this->unk_83, &gUnk_020227E8[1], 0x202020); sub_08057044(this->chance, &gUnk_020227E8[1], 0x202020);
ptr = (u8*)0x02000000; ptr = (u8*)0x02000000;
if (ptr[7] == 0) { if (ptr[7] == 0) {
ShowTextBox(gUnk_08120AE4[super->type2], (Font*)&gUnk_08120AB4); // TODO convert data ShowTextBox(gUnk_08120AE4[super->type2], (Font*)&gUnk_08120AB4); // TODO convert data
@ -602,51 +602,51 @@ void sub_080882A8(FigurineDeviceEntity* this) {
gScreen.bg0.updated = 1; gScreen.bg0.updated = 1;
} }
void sub_08088328(FigurineDeviceEntity* this) { void FigurineDevice_Draw(FigurineDeviceEntity* this) {
u32 uVar2; u32 isLucky;
u32 uVar3; u32 rand;
u32 uVar5; u32 prevFigurineIndex;
u32 uVar6; u32 figurineIndex;
do { do {
uVar2 = Random(); isLucky = Random();
uVar2 &= 0x7f; isLucky &= 0x7f;
} while (uVar2 >= 100); } while (isLucky >= 100);
ModShells(-this->unk_81); ModShells(-this->shells);
uVar3 = Random(); rand = Random();
uVar6 = (uVar3 & 0x7f) + 1; figurineIndex = (rand & 0x7f) + 1;
uVar5 = uVar6; prevFigurineIndex = figurineIndex;
sub_08088424(this); FigurineDevice_GetChanceBasedOffFigurineCount(this);
if (uVar2 < this->unk_83) { if (isLucky < this->chance) {
uVar2 = FALSE; isLucky = FALSE;
do { do {
if (uVar2) if (isLucky)
break; break;
if (uVar6 > 0x88) { if (figurineIndex > 136) {
uVar6 = 1; figurineIndex = 1;
} }
if (sub_08088160(this, uVar6) && ReadBit(gSave.figurines, uVar6) == 0) { if (sub_08088160(this, figurineIndex) && ReadBit(gSave.figurines, figurineIndex) == 0) {
uVar2 = TRUE; isLucky = TRUE;
} else { } else {
uVar6++; figurineIndex++;
} }
} while (uVar5 != uVar6); } while (prevFigurineIndex != figurineIndex);
} else { } else {
uVar2 = TRUE; isLucky = TRUE;
do { do {
if (!uVar2) if (!isLucky)
break; break;
if (uVar6 > 0x88) { if (figurineIndex > 136) {
uVar6 = 1; figurineIndex = 1;
} }
if (sub_08088160(this, uVar6) && ReadBit(gSave.figurines, uVar6) != 0) { if (sub_08088160(this, figurineIndex) && ReadBit(gSave.figurines, figurineIndex) != 0) {
uVar2 = FALSE; isLucky = FALSE;
} else { } else {
uVar6++; figurineIndex++;
} }
} while (uVar5 != uVar6); } while (prevFigurineIndex != figurineIndex);
} }
if (uVar2) { if (isLucky) {
gSave.stats.figurineCount++; gSave.stats.figurineCount++;
if (gSave.stats.figurineCount != this->unk_80) { if (gSave.stats.figurineCount != this->unk_80) {
SetRoomFlag(7); SetRoomFlag(7);
@ -655,61 +655,61 @@ void sub_08088328(FigurineDeviceEntity* this) {
SetRoomFlag(8); SetRoomFlag(8);
} }
} }
this->unk_7d = uVar6; this->unk_7d = figurineIndex;
((FigurineDeviceEntity*)super->parent)->unk_7d = uVar6; ((FigurineDeviceEntity*)super->parent)->unk_7d = figurineIndex;
} }
void sub_08088424(FigurineDeviceEntity* this) { void FigurineDevice_GetChanceBasedOffFigurineCount(FigurineDeviceEntity* this) {
if (gSave.stats.figurineCount < 50) { if (gSave.stats.figurineCount < 50) {
if (this->unk_83 < 0x0f) { if (this->chance < 15) {
this->unk_83 = 0x0f; this->chance = 15;
} }
} else if (gSave.stats.figurineCount < 80) { } else if (gSave.stats.figurineCount < 80) {
if (this->unk_83 < 0xc) { if (this->chance < 12) {
this->unk_83 = 0xc; this->chance = 12;
} }
} else if (gSave.stats.figurineCount < 110) { } else if (gSave.stats.figurineCount < 110) {
if (this->unk_83 < 9) { if (this->chance < 9) {
this->unk_83 = 9; this->chance = 9;
} }
} else { } else {
if (this->unk_83 < 6) { if (this->chance < 6) {
this->unk_83 = 6; this->chance = 6;
} }
} }
} }
void sub_08088478(void) { void FigurineDevice_NoFigurinesLeftMessage(void) {
u32 messageIndex; u32 messageIndex;
bool32 set0x10 = FALSE; bool32 isUnlucky = FALSE;
if (!CheckRoomFlag(8)) { if (!CheckRoomFlag(8)) {
if (!CheckRoomFlag(7)) { if (!CheckRoomFlag(7)) {
messageIndex = TEXT_INDEX(TEXT_CARLOV, 0x22); messageIndex = TEXT_INDEX(TEXT_CARLOV, 34); // Oh! Looks like you've already got that...
set0x10 = TRUE; isUnlucky = TRUE;
} else { } else {
messageIndex = TEXT_INDEX(TEXT_CARLOV, 0x25); messageIndex = TEXT_INDEX(TEXT_CARLOV, 37); // Congratulations! I'll keep the figurine...
} }
} else { } else {
switch (gSave.stats.figurineCount) { switch (gSave.stats.figurineCount) {
case 136: case 136:
gSave.stats._hasAllFigurines = 0xff; gSave.stats._hasAllFigurines = 0xff;
messageIndex = TEXT_INDEX(TEXT_CARLOV, 0x29); messageIndex = TEXT_INDEX(TEXT_CARLOV, 41); // No way! Congratulations! You've collected every...
break; break;
case 130: case 130:
if (gSave.saw_staffroll) { if (gSave.saw_staffroll) {
messageIndex = TEXT_INDEX(TEXT_CARLOV, 0x27); messageIndex = TEXT_INDEX(TEXT_CARLOV, 39); // ...just gotten the last ... I'll make some more...
} else { } else {
messageIndex = TEXT_INDEX(TEXT_CARLOV, 0x28); messageIndex = TEXT_INDEX(TEXT_CARLOV, 40); // ...You've now collected all of the figurines...
} }
break; break;
default: default:
messageIndex = TEXT_INDEX(TEXT_CARLOV, 0x27); messageIndex = TEXT_INDEX(TEXT_CARLOV, 39); // ...you've just gotten the last figurine...
} }
} }
MessageFromTarget(messageIndex); MessageFromTarget(messageIndex);
gMessage.textWindowPosX = 1; gMessage.textWindowPosX = 1;
gMessage.textWindowPosY = 0xc; gMessage.textWindowPosY = 12;
if (set0x10) { if (isUnlucky) {
gMessage.rupees = 5; gMessage.rupees = 5;
} }
#ifndef EU #ifndef EU
@ -717,63 +717,63 @@ void sub_08088478(void) {
#endif #endif
} }
void sub_08088504(void) { void FigurineDevice_NothingNewToDrawMessage(void) {
u32 index; u32 messageIndex;
switch (gSave.stats.figurineCount) { switch (gSave.stats.figurineCount) {
case 136: case 136:
index = TEXT_INDEX(TEXT_CARLOV, 0x2f); messageIndex = TEXT_INDEX(TEXT_CARLOV, 47); // How do you like that Carlov Medal...
break; break;
case 130: case 130:
index = TEXT_INDEX(TEXT_CARLOV, 0x14); messageIndex = TEXT_INDEX(TEXT_CARLOV, 20); // ...won all the figurines I made so far. ... draw anyway?
break; break;
default: default:
index = TEXT_INDEX(TEXT_CARLOV, 0x11); messageIndex = TEXT_INDEX(TEXT_CARLOV, 17); // ...don't have any new figurines yet ... draw anyway?
break; break;
} }
MessageFromTarget(index); MessageFromTarget(messageIndex);
gMessage.textWindowPosX = 1; gMessage.textWindowPosX = 1;
gMessage.textWindowPosY = 0xc; gMessage.textWindowPosY = 12;
} }
void sub_08088544(void) { void FigurineDevice_NewFigurinesMessage(void) {
u32 index; u32 messageIndex;
if (gSave.stats.figurineCount != 130) { if (gSave.stats.figurineCount != 130) {
index = TEXT_INDEX(TEXT_CARLOV, 0xe); messageIndex = TEXT_INDEX(TEXT_CARLOV, 14); // ...I made a new figurine...
} else { } else {
index = TEXT_INDEX(TEXT_CARLOV, 0x15); messageIndex = TEXT_INDEX(TEXT_CARLOV, 21); // ...I've got something new ... final series...
} }
MessageFromTarget(index); MessageFromTarget(messageIndex);
gMessage.textWindowPosX = 1; gMessage.textWindowPosX = 1;
gMessage.textWindowPosY = 0xc; gMessage.textWindowPosY = 12;
} }
void sub_08088574(void) { void FigurineDevice_TryAgainMessage(void) {
u32 index; u32 messageIndex;
#ifdef EU #ifdef EU
if (CheckRoomFlag(0xa)) { if (CheckRoomFlag(10)) {
#else #else
if (CheckRoomFlag(9)) { if (CheckRoomFlag(9)) {
#endif #endif
if (CheckLocalFlag(SHOP07_COMPLETE)) { if (CheckLocalFlag(SHOP07_COMPLETE)) {
index = TEXT_INDEX(TEXT_CARLOV, 0x13); messageIndex = TEXT_INDEX(TEXT_CARLOV, 19); // ...already have all ... still want to have a try?
} else { } else {
index = TEXT_INDEX(TEXT_CARLOV, 0x0c); messageIndex = TEXT_INDEX(TEXT_CARLOV, 12); // Want to try another drawing?
} }
} else { } else {
index = TEXT_INDEX(TEXT_CARLOV, 0x0b); messageIndex = TEXT_INDEX(TEXT_CARLOV, 11); // ...Do you want to try for another one?
} }
MessageFromTarget(index); MessageFromTarget(messageIndex);
gMessage.textWindowPosX = 1; gMessage.textWindowPosX = 1;
gMessage.textWindowPosY = 0xc; gMessage.textWindowPosY = 12;
} }
void sub_080885B0(void) { void FigurineDevice_LostOrFinishedMessage(void) {
if (!CheckRoomFlag(8)) { if (!CheckRoomFlag(8)) {
if (!CheckRoomFlag(7)) { if (!CheckRoomFlag(7)) {
ModRupees(5); ModRupees(5);
MessageFromTarget(TEXT_INDEX(TEXT_CARLOV, 0x26)); MessageFromTarget(TEXT_INDEX(TEXT_CARLOV, 38)); // I hope you keep collecting ... come back again!
gMessage.textWindowPosX = 1; gMessage.textWindowPosX = 1;
gMessage.textWindowPosY = 0xc; gMessage.textWindowPosY = 12;
} }
} else if (gSave.stats._hasAllFigurines != 0) { } else if (gSave.stats._hasAllFigurines != 0) {
// GOT ALL THEM FIGURINES (: // GOT ALL THEM FIGURINES (:
@ -787,7 +787,7 @@ void sub_080885B0(void) {
#ifndef EU #ifndef EU
void sub_0808861C(FigurineDeviceEntity* this, ScriptExecutionContext* context) { void sub_0808861C(FigurineDeviceEntity* this, ScriptExecutionContext* context) {
context->condition = CheckPlayerInRegion(0xa8, 0x54, 0xc, 8); context->condition = CheckPlayerInRegion(168, 84, 12, 8); // If I understand this correctly then it checks if the player is at the lever
#ifdef JP #ifdef JP
if ((gPlayerEntity.animationState != 0)) { if ((gPlayerEntity.animationState != 0)) {
#else #else
@ -800,7 +800,7 @@ void sub_0808861C(FigurineDeviceEntity* this, ScriptExecutionContext* context) {
#if !defined(JP) #if !defined(JP)
void sub_08088658(FigurineDeviceEntity* this, ScriptExecutionContext* context) { void sub_08088658(FigurineDeviceEntity* this, ScriptExecutionContext* context) {
context->condition = CheckPlayerInRegion(0x78, 0x78, 0x10, 8); context->condition = CheckPlayerInRegion(120, 120, 16, 8); // And this is if the player is at the door
if (gPlayerEntity.z.HALF.HI != 0) { if (gPlayerEntity.z.HALF.HI != 0) {
context->condition = 0; context->condition = 0;
} }