From cdf61ca57aa445bc2263830d3438391e97549dc1 Mon Sep 17 00:00:00 2001 From: engineer124 Date: Thu, 21 Apr 2022 15:45:45 +1000 Subject: [PATCH] More enums missed --- src/code/z_parameter.c | 2 +- src/code/z_sram_NES.c | 36 +++++++++---------- .../ovl_En_Akindonuts/z_en_akindonuts.c | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 34212f0cf..94552ce33 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -567,7 +567,7 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) { return ITEM_BOW; } else if (item == ITEM_OCARINA) { - INV_CONTENT(ITEM_OCARINA) = 0; + INV_CONTENT(ITEM_OCARINA) = ITEM_OCARINA; return ITEM_NONE; } else if (item == ITEM_MAGIC_BEANS) { diff --git a/src/code/z_sram_NES.c b/src/code/z_sram_NES.c index 34472d563..a7400f67e 100644 --- a/src/code/z_sram_NES.c +++ b/src/code/z_sram_NES.c @@ -230,8 +230,8 @@ void Sram_SaveEndOfCycle(GlobalContext* globalCtx) { s16 sceneNum; s32 j; s32 i; - u8 temp; - u8 temp2; + u8 slot; + u8 item; gSaveContext.save.daySpeed = 0; gSaveContext.save.daysElapsed = 0; @@ -306,26 +306,26 @@ void Sram_SaveEndOfCycle(GlobalContext* globalCtx) { } if (INV_CONTENT(ITEM_BOMB) == ITEM_BOMB) { - temp2 = INV_CONTENT(ITEM_BOMB); - if (AMMO(temp2) != 0) { + item = INV_CONTENT(ITEM_BOMB); + if (AMMO(item) != 0) { gSaveContext.eventInf[7] |= 2; } } if (INV_CONTENT(ITEM_NUT) == ITEM_NUT) { - temp2 = INV_CONTENT(ITEM_NUT); - if (AMMO(temp2) != 0) { + item = INV_CONTENT(ITEM_NUT); + if (AMMO(item) != 0) { gSaveContext.eventInf[7] |= 4; } } if (INV_CONTENT(ITEM_STICK) == ITEM_STICK) { - temp2 = INV_CONTENT(ITEM_STICK); - if (AMMO(temp2) != 0) { + item = INV_CONTENT(ITEM_STICK); + if (AMMO(item) != 0) { gSaveContext.eventInf[7] |= 8; } } if (INV_CONTENT(ITEM_BOW) == ITEM_BOW) { - temp2 = INV_CONTENT(ITEM_BOW); - if (AMMO(temp2) != 0) { + item = INV_CONTENT(ITEM_BOW); + if (AMMO(item) != 0) { gSaveContext.eventInf[7] |= 0x10; } } @@ -333,8 +333,8 @@ void Sram_SaveEndOfCycle(GlobalContext* globalCtx) { for (i = 0; i < ARRAY_COUNT(D_801C67B0); i++) { if (D_801C67B0[i] != ITEM_NONE) { if ((gSaveContext.save.inventory.items[i] != ITEM_NONE) && (i != SLOT_PICTO_BOX)) { - temp2 = gSaveContext.save.inventory.items[i]; - AMMO(temp2) = 0; + item = gSaveContext.save.inventory.items[i]; + AMMO(item) = 0; } } } @@ -385,20 +385,20 @@ void Sram_SaveEndOfCycle(GlobalContext* globalCtx) { } if (STOLEN_ITEM_1 == ITEM_BOTTLE) { - temp = SLOT(ITEM_BOTTLE); + slot = SLOT(ITEM_BOTTLE); for (i = 0; i < 6; i++) { - if (gSaveContext.save.inventory.items[temp + i] == ITEM_NONE) { - gSaveContext.save.inventory.items[temp + i] = ITEM_BOTTLE; + if (gSaveContext.save.inventory.items[slot + i] == ITEM_NONE) { + gSaveContext.save.inventory.items[slot + i] = ITEM_BOTTLE; break; } } } if (STOLEN_ITEM_2 == ITEM_BOTTLE) { - temp = SLOT(ITEM_BOTTLE); + slot = SLOT(ITEM_BOTTLE); for (i = 0; i < 6; i++) { - if (gSaveContext.save.inventory.items[temp + i] == ITEM_NONE) { - gSaveContext.save.inventory.items[temp + i] = ITEM_BOTTLE; + if (gSaveContext.save.inventory.items[slot + i] == ITEM_NONE) { + gSaveContext.save.inventory.items[slot + i] = ITEM_BOTTLE; break; } } diff --git a/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c b/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c index 8a5b863fd..1c013c2a6 100644 --- a/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c +++ b/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c @@ -296,7 +296,7 @@ s32 func_80BED140(GlobalContext* globalCtx) { } s32 func_80BED208(EnAkindonuts* this) { - if ((u32)INV_CONTENT(ITEM_MAGIC_BEANS) != 10) { + if ((u32)INV_CONTENT(ITEM_MAGIC_BEANS) != ITEM_MAGIC_BEANS) { return 0; }