1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-22 14:55:39 +00:00

Use INV_CONTENT, AMMO macros more

This commit is contained in:
Dragorn421 2021-09-21 10:30:19 +02:00
parent 8bb2e22c00
commit efe60cc88b
No known key found for this signature in database
GPG key ID: C182A3A3996E8201

View file

@ -415,17 +415,17 @@ void KaleidoScope_DrawDebugEditor(GlobalContext* globalCtx) {
} }
if (CHECK_BTN_ALL(input->press.button, BTN_CLEFT)) { if (CHECK_BTN_ALL(input->press.button, BTN_CLEFT)) {
if (i != gSaveContext.inventory.items[SLOT(gAmmoItems[i])]) { if (i != INV_CONTENT(gAmmoItems[i])) {
gSaveContext.inventory.items[SLOT(gAmmoItems[i])] = gAmmoItems[i]; INV_CONTENT(gAmmoItems[i]) = gAmmoItems[i];
} }
gSaveContext.inventory.ammo[SLOT(gAmmoItems[i])]++; AMMO(gAmmoItems[i])++;
if (gSaveContext.inventory.ammo[SLOT(gAmmoItems[i])] > 99) { if (AMMO(gAmmoItems[i]) > 99) {
gSaveContext.inventory.ammo[SLOT(gAmmoItems[i])] = 99; AMMO(gAmmoItems[i]) = 99;
} }
} else if (CHECK_BTN_ALL(input->press.button, BTN_CRIGHT)) { } else if (CHECK_BTN_ALL(input->press.button, BTN_CRIGHT)) {
gSaveContext.inventory.ammo[SLOT(gAmmoItems[i])]--; AMMO(gAmmoItems[i])--;
if (gSaveContext.inventory.ammo[SLOT(gAmmoItems[i])] < 0) { if (AMMO(gAmmoItems[i]) < 0) {
gSaveContext.inventory.ammo[SLOT(gAmmoItems[i])] = 0; AMMO(gAmmoItems[i]) = 0;
} }
} }
} else if (i == SLOT_OCARINA) { } else if (i == SLOT_OCARINA) {