diff options
| author | mzxrules <mzxrules@gmail.com> | 2022-07-04 20:52:50 -0400 |
|---|---|---|
| committer | mzxrules <mzxrules@gmail.com> | 2022-07-04 20:52:50 -0400 |
| commit | 0b99719f7cb3cf4e5b5bc39cac5b9eb39b99616b (patch) | |
| tree | 9e4937739b4429c81b396ee4fb0f808c29b26af2 /src/code/code_8012EC80.c | |
| parent | 7769846704621adcc2dadf7482ba3e8dea675128 (diff) | |
| parent | 45eed680d613642bc3e1591f95902f6d57e0f8e6 (diff) | |
Merge remote-tracking branch 'upstream/master' into z_map_
Diffstat (limited to 'src/code/code_8012EC80.c')
| -rw-r--r-- | src/code/code_8012EC80.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/code/code_8012EC80.c b/src/code/code_8012EC80.c index 5dee17fb5..ea3c30aa6 100644 --- a/src/code/code_8012EC80.c +++ b/src/code/code_8012EC80.c @@ -474,15 +474,15 @@ u16 gScenesPerRegion[11][27] = { }, }; -s32 Inventory_GetBtnBItem(GlobalContext* globalCtx) { +s32 Inventory_GetBtnBItem(PlayState* play) { if (gSaveContext.buttonStatus[0] == BTN_DISABLED) { return ITEM_NONE; } else if (gSaveContext.unk_1015 == ITEM_NONE) { return ITEM_NONE; } else if (CUR_FORM_EQUIP(EQUIP_SLOT_B) == ITEM_NONE) { - if (globalCtx->interfaceCtx.unk_21C != 0) { - if (globalCtx->interfaceCtx.unk_21E != 0) { - return globalCtx->interfaceCtx.unk_21E; + if (play->interfaceCtx.unk_21C != 0) { + if (play->interfaceCtx.unk_21E != 0) { + return play->interfaceCtx.unk_21E; } } return ITEM_NONE; @@ -501,12 +501,12 @@ void Inventory_ChangeEquipment(s16 value) { /** * Only deletes shield, equipment argument unused and is a remnant of OoT */ -u8 Inventory_DeleteEquipment(GlobalContext* globalCtx, s16 equipment) { - Player* player = GET_PLAYER(globalCtx); +u8 Inventory_DeleteEquipment(PlayState* play, s16 equipment) { + Player* player = GET_PLAYER(play); if (GET_CUR_EQUIP_VALUE(EQUIP_SHIELD) != 0) { SET_EQUIP_VALUE(EQUIP_SHIELD, 0); - Player_SetEquipmentData(globalCtx, player); + Player_SetEquipmentData(play, player); return true; } @@ -719,12 +719,12 @@ s16 Inventory_GetSkullTokenCount(s16 sceneIndex) { } } -void Inventory_SaveLotteryCodeGuess(GlobalContext* globalCtx) { +void Inventory_SaveLotteryCodeGuess(PlayState* play) { u16 lotteryCodeGuess; - lotteryCodeGuess = ((globalCtx->msgCtx.unk12054[0] & 0xF) << 8); // First Digit - lotteryCodeGuess |= ((globalCtx->msgCtx.unk12054[1] & 0xF) << 4); // Second Digit - lotteryCodeGuess |= (globalCtx->msgCtx.unk12054[2] & 0xF); // Third Digit + lotteryCodeGuess = ((play->msgCtx.unk12054[0] & 0xF) << 8); // First Digit + lotteryCodeGuess |= ((play->msgCtx.unk12054[1] & 0xF) << 4); // Second Digit + lotteryCodeGuess |= (play->msgCtx.unk12054[2] & 0xF); // Third Digit gSaveContext.save.lotteryCodeGuess = (gSaveContext.save.lotteryCodeGuess & 0xFFFF0000) | (lotteryCodeGuess & 0xFFFF); } |
