mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 21:33:40 -07:00
Change gPauseAnyCursor into combobox (#2423)
* Change gPauseAnyCursor into combobox * Add enums * Change naming
This commit is contained in:
parent
4e08eca1b9
commit
612700c2ab
6 changed files with 33 additions and 14 deletions
|
@ -177,6 +177,8 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
|||
s16 cursorY;
|
||||
s16 oldCursorPoint;
|
||||
bool dpad = (CVarGetInteger("gDpadPause", 0) && !CHECK_BTN_ALL(input->cur.button, BTN_CUP));
|
||||
bool pauseAnyCursor = (CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && gSaveContext.n64ddFlag) ||
|
||||
(CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_ALWAYS_ON);
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
|
@ -226,7 +228,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
|||
cursorMoveResult = 1;
|
||||
}
|
||||
}
|
||||
} else if ((gBitFlags[pauseCtx->cursorPoint[PAUSE_EQUIP] - 1] & gSaveContext.inventory.equipment) || CVarGetInteger("gPauseAnyCursor", 0)) {
|
||||
} else if ((gBitFlags[pauseCtx->cursorPoint[PAUSE_EQUIP] - 1] & gSaveContext.inventory.equipment) || pauseAnyCursor) {
|
||||
cursorMoveResult = 2;
|
||||
}
|
||||
} else {
|
||||
|
@ -260,7 +262,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
|||
if (CUR_UPG_VALUE(pauseCtx->cursorY[PAUSE_EQUIP]) != 0) {
|
||||
cursorMoveResult = 1;
|
||||
}
|
||||
} else if ((gBitFlags[pauseCtx->cursorPoint[PAUSE_EQUIP] - 1] & gSaveContext.inventory.equipment) || CVarGetInteger("gPauseAnyCursor", 0)) {
|
||||
} else if ((gBitFlags[pauseCtx->cursorPoint[PAUSE_EQUIP] - 1] & gSaveContext.inventory.equipment) || pauseAnyCursor) {
|
||||
cursorMoveResult = 2;
|
||||
}
|
||||
} else {
|
||||
|
@ -311,7 +313,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
|||
cursorMoveResult = 1;
|
||||
}
|
||||
} else if ((gBitFlags[pauseCtx->cursorPoint[PAUSE_EQUIP] - 1] &
|
||||
gSaveContext.inventory.equipment) || CVarGetInteger("gPauseAnyCursor", 0)) {
|
||||
gSaveContext.inventory.equipment) || pauseAnyCursor) {
|
||||
cursorMoveResult = 2;
|
||||
}
|
||||
} else {
|
||||
|
@ -329,7 +331,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
|||
cursorMoveResult = 1;
|
||||
}
|
||||
} else if ((gBitFlags[pauseCtx->cursorPoint[PAUSE_EQUIP] - 1] &
|
||||
gSaveContext.inventory.equipment) || CVarGetInteger("gPauseAnyCursor", 0)) {
|
||||
gSaveContext.inventory.equipment) || pauseAnyCursor) {
|
||||
cursorMoveResult = 2;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -101,6 +101,8 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
|||
s16 oldCursorPoint;
|
||||
s16 moveCursorResult;
|
||||
bool dpad = (CVarGetInteger("gDpadPause", 0) && !CHECK_BTN_ALL(input->cur.button, BTN_CUP));
|
||||
bool pauseAnyCursor = (CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && gSaveContext.n64ddFlag) ||
|
||||
(CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_ALWAYS_ON);
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
|
@ -142,7 +144,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
|||
pauseCtx->cursorX[PAUSE_ITEM] -= 1;
|
||||
pauseCtx->cursorPoint[PAUSE_ITEM] -= 1;
|
||||
if ((gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] != ITEM_NONE) ||
|
||||
CVarGetInteger("gPauseAnyCursor", 0)) {
|
||||
pauseAnyCursor) {
|
||||
moveCursorResult = 1;
|
||||
}
|
||||
} else {
|
||||
|
@ -174,7 +176,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
|||
pauseCtx->cursorX[PAUSE_ITEM] += 1;
|
||||
pauseCtx->cursorPoint[PAUSE_ITEM] += 1;
|
||||
if ((gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] != ITEM_NONE) ||
|
||||
CVarGetInteger("gPauseAnyCursor", 0)) {
|
||||
pauseAnyCursor) {
|
||||
moveCursorResult = 1;
|
||||
}
|
||||
} else {
|
||||
|
@ -296,7 +298,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
|||
pauseCtx->cursorY[PAUSE_ITEM] -= 1;
|
||||
pauseCtx->cursorPoint[PAUSE_ITEM] -= 6;
|
||||
if ((gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] != ITEM_NONE) ||
|
||||
CVarGetInteger("gPauseAnyCursor", 0)) {
|
||||
pauseAnyCursor) {
|
||||
moveCursorResult = 1;
|
||||
}
|
||||
} else {
|
||||
|
@ -310,7 +312,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
|||
pauseCtx->cursorY[PAUSE_ITEM] += 1;
|
||||
pauseCtx->cursorPoint[PAUSE_ITEM] += 6;
|
||||
if ((gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] != ITEM_NONE) ||
|
||||
CVarGetInteger("gPauseAnyCursor", 0)) {
|
||||
pauseAnyCursor) {
|
||||
moveCursorResult = 1;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -1912,7 +1912,10 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (!pauseCtx->pageIndex && (!CVarGetInteger("gPauseAnyCursor", 0) || (gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] != ITEM_NONE))) { // pageIndex == PAUSE_ITEM
|
||||
bool pauseAnyCursor =
|
||||
(CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && gSaveContext.n64ddFlag) ||
|
||||
(CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_ALWAYS_ON);
|
||||
if (!pauseCtx->pageIndex && (!pauseAnyCursor || (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);
|
||||
|
||||
|
@ -2048,6 +2051,8 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
|
|||
void KaleidoScope_UpdateNamePanel(PlayState* play) {
|
||||
PauseContext* pauseCtx = &play->pauseCtx;
|
||||
u16 sp2A;
|
||||
bool pauseAnyCursor = (CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && gSaveContext.n64ddFlag) ||
|
||||
(CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_ALWAYS_ON);
|
||||
|
||||
if ((pauseCtx->namedItem != pauseCtx->cursorItem[pauseCtx->pageIndex]) ||
|
||||
((pauseCtx->pageIndex == PAUSE_MAP) && (pauseCtx->cursorSpecialPos != 0))) {
|
||||
|
@ -2057,7 +2062,7 @@ void KaleidoScope_UpdateNamePanel(PlayState* play) {
|
|||
|
||||
osCreateMesgQueue(&pauseCtx->loadQueue, &pauseCtx->loadMsg, 1);
|
||||
|
||||
if (CVarGetInteger("gPauseAnyCursor", 0) &&
|
||||
if (pauseAnyCursor &&
|
||||
((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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue