Fix dpad navigation on Quest Status pause screen. (#5607)

This commit is contained in:
Malkierian 2025-06-23 16:02:04 -07:00 committed by GitHub
commit 4676242086
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -124,7 +124,17 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
s16 pad2; s16 pad2;
s16 phi_s0_2; s16 phi_s0_2;
s16 sp208[3]; s16 sp208[3];
bool dpad = CVarGetInteger(CVAR_SETTING("DPadOnPause"), 0); if (CVarGetInteger(CVAR_SETTING("DPadOnPause"), 0)) {
if (CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
pauseCtx->stickRelX = -35;
} else if (CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
pauseCtx->stickRelX = 35;
} else if (CHECK_BTN_ALL(input->press.button, BTN_DDOWN)) {
pauseCtx->stickRelY = -35;
} else if (CHECK_BTN_ALL(input->press.button, BTN_DUP)) {
pauseCtx->stickRelY = 35;
}
}
OPEN_DISPS(gfxCtx); OPEN_DISPS(gfxCtx);
@ -140,7 +150,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
} else { } else {
phi_s3 = pauseCtx->cursorPoint[PAUSE_QUEST]; phi_s3 = pauseCtx->cursorPoint[PAUSE_QUEST];
if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { if ((pauseCtx->stickRelX < -30)) {
phi_s0 = D_8082A1AC[phi_s3][2]; phi_s0 = D_8082A1AC[phi_s3][2];
if (phi_s0 == -3) { if (phi_s0 == -3) {
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_LEFT); KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_LEFT);
@ -153,7 +163,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
phi_s0 = D_8082A1AC[phi_s0][2]; phi_s0 = D_8082A1AC[phi_s0][2];
} }
} }
} else if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { } else if ((pauseCtx->stickRelX > 30)) {
phi_s0 = D_8082A1AC[phi_s3][3]; phi_s0 = D_8082A1AC[phi_s3][3];
if (phi_s0 == -2) { if (phi_s0 == -2) {
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_RIGHT); KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_RIGHT);
@ -168,7 +178,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
} }
} }
if ((pauseCtx->stickRelY < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DDOWN))) { if ((pauseCtx->stickRelY < -30)) {
phi_s0 = D_8082A1AC[phi_s3][1]; phi_s0 = D_8082A1AC[phi_s3][1];
while (phi_s0 >= 0) { while (phi_s0 >= 0) {
if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) { if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
@ -176,7 +186,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
} }
phi_s0 = D_8082A1AC[phi_s0][1]; phi_s0 = D_8082A1AC[phi_s0][1];
} }
} else if ((pauseCtx->stickRelY > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) { } else if ((pauseCtx->stickRelY > 30)) {
phi_s0 = D_8082A1AC[phi_s3][0]; phi_s0 = D_8082A1AC[phi_s3][0];
while (phi_s0 >= 0) { while (phi_s0 >= 0) {
if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) { if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
@ -267,7 +277,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
} }
} }
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) { } else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) { if ((pauseCtx->stickRelX > 30)) {
pauseCtx->cursorPoint[PAUSE_QUEST] = 0x15; pauseCtx->cursorPoint[PAUSE_QUEST] = 0x15;
pauseCtx->nameDisplayTimer = 0; pauseCtx->nameDisplayTimer = 0;
pauseCtx->cursorSpecialPos = 0; pauseCtx->cursorSpecialPos = 0;
@ -285,7 +295,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->cursorSlot[pauseCtx->pageIndex] = sp216; pauseCtx->cursorSlot[pauseCtx->pageIndex] = sp216;
} }
} else { } else {
if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) { if ((pauseCtx->stickRelX < -30)) {
pauseCtx->cursorPoint[PAUSE_QUEST] = 0; pauseCtx->cursorPoint[PAUSE_QUEST] = 0;
pauseCtx->nameDisplayTimer = 0; pauseCtx->nameDisplayTimer = 0;
pauseCtx->cursorSpecialPos = 0; pauseCtx->cursorSpecialPos = 0;