diff options
| author | engineer124 <engineer124engineer124@gmail.com> | 2022-04-21 15:45:45 +1000 |
|---|---|---|
| committer | engineer124 <engineer124engineer124@gmail.com> | 2022-04-21 15:45:45 +1000 |
| commit | cdf61ca57aa445bc2263830d3438391e97549dc1 (patch) | |
| tree | f543fa41a32451c3bdb3dd216df3d73a8b1e0d0e /src/code | |
| parent | 47ee89ee35ec98c81441d56d03b4c6593ac8b88f (diff) | |
More enums missed
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/z_parameter.c | 2 | ||||
| -rw-r--r-- | src/code/z_sram_NES.c | 36 |
2 files changed, 19 insertions, 19 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; } } |
