summaryrefslogtreecommitdiff
path: root/src/code/z_elf_message.c
diff options
context:
space:
mode:
authorDragorn421 <Dragorn421@users.noreply.github.com>2022-04-30 18:18:56 +0200
committerGitHub <noreply@github.com>2022-04-30 18:18:56 +0200
commitb9fded7b4ed6ded28360ceb69737f9b4c10e4946 (patch)
treebe7ba41b51c57b8a0eee03e3db934233fa8a1f7e /src/code/z_elf_message.c
parent72847660eb4b9eef8a392ddb2edc64060dd40500 (diff)
Doc equips usage (inventory, current and player-specific constants) (#1142)
* Doc equips usage (inventory, current and player-specific constants) * Improve some comments * `currentSword`(`Item`) -> `currentSwordItemId` * Comments on the right in `D_801261F8` * Improve `sDebugSaveInventory.equipment` formatting with extra parentheses * Use constants for `sNewSaveInventory.equipment` * Run formatter * Make comments in z64save.h header a single line even if very long * `CHECK_OWNED_EQUIP_ALT` * One more use of `CHECK_OWNED_EQUIP` * `OWNED_EQUIP_FLAG` * `OWNED_EQUIP_FLAG_ALT` * Improve (?) giving sword by item id * "half-byte" -> "nibble" * Improve equips for setting kokiri sword * Improve (?) checking boots by item id * Improve (?) checking equips by item id * Fixup one spot assuming `EQUIP_TYPE_SWORD == 0` * Comments on the right in `sBootDListGroups`
Diffstat (limited to 'src/code/z_elf_message.c')
-rw-r--r--src/code/z_elf_message.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/code/z_elf_message.c b/src/code/z_elf_message.c
index aef42a3ef..62c6ddb2f 100644
--- a/src/code/z_elf_message.c
+++ b/src/code/z_elf_message.c
@@ -45,8 +45,8 @@ u32 ElfMessage_CheckCondition(ElfMessage* msg) {
return ((msg->byte0 & 1) == 1) == ((msg->byte1 & 0x0F) == CUR_UPG_VALUE(UPG_STRENGTH));
case (ELF_MSG_CONDITION_BOOTS << 4):
return ((msg->byte0 & 1) == 1) ==
- (((gBitFlags[msg->byte3 - ITEM_BOOTS_KOKIRI] << gEquipShifts[EQUIP_BOOTS]) &
- gSaveContext.inventory.equipment) != 0);
+ (CHECK_OWNED_EQUIP(EQUIP_TYPE_BOOTS,
+ msg->byte3 - ITEM_BOOTS_KOKIRI + EQUIP_INV_BOOTS_KOKIRI) != 0);
case (ELF_MSG_CONDITION_SONG << 4):
return ((msg->byte0 & 1) == 1) ==
(CHECK_QUEST_ITEM(msg->byte3 - ITEM_SONG_MINUET + QUEST_SONG_MINUET) != 0);