mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 22:03:36 -07:00
Fix dpad navigation on Quest Status pause screen. (#5607)
This commit is contained in:
parent
afde504a0f
commit
4676242086
1 changed files with 17 additions and 7 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue