diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c index 406c2ba67..51e092017 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c @@ -488,18 +488,6 @@ void KaleidoScope_DrawEquipment(PlayState* play) { } } - // Grey Out Strength Upgrade Name when Disabled - // Do not Grey Out Strength Upgrade Name when Enabled - if ((pauseCtx->cursorX[PAUSE_EQUIP] == 0) && (pauseCtx->cursorY[PAUSE_EQUIP] == 2) && - CVarGetInteger("gToggleStrength", 0)) { - if (CVarGetInteger("gStrengthDisabled", 0)) { - pauseCtx->nameColorSet = 1; - } else { - pauseCtx->nameColorSet = 0; - } - } - - if ((pauseCtx->cursorX[PAUSE_EQUIP] == 0) && (pauseCtx->cursorY[PAUSE_EQUIP] == 0)) { if (LINK_AGE_IN_YEARS != YEARS_CHILD) { if ((cursorItem >= ITEM_BULLET_BAG_30) && (cursorItem <= ITEM_BULLET_BAG_50)) { @@ -514,16 +502,21 @@ void KaleidoScope_DrawEquipment(PlayState* play) { KaleidoScope_SetCursorVtx(pauseCtx, cursorSlot * 4, pauseCtx->equipVtx); - u16 buttonsToCheck = BTN_A | BTN_CLEFT | BTN_CDOWN | BTN_CRIGHT; - if (CVarGetInteger("gDpadEquips", 0) && (!CVarGetInteger("gDpadPause", 0) || CHECK_BTN_ALL(input->cur.button, BTN_CUP))) { - buttonsToCheck |= BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT; - } - // Allow Toggling of Strength when Pressing A on Strength Upgrade Slot if ((pauseCtx->cursorSpecialPos == 0) && (pauseCtx->state == 6) && (pauseCtx->unk_1E4 == 0) && CHECK_BTN_ALL(input->press.button, BTN_A) && (pauseCtx->cursorX[PAUSE_EQUIP] == 0) && (pauseCtx->cursorY[PAUSE_EQUIP] == 2) && CVarGetInteger("gToggleStrength", 0)) { CVarSetInteger("gStrengthDisabled", !CVarGetInteger("gStrengthDisabled", 0)); + // Equip success sound + Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); + // Wait 10 frames before accepting input again + pauseCtx->unk_1E4 = 7; + sEquipTimer = 10; + } + + u16 buttonsToCheck = BTN_A | BTN_CLEFT | BTN_CDOWN | BTN_CRIGHT; + if (CVarGetInteger("gDpadEquips", 0) && (!CVarGetInteger("gDpadPause", 0) || CHECK_BTN_ALL(input->cur.button, BTN_CUP))) { + buttonsToCheck |= BTN_DUP | BTN_DDOWN | BTN_DLEFT | BTN_DRIGHT; } if ((pauseCtx->cursorSpecialPos == 0) && (cursorItem != PAUSE_ITEM_NONE) && (pauseCtx->state == 6) && @@ -657,6 +650,19 @@ void KaleidoScope_DrawEquipment(PlayState* play) { } } + + // Grey Out Strength Upgrade Name when Disabled + // Do not Grey Out Strength Upgrade Name when Enabled + // This needs to be outside the previous block since otherwise the nameColorSet is cleared to 0 by other menu pages when toggling + if ((pauseCtx->pageIndex == PAUSE_EQUIP) && (pauseCtx->cursorX[PAUSE_EQUIP] == 0) && + (pauseCtx->cursorY[PAUSE_EQUIP] == 2) && CVarGetInteger("gToggleStrength", 0)) { + if (CVarGetInteger("gStrengthDisabled", 0)) { + pauseCtx->nameColorSet = 1; + } else { + pauseCtx->nameColorSet = 0; + } + } + for (rowStart = 0, i = 0, point = 4; i < 4; i++, rowStart += 4, point += 16) { for (k = 0, temp = rowStart + 1, bit = rowStart, j = point; k < 3; k++, bit++, j += 4, temp++) {