Match sub_0806D5D4

This commit is contained in:
Tal Hayon 2022-01-11 16:01:04 +02:00
parent 688508b1af
commit 6b0f125be0
2 changed files with 6 additions and 6 deletions

View File

@ -247,8 +247,7 @@ typedef struct {
/*0x08*/ u8 filler[2];
/*0x0a*/ u8 charm;
/*0x0b*/ u8 unkB;
/*0x0c*/ u8 itemOnA;
/*0x0d*/ u8 itemOnB;
/*0x0c*/ u8 itemButtons[2];
/*0x0e*/ u8 bottles[4];
/*0x12*/ u8 effect;
/*0x13*/ u8 filler3[5];
@ -260,6 +259,9 @@ typedef struct {
/*0x22*/ u8 filler4[4];
} Stats;
#define itemOnA itemButtons[0]
#define itemOnB itemButtons[1]
typedef struct {
/*0x0*/ u8 field_0x0;
/*0x1*/ u8 behaviorID;

View File

@ -298,18 +298,16 @@ void sub_0806D514(Entity* this) {
ASM_FUNC("asm/non_matching/bigGoron/sub_0806D520.inc", void sub_0806D520(Entity* this, u32 param))
// TODO itemOnA and itemOnB would need to be in array?
NONMATCH("asm/non_matching/bigGoron/sub_0806D5D4.inc", void sub_0806D5D4(void)) {
void sub_0806D5D4(void) {
u32 itemSlot;
InitBiggoronTimer();
itemSlot = IsItemEquipped(0xd);
if (itemSlot != 2) {
((u8*)&gSave.stats.itemOnA)[itemSlot] = 0;
gSave.stats.itemButtons[itemSlot] = 0;
}
sub_0807CAA0(0xd, 0);
}
END_NONMATCH
void sub_0806D600(Entity* this, ScriptExecutionContext* context) {
context->condition = gSave.timers[2] == 0;