Added DPad support to file selection and pause screens
This commit is contained in:
parent
8a565f910a
commit
9f9a0e2f51
|
@ -237,10 +237,10 @@ void FileChoose_UpdateMainMenu(GameState* thisx) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (ABS(this->stickRelY) > 30) {
|
||||
if ((ABS(this->stickRelY) > 30) || CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
|
||||
if (this->stickRelY > 30) {
|
||||
if ((this->stickRelY > 30) || CHECK_BTN_ALL(input->press.button, BTN_DUP)) {
|
||||
this->buttonIndex--;
|
||||
if (this->buttonIndex < FS_BTN_MAIN_FILE_1) {
|
||||
this->buttonIndex = FS_BTN_MAIN_OPTIONS;
|
||||
|
@ -1332,7 +1332,7 @@ void FileChoose_ConfirmFile(GameState* thisx) {
|
|||
} else if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CLOSE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->selectMode++;
|
||||
} else if (ABS(this->stickRelY) >= 30) {
|
||||
} else if ((ABS(this->stickRelY) >= 30) || CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->confirmButtonIndex ^= 1;
|
||||
}
|
||||
|
|
|
@ -82,10 +82,10 @@ void FileChoose_SelectCopySource(GameState* thisx) {
|
|||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
}
|
||||
} else {
|
||||
if (ABS(this->stickRelY) >= 30) {
|
||||
if ((ABS(this->stickRelY) >= 30) || CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
|
||||
if (this->stickRelY >= 30) {
|
||||
if ((this->stickRelY >= 30) || CHECK_BTN_ALL(input->press.button, BTN_DUP)) {
|
||||
this->buttonIndex--;
|
||||
|
||||
if (this->buttonIndex < FS_BTN_COPY_FILE_1) {
|
||||
|
@ -194,10 +194,10 @@ void FileChoose_SelectCopyDest(GameState* thisx) {
|
|||
}
|
||||
} else {
|
||||
|
||||
if (ABS(this->stickRelY) >= 30) {
|
||||
if ((ABS(this->stickRelY) >= 30) || CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
|
||||
if (this->stickRelY >= 30) {
|
||||
if ((this->stickRelY >= 30) || CHECK_BTN_ALL(input->press.button, BTN_DUP)) {
|
||||
this->buttonIndex--;
|
||||
|
||||
if ((this->buttonIndex == this->selectedFileIndex)) {
|
||||
|
@ -377,7 +377,7 @@ void FileChoose_CopyConfirm(GameState* thisx) {
|
|||
this->configMode = CM_COPY_ANIM_1;
|
||||
func_800AA000(300.0f, 0xB4, 0x14, 0x64);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
} else if (ABS(this->stickRelY) >= 30) {
|
||||
} else if ((ABS(this->stickRelY) >= 30) || CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->buttonIndex ^= 1;
|
||||
}
|
||||
|
@ -700,10 +700,10 @@ void FileChoose_EraseSelect(GameState* thisx) {
|
|||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
}
|
||||
} else {
|
||||
if (ABS(this->stickRelY) >= 30) {
|
||||
if ((ABS(this->stickRelY) >= 30) || CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
|
||||
if (this->stickRelY >= 30) {
|
||||
if ((this->stickRelY >= 30) || CHECK_BTN_ALL(input->press.button, BTN_DUP)) {
|
||||
this->buttonIndex--;
|
||||
if (this->buttonIndex < FS_BTN_ERASE_FILE_1) {
|
||||
this->buttonIndex = FS_BTN_ERASE_QUIT;
|
||||
|
@ -833,7 +833,7 @@ void FileChoose_EraseConfirm(GameState* thisx) {
|
|||
this->nextTitleLabel = FS_TITLE_ERASE_COMPLETE;
|
||||
func_800AA000(200.0f, 0xFF, 0x14, 0x96);
|
||||
sEraseDelayTimer = 15;
|
||||
} else if (ABS(this->stickRelY) >= 30) {
|
||||
} else if ((ABS(this->stickRelY) >= 30) || CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->buttonIndex ^= 1;
|
||||
}
|
||||
|
|
|
@ -509,12 +509,13 @@ void FileChoose_StartNameEntry(GameState* thisx) {
|
|||
*/
|
||||
void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
s16 prevKbdX;
|
||||
|
||||
this->kbdButton = 99;
|
||||
|
||||
if (this->kbdY != 5) {
|
||||
if (this->stickRelX < -30) {
|
||||
if ((this->stickRelX < -30) || CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->charIndex--;
|
||||
this->kbdX--;
|
||||
|
@ -522,7 +523,7 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
|
|||
this->kbdX = 12;
|
||||
this->charIndex = (this->kbdY * 13) + this->kbdX;
|
||||
}
|
||||
} else if (this->stickRelX > 30) {
|
||||
} else if ((this->stickRelX > 30) || CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->charIndex++;
|
||||
this->kbdX++;
|
||||
|
@ -532,13 +533,13 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (this->stickRelX < -30) {
|
||||
if ((this->stickRelX < -30) || CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->kbdX--;
|
||||
if (this->kbdX < 3) {
|
||||
this->kbdX = 4;
|
||||
}
|
||||
} else if (this->stickRelX > 30) {
|
||||
} else if ((this->stickRelX > 30) || CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->kbdX++;
|
||||
if (this->kbdX > 4) {
|
||||
|
@ -547,7 +548,7 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (this->stickRelY > 30) {
|
||||
if ((this->stickRelY > 30) || CHECK_BTN_ALL(input->press.button, BTN_DUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->kbdY--;
|
||||
|
||||
|
@ -578,7 +579,7 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
|
|||
this->charIndex += this->kbdX;
|
||||
}
|
||||
}
|
||||
} else if (this->stickRelY < -30) {
|
||||
} else if ((this->stickRelY < -30) || CHECK_BTN_ALL(input->press.button, BTN_DDOWN)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
this->kbdY++;
|
||||
|
||||
|
@ -675,7 +676,7 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (this->stickRelX < -30) {
|
||||
if ((this->stickRelX < -30) || CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
|
||||
if (sSelectedSetting == FS_SETTING_AUDIO) {
|
||||
|
@ -688,7 +689,7 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) {
|
|||
} else {
|
||||
gSaveContext.zTargetSetting ^= 1;
|
||||
}
|
||||
} else if (this->stickRelX > 30) {
|
||||
} else if ((this->stickRelX > 30) || CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
|
||||
if (sSelectedSetting == FS_SETTING_AUDIO) {
|
||||
|
@ -702,7 +703,7 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((this->stickRelY < -30) || (this->stickRelY > 30)) {
|
||||
if ((ABS(this->stickRelY) > 30) || CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
sSelectedSetting ^= 1;
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
|
||||
|
|
|
@ -83,13 +83,10 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
|
|||
|
||||
if (pauseCtx->cursorSpecialPos == 0) {
|
||||
pauseCtx->nameColorSet = 0;
|
||||
|
||||
if ((pauseCtx->state != 6) || ((pauseCtx->stickRelX == 0) && (pauseCtx->stickRelY == 0))) {
|
||||
sp216 = pauseCtx->cursorSlot[PAUSE_QUEST];
|
||||
} else {
|
||||
phi_s3 = pauseCtx->cursorPoint[PAUSE_QUEST];
|
||||
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if ((pauseCtx->stickRelX < -30) || CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
phi_s0 = D_8082A1AC[phi_s3][2];
|
||||
if (phi_s0 == -3) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(globalCtx, PAUSE_CURSOR_PAGE_LEFT);
|
||||
|
@ -102,7 +99,7 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
|
|||
phi_s0 = D_8082A1AC[phi_s0][2];
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->stickRelX > 30) {
|
||||
} else if ((pauseCtx->stickRelX > 30) || CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
|
||||
phi_s0 = D_8082A1AC[phi_s3][3];
|
||||
if (phi_s0 == -2) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(globalCtx, PAUSE_CURSOR_PAGE_RIGHT);
|
||||
|
@ -117,7 +114,7 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
|
|||
}
|
||||
}
|
||||
|
||||
if (pauseCtx->stickRelY < -30) {
|
||||
if ((pauseCtx->stickRelY < -30) || CHECK_BTN_ALL(input->press.button, BTN_DDOWN)) {
|
||||
phi_s0 = D_8082A1AC[phi_s3][1];
|
||||
while (phi_s0 >= 0) {
|
||||
if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
|
||||
|
@ -125,7 +122,7 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
|
|||
}
|
||||
phi_s0 = D_8082A1AC[phi_s0][1];
|
||||
}
|
||||
} else if (pauseCtx->stickRelY > 30) {
|
||||
} else if ((pauseCtx->stickRelY > 30) || CHECK_BTN_ALL(input->press.button, BTN_DUP)) {
|
||||
phi_s0 = D_8082A1AC[phi_s3][0];
|
||||
while (phi_s0 >= 0) {
|
||||
if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
|
||||
|
@ -171,7 +168,6 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
|
|||
sp216 = pauseCtx->cursorPoint[PAUSE_QUEST];
|
||||
pauseCtx->cursorItem[pauseCtx->pageIndex] = phi_s0_2;
|
||||
pauseCtx->cursorSlot[pauseCtx->pageIndex] = sp216;
|
||||
}
|
||||
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, sp216 * 4, pauseCtx->questVtx);
|
||||
|
||||
|
@ -215,7 +211,7 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
|
|||
}
|
||||
}
|
||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if ((pauseCtx->stickRelX > 30) || CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
|
||||
pauseCtx->cursorPoint[PAUSE_QUEST] = 0x15;
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
@ -232,7 +228,7 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
|
|||
pauseCtx->cursorSlot[pauseCtx->pageIndex] = sp216;
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if ((pauseCtx->stickRelX < -30) || CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
pauseCtx->cursorPoint[PAUSE_QUEST] = 0;
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
|
|
@ -174,7 +174,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
|||
|
||||
cursorMoveResult = 0;
|
||||
while (cursorMoveResult == 0) {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if ((pauseCtx->stickRelX < -30) || CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
if (pauseCtx->cursorX[PAUSE_EQUIP] != 0) {
|
||||
pauseCtx->cursorX[PAUSE_EQUIP] -= 1;
|
||||
pauseCtx->cursorPoint[PAUSE_EQUIP] -= 1;
|
||||
|
@ -216,7 +216,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
|||
cursorMoveResult = 3;
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->stickRelX > 30) {
|
||||
} else if ((pauseCtx->stickRelX > 30) || CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
|
||||
if (pauseCtx->cursorX[PAUSE_EQUIP] < 3) {
|
||||
pauseCtx->cursorX[PAUSE_EQUIP] += 1;
|
||||
pauseCtx->cursorPoint[PAUSE_EQUIP] += 1;
|
||||
|
@ -264,7 +264,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
|||
|
||||
cursorMoveResult = 0;
|
||||
while (cursorMoveResult == 0) {
|
||||
if (pauseCtx->stickRelY > 30) {
|
||||
if ((pauseCtx->stickRelY > 30) || CHECK_BTN_ALL(input->press.button, BTN_DUP)) {
|
||||
if (pauseCtx->cursorY[PAUSE_EQUIP] != 0) {
|
||||
pauseCtx->cursorY[PAUSE_EQUIP] -= 1;
|
||||
pauseCtx->cursorPoint[PAUSE_EQUIP] -= 4;
|
||||
|
@ -286,7 +286,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
|||
pauseCtx->cursorPoint[PAUSE_EQUIP] = cursorPoint;
|
||||
cursorMoveResult = 3;
|
||||
}
|
||||
} else if (pauseCtx->stickRelY < -30) {
|
||||
} else if ((pauseCtx->stickRelY < -30) || CHECK_BTN_ALL(input->press.button, BTN_DDOWN)) {
|
||||
if (pauseCtx->cursorY[PAUSE_EQUIP] < 3) {
|
||||
pauseCtx->cursorY[PAUSE_EQUIP] += 1;
|
||||
pauseCtx->cursorPoint[PAUSE_EQUIP] += 4;
|
||||
|
@ -309,7 +309,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if ((pauseCtx->stickRelX > 30) || CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
||||
|
@ -356,7 +356,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if ((pauseCtx->stickRelX < -30) || CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
|
|
|
@ -120,7 +120,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
|
|||
pauseCtx->stickRelX = 40;
|
||||
}
|
||||
|
||||
if (ABS(pauseCtx->stickRelX) > 30) {
|
||||
if ((ABS(pauseCtx->stickRelX) > 30) || CHECK_BTN_ANY(input->press.button, BTN_DLEFT | BTN_DRIGHT)) {
|
||||
cursorPoint = pauseCtx->cursorPoint[PAUSE_ITEM];
|
||||
cursorX = pauseCtx->cursorX[PAUSE_ITEM];
|
||||
cursorY = pauseCtx->cursorY[PAUSE_ITEM];
|
||||
|
@ -132,7 +132,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
|
|||
if (gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]]) {}
|
||||
|
||||
while (moveCursorResult == 0) {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if ((pauseCtx->stickRelX < -30) || CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
if (pauseCtx->cursorX[PAUSE_ITEM] != 0) {
|
||||
pauseCtx->cursorX[PAUSE_ITEM] -= 1;
|
||||
pauseCtx->cursorPoint[PAUSE_ITEM] -= 1;
|
||||
|
@ -164,7 +164,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
|
|||
moveCursorResult = 2;
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->stickRelX > 30) {
|
||||
} else if ((pauseCtx->stickRelX > 30) || CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
|
||||
if (pauseCtx->cursorX[PAUSE_ITEM] < 5) {
|
||||
pauseCtx->cursorX[PAUSE_ITEM] += 1;
|
||||
pauseCtx->cursorPoint[PAUSE_ITEM] += 1;
|
||||
|
@ -208,7 +208,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
|
|||
cursorItem, pauseCtx->cursorSpecialPos);
|
||||
}
|
||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if ((pauseCtx->stickRelX > 30) || CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
||||
|
@ -242,7 +242,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if ((pauseCtx->stickRelX < -30) || CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
||||
|
@ -280,13 +280,13 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
|
|||
|
||||
if (pauseCtx->cursorSpecialPos == 0) {
|
||||
if (cursorItem != PAUSE_ITEM_NONE) {
|
||||
if (ABS(pauseCtx->stickRelY) > 30) {
|
||||
if ((ABS(pauseCtx->stickRelY) > 30) || CHECK_BTN_ANY(input->press.button, BTN_DDOWN | BTN_DUP)) {
|
||||
moveCursorResult = 0;
|
||||
|
||||
cursorPoint = pauseCtx->cursorPoint[PAUSE_ITEM];
|
||||
cursorY = pauseCtx->cursorY[PAUSE_ITEM];
|
||||
while (moveCursorResult == 0) {
|
||||
if (pauseCtx->stickRelY > 30) {
|
||||
if ((pauseCtx->stickRelY > 30) || CHECK_BTN_ALL(input->press.button, BTN_DUP)) {
|
||||
if (pauseCtx->cursorY[PAUSE_ITEM] != 0) {
|
||||
pauseCtx->cursorY[PAUSE_ITEM] -= 1;
|
||||
pauseCtx->cursorPoint[PAUSE_ITEM] -= 6;
|
||||
|
@ -300,7 +300,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
|
|||
|
||||
moveCursorResult = 2;
|
||||
}
|
||||
} else if (pauseCtx->stickRelY < -30) {
|
||||
} else if ((pauseCtx->stickRelY < -30) || CHECK_BTN_ALL(input->press.button, BTN_DDOWN)) {
|
||||
if (pauseCtx->cursorY[PAUSE_ITEM] < 3) {
|
||||
pauseCtx->cursorY[PAUSE_ITEM] += 1;
|
||||
pauseCtx->cursorPoint[PAUSE_ITEM] += 6;
|
||||
|
|
|
@ -36,6 +36,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
|||
static u16 mapBgPulseStage = 0;
|
||||
InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx;
|
||||
PauseContext* pauseCtx = &globalCtx->pauseCtx;
|
||||
Input* input = &globalCtx->state.input[0];
|
||||
s16 i;
|
||||
s16 j;
|
||||
s16 oldCursorPoint;
|
||||
|
@ -51,7 +52,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
|||
oldCursorPoint = pauseCtx->cursorPoint[PAUSE_MAP];
|
||||
|
||||
if (pauseCtx->cursorSpecialPos == 0) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if ((pauseCtx->stickRelX > 30) || CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
|
||||
if (pauseCtx->cursorX[PAUSE_MAP] != 0) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(globalCtx, PAUSE_CURSOR_PAGE_RIGHT);
|
||||
} else {
|
||||
|
@ -67,7 +68,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->stickRelX < -30) {
|
||||
} else if ((pauseCtx->stickRelX < -30) || CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
if (pauseCtx->cursorX[PAUSE_MAP] == 0) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(globalCtx, PAUSE_CURSOR_PAGE_LEFT);
|
||||
} else {
|
||||
|
@ -82,7 +83,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
|||
}
|
||||
|
||||
if (pauseCtx->cursorPoint[PAUSE_MAP] < 3) {
|
||||
if (pauseCtx->stickRelY > 30) {
|
||||
if ((pauseCtx->stickRelY > 30) || CHECK_BTN_ALL(input->press.button, BTN_DUP)) {
|
||||
if (pauseCtx->cursorPoint[PAUSE_MAP] != 0) {
|
||||
for (i = pauseCtx->cursorPoint[PAUSE_MAP] - 1; i >= 0; i--) {
|
||||
if (CHECK_DUNGEON_ITEM(i, gSaveContext.mapIndex)) {
|
||||
|
@ -92,7 +93,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelY < -30) {
|
||||
if ((pauseCtx->stickRelY < -30) || CHECK_BTN_ALL(input->press.button, BTN_DDOWN)) {
|
||||
if (pauseCtx->cursorPoint[PAUSE_MAP] != 2) {
|
||||
for (i = pauseCtx->cursorPoint[PAUSE_MAP] + 1; i < 3; i++) {
|
||||
if (CHECK_DUNGEON_ITEM(i, gSaveContext.mapIndex)) {
|
||||
|
@ -104,7 +105,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelY > 30) {
|
||||
if ((pauseCtx->stickRelY > 30) || CHECK_BTN_ALL(input->press.button, BTN_DUP)) {
|
||||
if (pauseCtx->cursorPoint[PAUSE_MAP] >= 4) {
|
||||
for (i = pauseCtx->cursorPoint[PAUSE_MAP] - 3 - 1; i >= 0; i--) {
|
||||
if ((gSaveContext.sceneFlags[gSaveContext.mapIndex].floors & gBitFlags[i]) ||
|
||||
|
@ -115,7 +116,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->stickRelY < -30) {
|
||||
} else if ((pauseCtx->stickRelY < -30) || CHECK_BTN_ALL(input->press.button, BTN_DDOWN)) {
|
||||
if (pauseCtx->cursorPoint[PAUSE_MAP] != 10) {
|
||||
for (i = pauseCtx->cursorPoint[PAUSE_MAP] - 3 + 1; i < 11; i++) {
|
||||
if ((gSaveContext.sceneFlags[gSaveContext.mapIndex].floors & gBitFlags[i]) ||
|
||||
|
@ -138,7 +139,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
|||
}
|
||||
}
|
||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if ((pauseCtx->stickRelX > 30) || CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->dungeonMapSlot;
|
||||
|
@ -148,7 +149,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
|||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if ((pauseCtx->stickRelX < -30) || CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
pauseCtx->cursorX[PAUSE_MAP] = 1;
|
||||
|
@ -396,6 +397,7 @@ void KaleidoScope_DrawWorldMap(GlobalContext* globalCtx, GraphicsContext* gfxCtx
|
|||
};
|
||||
static u16 D_8082A6D4 = 0;
|
||||
PauseContext* pauseCtx = &globalCtx->pauseCtx;
|
||||
Input* input = &globalCtx->state.input[0];
|
||||
s16 i;
|
||||
s16 j;
|
||||
s16 t;
|
||||
|
@ -412,7 +414,7 @@ void KaleidoScope_DrawWorldMap(GlobalContext* globalCtx, GraphicsContext* gfxCtx
|
|||
oldCursorPoint = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
||||
|
||||
if (pauseCtx->cursorSpecialPos == 0) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if ((pauseCtx->stickRelX > 30) || CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
|
||||
D_8082A6D4 = 0;
|
||||
|
||||
do {
|
||||
|
@ -423,7 +425,7 @@ void KaleidoScope_DrawWorldMap(GlobalContext* globalCtx, GraphicsContext* gfxCtx
|
|||
break;
|
||||
}
|
||||
} while (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] == 0);
|
||||
} else if (pauseCtx->stickRelX < -30) {
|
||||
} else if ((pauseCtx->stickRelX < -30) || CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
D_8082A6D4 = 0;
|
||||
|
||||
do {
|
||||
|
@ -444,7 +446,7 @@ void KaleidoScope_DrawWorldMap(GlobalContext* globalCtx, GraphicsContext* gfxCtx
|
|||
} else {
|
||||
pauseCtx->cursorItem[PAUSE_MAP] = gSaveContext.worldMapArea + 0x18;
|
||||
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if ((pauseCtx->stickRelX > 30) || CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
|
||||
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
||||
|
@ -459,7 +461,7 @@ void KaleidoScope_DrawWorldMap(GlobalContext* globalCtx, GraphicsContext* gfxCtx
|
|||
D_8082A6D4 = 0;
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if ((pauseCtx->stickRelX < -30) || CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 11;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
||||
|
@ -663,7 +665,7 @@ void KaleidoScope_DrawWorldMap(GlobalContext* globalCtx, GraphicsContext* gfxCtx
|
|||
gDPLoadTextureBlock(POLY_KAL_DISP++, gWorldMapDotTex, G_IM_FMT_IA, G_IM_SIZ_8b, 8, 8, 0, G_TX_WRAP | G_TX_NOMIRROR,
|
||||
G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
|
||||
for (j = i = 0; i < 12; i++, t++, j += 4) {
|
||||
for (j = t = i = 0; i < 12; i++, t++, j += 4) {
|
||||
if (pauseCtx->worldMapPoints[i] != 0) {
|
||||
gDPPipeSync(POLY_KAL_DISP++);
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@ void KaleidoScope_UpdatePrompt(GlobalContext* globalCtx) {
|
|||
s16 step;
|
||||
|
||||
if (((pauseCtx->state == 7) && (pauseCtx->unk_1EC == 1)) || (pauseCtx->state == 0xE) || (pauseCtx->state == 0x10)) {
|
||||
if ((pauseCtx->promptChoice == 0) && (relStickX >= 30)) {
|
||||
if ((pauseCtx->promptChoice == 0) && ((relStickX >= 30) || CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
pauseCtx->promptChoice = 4;
|
||||
} else if ((pauseCtx->promptChoice != 0) && (relStickX <= -30)) {
|
||||
} else if ((pauseCtx->promptChoice != 0) && ((relStickX <= -30) || CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
pauseCtx->promptChoice = 0;
|
||||
}
|
||||
|
|
|
@ -967,7 +967,7 @@ void KaleidoScope_HandlePageToggles(PauseContext* pauseCtx, Input* input) {
|
|||
}
|
||||
|
||||
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if ((pauseCtx->stickRelX < -30) || CHECK_BTN_ALL(input->press.button, BTN_DLEFT)) {
|
||||
pauseCtx->pageSwitchTimer++;
|
||||
if ((pauseCtx->pageSwitchTimer >= 10) || (pauseCtx->pageSwitchTimer == 0)) {
|
||||
KaleidoScope_SwitchPage(pauseCtx, 0);
|
||||
|
@ -976,7 +976,7 @@ void KaleidoScope_HandlePageToggles(PauseContext* pauseCtx, Input* input) {
|
|||
pauseCtx->pageSwitchTimer = -1;
|
||||
}
|
||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_RIGHT) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if ((pauseCtx->stickRelX > 30) || CHECK_BTN_ALL(input->press.button, BTN_DRIGHT)) {
|
||||
pauseCtx->pageSwitchTimer++;
|
||||
if ((pauseCtx->pageSwitchTimer >= 10) || (pauseCtx->pageSwitchTimer == 0)) {
|
||||
KaleidoScope_SwitchPage(pauseCtx, 2);
|
||||
|
|
Loading…
Reference in New Issue