Equipment upgrade text fix and any pause slot enhancement fix (#620)

* Fix upgrade name text not rendering

* Use cvar and don't render equip help for empty item slots

* Fix rendering logic

* Fix incorrect item name rendered for one frame

* Reorder comparison

* Remove extra indent

* Remove accidental changes
This commit is contained in:
Sirius902 2022-07-08 20:06:11 -07:00 committed by GitHub
parent 4371b58223
commit 42383a1fe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1817,13 +1817,8 @@ void KaleidoScope_DrawInfoPanel(GlobalContext* globalCtx) {
} else {
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 255, 255, 255, 255);
}
//TOOD CVAR
if (((CHECK_OWNED_EQUIP(pauseCtx->cursorY[PAUSE_EQUIP], pauseCtx->cursorX[PAUSE_EQUIP] - 1)) ||
(pauseCtx->pageIndex != PAUSE_EQUIP) && (pauseCtx->cursorX[PAUSE_EQUIP] != 0)) && (pauseCtx->pageIndex != PAUSE_ITEM ||
(gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] != ITEM_NONE))) {
POLY_KAL_DISP = KaleidoScope_QuadTextureIA4(POLY_KAL_DISP, pauseCtx->nameSegment, 128, 16, 0);
}
POLY_KAL_DISP = KaleidoScope_QuadTextureIA4(POLY_KAL_DISP, pauseCtx->nameSegment, 128, 16, 0);
}
if (pauseCtx->pageIndex == PAUSE_MAP && CVar_GetS32("gDebugEnabled", 0) != 0) {
@ -1929,7 +1924,7 @@ void KaleidoScope_DrawInfoPanel(GlobalContext* globalCtx) {
}
}
} else {
if (!pauseCtx->pageIndex) { // pageIndex == PAUSE_ITEM
if (!pauseCtx->pageIndex && (!CVar_GetS32("gPauseAnyCursor", 0) || (gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] != ITEM_NONE))) { // pageIndex == PAUSE_ITEM
pauseCtx->infoPanelVtx[16].v.ob[0] = pauseCtx->infoPanelVtx[18].v.ob[0] =
WREG(49 + gSaveContext.language);
@ -2098,6 +2093,12 @@ void KaleidoScope_UpdateNamePanel(GlobalContext* globalCtx) {
osCreateMesgQueue(&pauseCtx->loadQueue, &pauseCtx->loadMsg, 1);
if (CVar_GetS32("gPauseAnyCursor", 0) &&
((pauseCtx->pageIndex == PAUSE_EQUIP && pauseCtx->cursorX[PAUSE_EQUIP] != 0 && !CHECK_OWNED_EQUIP(pauseCtx->cursorY[PAUSE_EQUIP], pauseCtx->cursorX[PAUSE_EQUIP] - 1)) ||
(pauseCtx->pageIndex == PAUSE_ITEM && gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] == ITEM_NONE))) {
pauseCtx->namedItem = PAUSE_ITEM_NONE;
}
if (pauseCtx->namedItem != PAUSE_ITEM_NONE) {
if ((pauseCtx->pageIndex == PAUSE_MAP) && !sInDungeonScene) {
if (gSaveContext.language) {