mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-21 23:58:51 -05:00
Added DPad support to file selection and pause screens (#124)
* Added DPad support to file selection and pause screens * Wrap changes behind CVar * Fix merge conflict for real * Remove unnecessary const_cast * Fixed transparent texture making framebuffers also transparent in D3D11. (#84) This happened with the Mirror Shield in the inventory screen preview. * Add save editor * Added DPad support to file selection and pause screens * Fixing rebase conflict * Remove unnecessary const_cast Co-authored-by: MaikelChan <maikelchan88@gmail.com> Co-authored-by: rozlette <Rozelette@users.noreply.github.com>
This commit is contained in:
parent
3e8c48c116
commit
06fd7f662a
@ -59,7 +59,7 @@ namespace Game {
|
||||
CVar_SetS32("gPauseLiveLink", Settings.enhancements.animated_pause_menu);
|
||||
|
||||
Settings.enhancements.minimal_ui = stob(Conf[EnhancementSection]["minimal_ui"]);
|
||||
CVar_SetS32(const_cast<char*>("gMinimalUI"), Settings.enhancements.minimal_ui);
|
||||
CVar_SetS32("gMinimalUI", Settings.enhancements.minimal_ui);
|
||||
|
||||
// Audio
|
||||
Settings.audio.master = Ship::stof(Conf[AudioSection]["master"]);
|
||||
@ -89,6 +89,9 @@ namespace Game {
|
||||
|
||||
Settings.controller.input_enabled = stob(Conf[ControllerSection]["input_enabled"]);
|
||||
CVar_SetS32("gInputEnabled", Settings.controller.input_enabled);
|
||||
|
||||
Settings.controller.dpad_pause_name = stob(Conf[ControllerSection]["dpad_pause_name"]);
|
||||
CVar_SetS32("gDpadPauseName", Settings.controller.dpad_pause_name);
|
||||
|
||||
// Cheats
|
||||
Settings.cheats.debug_mode = stob(Conf[CheatSection]["debug_mode"]);
|
||||
@ -149,6 +152,7 @@ namespace Game {
|
||||
Conf[ControllerSection]["rumble_strength"] = std::to_string(Settings.controller.rumble_strength);
|
||||
Conf[ControllerSection]["input_scale"] = std::to_string(Settings.controller.input_scale);
|
||||
Conf[ControllerSection]["input_enabled"] = std::to_string(Settings.controller.input_enabled);
|
||||
Conf[ControllerSection]["dpad_pause_name"] = std::to_string(Settings.controller.dpad_pause_name);
|
||||
|
||||
// Cheats
|
||||
Conf[CheatSection]["debug_mode"] = std::to_string(Settings.cheats.debug_mode);
|
||||
|
@ -34,6 +34,7 @@ struct SoHConfigType {
|
||||
float gyroDriftX = 0.0f;
|
||||
float gyroDriftY = 0.0f;
|
||||
bool input_enabled = false;
|
||||
bool dpad_pause_name = false;
|
||||
} controller;
|
||||
|
||||
// Cheats
|
||||
|
@ -353,6 +353,13 @@ namespace SohImGui {
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::Checkbox("Dpad Support on Pause and File Select", &Game::Settings.controller.dpad_pause_name)) {
|
||||
CVar_SetS32("gDpadPauseName", Game::Settings.controller.dpad_pause_name);
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
@ -367,7 +374,7 @@ namespace SohImGui {
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Minimal UI", &Game::Settings.enhancements.minimal_ui)) {
|
||||
CVar_SetS32(const_cast<char*>("gMinimalUI"), Game::Settings.enhancements.minimal_ui);
|
||||
CVar_SetS32("gMinimalUI", Game::Settings.enhancements.minimal_ui);
|
||||
needs_save = true;
|
||||
}
|
||||
|
||||
|
@ -179,6 +179,7 @@ void FileChoose_UpdateMainMenu(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
SramContext* sramCtx = &this->sramCtx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_START) || CHECK_BTN_ALL(input->press.button, BTN_A)) {
|
||||
if (this->buttonIndex <= FS_BTN_MAIN_FILE_3) {
|
||||
@ -237,10 +238,10 @@ void FileChoose_UpdateMainMenu(GameState* thisx) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (ABS(this->stickRelY) > 30) {
|
||||
if ((ABS(this->stickRelY) > 30) || (dpad && 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) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) {
|
||||
this->buttonIndex--;
|
||||
if (this->buttonIndex < FS_BTN_MAIN_FILE_1) {
|
||||
this->buttonIndex = FS_BTN_MAIN_OPTIONS;
|
||||
@ -1318,6 +1319,7 @@ void FileChoose_FadeInFileInfo(GameState* thisx) {
|
||||
void FileChoose_ConfirmFile(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_START) || (CHECK_BTN_ALL(input->press.button, BTN_A))) {
|
||||
if (this->confirmButtonIndex == FS_BTN_CONFIRM_YES) {
|
||||
@ -1332,7 +1334,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) || (dpad && 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;
|
||||
}
|
||||
|
@ -62,6 +62,7 @@ void FileChoose_SelectCopySource(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
SramContext* sramCtx = &this->sramCtx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
|
||||
if (((this->buttonIndex == FS_BTN_COPY_QUIT) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
@ -82,10 +83,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) || (dpad && 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) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) {
|
||||
this->buttonIndex--;
|
||||
|
||||
if (this->buttonIndex < FS_BTN_COPY_FILE_1) {
|
||||
@ -174,6 +175,7 @@ void FileChoose_SelectCopyDest(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
SramContext* sramCtx = &this->sramCtx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
|
||||
if (((this->buttonIndex == FS_BTN_COPY_QUIT) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
@ -194,10 +196,10 @@ void FileChoose_SelectCopyDest(GameState* thisx) {
|
||||
}
|
||||
} else {
|
||||
|
||||
if (ABS(this->stickRelY) >= 30) {
|
||||
if ((ABS(this->stickRelY) >= 30) || (dpad && 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) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) {
|
||||
this->buttonIndex--;
|
||||
|
||||
if ((this->buttonIndex == this->selectedFileIndex)) {
|
||||
@ -360,6 +362,7 @@ void FileChoose_CopyConfirm(GameState* thisx) {
|
||||
SramContext* sramCtx = &this->sramCtx;
|
||||
Input* input = &this->state.input[0];
|
||||
u16 dayTime;
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
|
||||
if (((this->buttonIndex != FS_BTN_CONFIRM_YES) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
@ -377,7 +380,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) || (dpad && 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;
|
||||
}
|
||||
@ -680,6 +683,7 @@ void FileChoose_EraseSelect(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
SramContext* sramCtx = &this->sramCtx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
|
||||
if (((this->buttonIndex == FS_BTN_COPY_QUIT) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
@ -700,10 +704,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) || (dpad && 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) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DUP))) {
|
||||
this->buttonIndex--;
|
||||
if (this->buttonIndex < FS_BTN_ERASE_FILE_1) {
|
||||
this->buttonIndex = FS_BTN_ERASE_QUIT;
|
||||
@ -817,6 +821,7 @@ void FileChoose_SetupEraseConfirm2(GameState* thisx) {
|
||||
void FileChoose_EraseConfirm(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
|
||||
if (((this->buttonIndex != FS_BTN_CONFIRM_YES) && CHECK_BTN_ANY(input->press.button, BTN_A | BTN_START)) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
@ -833,7 +838,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) || (dpad && 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,14 @@ void FileChoose_StartNameEntry(GameState* thisx) {
|
||||
*/
|
||||
void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
Input* input = &this->state.input[0];
|
||||
s16 prevKbdX;
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
|
||||
this->kbdButton = 99;
|
||||
|
||||
if (this->kbdY != 5) {
|
||||
if (this->stickRelX < -30) {
|
||||
if ((this->stickRelX < -30) || (dpad && 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 +524,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) || (dpad && 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 +534,13 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this->stickRelX < -30) {
|
||||
if ((this->stickRelX < -30) || (dpad && 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) || (dpad && 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 +549,7 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
|
||||
}
|
||||
}
|
||||
|
||||
if (this->stickRelY > 30) {
|
||||
if ((this->stickRelY > 30) || (dpad && 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 +580,7 @@ void FileChoose_UpdateKeyboardCursor(GameState* thisx) {
|
||||
this->charIndex += this->kbdX;
|
||||
}
|
||||
}
|
||||
} else if (this->stickRelY < -30) {
|
||||
} else if ((this->stickRelY < -30) || (dpad && 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++;
|
||||
|
||||
@ -655,6 +657,7 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) {
|
||||
FileChooseContext* this = (FileChooseContext*)thisx;
|
||||
SramContext* sramCtx = &this->sramCtx;
|
||||
Input* input = &this->state.input[0];
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
@ -675,7 +678,7 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->stickRelX < -30) {
|
||||
if ((this->stickRelX < -30) || (dpad && 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 +691,7 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) {
|
||||
} else {
|
||||
gSaveContext.zTargetSetting ^= 1;
|
||||
}
|
||||
} else if (this->stickRelX > 30) {
|
||||
} else if ((this->stickRelX > 30) || (dpad && 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 +705,7 @@ void FileChoose_UpdateOptionsMenu(GameState* thisx) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((this->stickRelY < -30) || (this->stickRelY > 30)) {
|
||||
if ((ABS(this->stickRelY) > 30) || (dpad && 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)) {
|
||||
|
@ -74,6 +74,7 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
|
||||
s16 pad2;
|
||||
s16 phi_s0_2;
|
||||
s16 sp208[3];
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
|
||||
OPEN_DISPS(gfxCtx, "../z_kaleido_collect.c", 248);
|
||||
|
||||
@ -83,96 +84,92 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
|
||||
|
||||
if (pauseCtx->cursorSpecialPos == 0) {
|
||||
pauseCtx->nameColorSet = 0;
|
||||
sp216 = pauseCtx->cursorSlot[PAUSE_QUEST];
|
||||
phi_s3 = pauseCtx->cursorPoint[PAUSE_QUEST];
|
||||
|
||||
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) {
|
||||
phi_s0 = D_8082A1AC[phi_s3][2];
|
||||
if (phi_s0 == -3) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(globalCtx, PAUSE_CURSOR_PAGE_LEFT);
|
||||
pauseCtx->unk_1E4 = 0;
|
||||
} else {
|
||||
while (phi_s0 >= 0) {
|
||||
if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
|
||||
break;
|
||||
}
|
||||
phi_s0 = D_8082A1AC[phi_s0][2];
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->stickRelX > 30) {
|
||||
phi_s0 = D_8082A1AC[phi_s3][3];
|
||||
if (phi_s0 == -2) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(globalCtx, PAUSE_CURSOR_PAGE_RIGHT);
|
||||
pauseCtx->unk_1E4 = 0;
|
||||
} else {
|
||||
while (phi_s0 >= 0) {
|
||||
if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
|
||||
break;
|
||||
}
|
||||
phi_s0 = D_8082A1AC[phi_s0][3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pauseCtx->stickRelY < -30) {
|
||||
phi_s0 = D_8082A1AC[phi_s3][1];
|
||||
while (phi_s0 >= 0) {
|
||||
if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
|
||||
break;
|
||||
}
|
||||
phi_s0 = D_8082A1AC[phi_s0][1];
|
||||
}
|
||||
} else if (pauseCtx->stickRelY > 30) {
|
||||
phi_s0 = D_8082A1AC[phi_s3][0];
|
||||
while (phi_s0 >= 0) {
|
||||
if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
|
||||
break;
|
||||
}
|
||||
phi_s0 = D_8082A1AC[phi_s0][0];
|
||||
}
|
||||
}
|
||||
|
||||
if (phi_s3 != pauseCtx->cursorPoint[PAUSE_QUEST]) {
|
||||
if ((pauseCtx->stickRelX < -30) || (dpad && 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);
|
||||
pauseCtx->unk_1E4 = 0;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
}
|
||||
|
||||
if (pauseCtx->cursorPoint[PAUSE_QUEST] != 0x18) {
|
||||
if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
|
||||
if (pauseCtx->cursorPoint[PAUSE_QUEST] < 6) {
|
||||
phi_s0_2 = pauseCtx->cursorPoint[PAUSE_QUEST] + 0x66;
|
||||
osSyncPrintf("000 ccc=%d\n", phi_s0_2);
|
||||
} else if (pauseCtx->cursorPoint[PAUSE_QUEST] < 0x12) {
|
||||
phi_s0_2 = pauseCtx->cursorPoint[PAUSE_QUEST] + 0x54;
|
||||
osSyncPrintf("111 ccc=%d\n", phi_s0_2);
|
||||
} else {
|
||||
phi_s0_2 = pauseCtx->cursorPoint[PAUSE_QUEST] + 0x5A;
|
||||
osSyncPrintf("222 ccc=%d (%d, %d, %d)\n", phi_s0_2, pauseCtx->cursorPoint[PAUSE_QUEST],
|
||||
0x12, 0x6C);
|
||||
} else {
|
||||
while (phi_s0 >= 0) {
|
||||
if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
|
||||
break;
|
||||
}
|
||||
phi_s0 = D_8082A1AC[phi_s0][2];
|
||||
}
|
||||
}
|
||||
} else if ((pauseCtx->stickRelX > 30) || (dpad && 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);
|
||||
pauseCtx->unk_1E4 = 0;
|
||||
} else {
|
||||
while (phi_s0 >= 0) {
|
||||
if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
|
||||
break;
|
||||
}
|
||||
phi_s0 = D_8082A1AC[phi_s0][3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((pauseCtx->stickRelY < -30) || (dpad && 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) {
|
||||
break;
|
||||
}
|
||||
phi_s0 = D_8082A1AC[phi_s0][1];
|
||||
}
|
||||
} else if ((pauseCtx->stickRelY > 30) || (dpad && 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) {
|
||||
break;
|
||||
}
|
||||
phi_s0 = D_8082A1AC[phi_s0][0];
|
||||
}
|
||||
}
|
||||
|
||||
if (phi_s3 != pauseCtx->cursorPoint[PAUSE_QUEST]) {
|
||||
pauseCtx->unk_1E4 = 0;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_CURSOR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||
}
|
||||
|
||||
if (pauseCtx->cursorPoint[PAUSE_QUEST] != 0x18) {
|
||||
if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
|
||||
if (pauseCtx->cursorPoint[PAUSE_QUEST] < 6) {
|
||||
phi_s0_2 = pauseCtx->cursorPoint[PAUSE_QUEST] + 0x66;
|
||||
osSyncPrintf("000 ccc=%d\n", phi_s0_2);
|
||||
} else if (pauseCtx->cursorPoint[PAUSE_QUEST] < 0x12) {
|
||||
phi_s0_2 = pauseCtx->cursorPoint[PAUSE_QUEST] + 0x54;
|
||||
osSyncPrintf("111 ccc=%d\n", phi_s0_2);
|
||||
} else {
|
||||
phi_s0_2 = PAUSE_ITEM_NONE;
|
||||
osSyncPrintf("999 ccc=%d (%d, %d)\n", PAUSE_ITEM_NONE, pauseCtx->cursorPoint[PAUSE_QUEST],
|
||||
0x18);
|
||||
phi_s0_2 = pauseCtx->cursorPoint[PAUSE_QUEST] + 0x5A;
|
||||
osSyncPrintf("222 ccc=%d (%d, %d, %d)\n", phi_s0_2, pauseCtx->cursorPoint[PAUSE_QUEST],
|
||||
0x12, 0x6C);
|
||||
}
|
||||
} else {
|
||||
if ((gSaveContext.inventory.questItems & 0xF0000000) != 0) {
|
||||
phi_s0_2 = 0x72;
|
||||
} else {
|
||||
phi_s0_2 = PAUSE_ITEM_NONE;
|
||||
}
|
||||
osSyncPrintf("888 ccc=%d (%d, %d, %x)\n", phi_s0_2, pauseCtx->cursorPoint[PAUSE_QUEST], 0x72,
|
||||
gSaveContext.inventory.questItems & 0xF0000000);
|
||||
phi_s0_2 = PAUSE_ITEM_NONE;
|
||||
osSyncPrintf("999 ccc=%d (%d, %d)\n", PAUSE_ITEM_NONE, pauseCtx->cursorPoint[PAUSE_QUEST],
|
||||
0x18);
|
||||
}
|
||||
|
||||
sp216 = pauseCtx->cursorPoint[PAUSE_QUEST];
|
||||
pauseCtx->cursorItem[pauseCtx->pageIndex] = phi_s0_2;
|
||||
pauseCtx->cursorSlot[pauseCtx->pageIndex] = sp216;
|
||||
} else {
|
||||
if ((gSaveContext.inventory.questItems & 0xF0000000) != 0) {
|
||||
phi_s0_2 = 0x72;
|
||||
} else {
|
||||
phi_s0_2 = PAUSE_ITEM_NONE;
|
||||
}
|
||||
osSyncPrintf("888 ccc=%d (%d, %d, %x)\n", phi_s0_2, pauseCtx->cursorPoint[PAUSE_QUEST], 0x72,
|
||||
gSaveContext.inventory.questItems & 0xF0000000);
|
||||
}
|
||||
|
||||
sp216 = pauseCtx->cursorPoint[PAUSE_QUEST];
|
||||
pauseCtx->cursorItem[pauseCtx->pageIndex] = phi_s0_2;
|
||||
pauseCtx->cursorSlot[pauseCtx->pageIndex] = sp216;
|
||||
|
||||
KaleidoScope_SetCursorVtx(pauseCtx, sp216 * 4, pauseCtx->questVtx);
|
||||
|
||||
if ((pauseCtx->state == 6) && (pauseCtx->unk_1E4 == 0) && (pauseCtx->cursorSpecialPos == 0)) {
|
||||
@ -215,7 +212,7 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) {
|
||||
pauseCtx->cursorPoint[PAUSE_QUEST] = 0x15;
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
@ -232,7 +229,7 @@ void KaleidoScope_DrawQuestStatus(GlobalContext* globalCtx, GraphicsContext* gfx
|
||||
pauseCtx->cursorSlot[pauseCtx->pageIndex] = sp216;
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) {
|
||||
pauseCtx->cursorPoint[PAUSE_QUEST] = 0;
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
@ -140,6 +140,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
||||
s16 cursorX;
|
||||
s16 cursorY;
|
||||
volatile s16 oldCursorPoint;
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_kaleido_equipment.c", 219);
|
||||
|
||||
@ -174,7 +175,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
||||
|
||||
cursorMoveResult = 0;
|
||||
while (cursorMoveResult == 0) {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if ((pauseCtx->stickRelX < -30) || (dpad && 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 +217,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
||||
cursorMoveResult = 3;
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->stickRelX > 30) {
|
||||
} else if ((pauseCtx->stickRelX > 30) || (dpad && 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 +265,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
||||
|
||||
cursorMoveResult = 0;
|
||||
while (cursorMoveResult == 0) {
|
||||
if (pauseCtx->stickRelY > 30) {
|
||||
if ((pauseCtx->stickRelY > 30) || (dpad && 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 +287,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
||||
pauseCtx->cursorPoint[PAUSE_EQUIP] = cursorPoint;
|
||||
cursorMoveResult = 3;
|
||||
}
|
||||
} else if (pauseCtx->stickRelY < -30) {
|
||||
} else if ((pauseCtx->stickRelY < -30) || (dpad && 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 +310,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if ((pauseCtx->stickRelX > 30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
||||
@ -356,7 +357,7 @@ void KaleidoScope_DrawEquipment(GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if ((pauseCtx->stickRelX < -30) || (dpad && 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);
|
||||
|
@ -96,6 +96,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
|
||||
s16 cursorY;
|
||||
s16 oldCursorPoint;
|
||||
s16 moveCursorResult;
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_kaleido_item.c", 234);
|
||||
|
||||
@ -120,7 +121,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
|
||||
pauseCtx->stickRelX = 40;
|
||||
}
|
||||
|
||||
if (ABS(pauseCtx->stickRelX) > 30) {
|
||||
if ((ABS(pauseCtx->stickRelX) > 30) || (dpad && 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 +133,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) || (dpad && 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 +165,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
|
||||
moveCursorResult = 2;
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->stickRelX > 30) {
|
||||
} else if ((pauseCtx->stickRelX > 30) || (dpad && 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 +209,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) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
||||
@ -242,7 +243,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
||||
@ -280,13 +281,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) || (dpad && 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) || (dpad && 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 +301,7 @@ void KaleidoScope_DrawItemSelect(GlobalContext* globalCtx) {
|
||||
|
||||
moveCursorResult = 2;
|
||||
}
|
||||
} else if (pauseCtx->stickRelY < -30) {
|
||||
} else if ((pauseCtx->stickRelY < -30) || (dpad && 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;
|
||||
@ -43,6 +44,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
||||
s16 stepG;
|
||||
s16 stepB;
|
||||
u16 rgba16;
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
|
||||
OPEN_DISPS(gfxCtx, "../z_kaleido_map_PAL.c", 123);
|
||||
|
||||
@ -51,7 +53,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) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) {
|
||||
if (pauseCtx->cursorX[PAUSE_MAP] != 0) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(globalCtx, PAUSE_CURSOR_PAGE_RIGHT);
|
||||
} else {
|
||||
@ -67,7 +69,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->stickRelX < -30) {
|
||||
} else if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) {
|
||||
if (pauseCtx->cursorX[PAUSE_MAP] == 0) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(globalCtx, PAUSE_CURSOR_PAGE_LEFT);
|
||||
} else {
|
||||
@ -82,7 +84,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
||||
}
|
||||
|
||||
if (pauseCtx->cursorPoint[PAUSE_MAP] < 3) {
|
||||
if (pauseCtx->stickRelY > 30) {
|
||||
if ((pauseCtx->stickRelY > 30) || (dpad && 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 +94,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelY < -30) {
|
||||
if ((pauseCtx->stickRelY < -30) || (dpad && 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 +106,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelY > 30) {
|
||||
if ((pauseCtx->stickRelY > 30) || (dpad && 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 +117,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->stickRelY < -30) {
|
||||
} else if ((pauseCtx->stickRelY < -30) || (dpad && 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 +140,7 @@ void KaleidoScope_DrawDungeonMap(GlobalContext* globalCtx, GraphicsContext* gfxC
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if ((pauseCtx->stickRelX > 30) || (dpad && 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 +150,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) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
pauseCtx->cursorX[PAUSE_MAP] = 1;
|
||||
@ -396,6 +398,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;
|
||||
@ -404,6 +407,7 @@ void KaleidoScope_DrawWorldMap(GlobalContext* globalCtx, GraphicsContext* gfxCtx
|
||||
s16 stepR;
|
||||
s16 stepG;
|
||||
s16 stepB;
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
|
||||
OPEN_DISPS(gfxCtx, "../z_kaleido_map_PAL.c", 556);
|
||||
|
||||
@ -412,7 +416,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) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) {
|
||||
D_8082A6D4 = 0;
|
||||
|
||||
do {
|
||||
@ -423,7 +427,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) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) {
|
||||
D_8082A6D4 = 0;
|
||||
|
||||
do {
|
||||
@ -444,7 +448,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) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DRIGHT))) {
|
||||
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
||||
@ -459,7 +463,7 @@ void KaleidoScope_DrawWorldMap(GlobalContext* globalCtx, GraphicsContext* gfxCtx
|
||||
D_8082A6D4 = 0;
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) {
|
||||
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 11;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
||||
@ -663,7 +667,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++);
|
||||
|
||||
|
@ -7,12 +7,13 @@ void KaleidoScope_UpdatePrompt(GlobalContext* globalCtx) {
|
||||
Input* input = &globalCtx->state.input[0];
|
||||
s8 relStickX = input->rel.stick_x;
|
||||
s16 step;
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
|
||||
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) || (dpad && 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) || (dpad && 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;
|
||||
}
|
||||
|
@ -936,8 +936,9 @@ void KaleidoScope_HandlePageToggles(PauseContext* pauseCtx, Input* input) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool dpad = CVar_GetS32("gDpadPauseName", 0);
|
||||
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if ((pauseCtx->stickRelX < -30) || (dpad && CHECK_BTN_ALL(input->press.button, BTN_DLEFT))) {
|
||||
pauseCtx->pageSwitchTimer++;
|
||||
if ((pauseCtx->pageSwitchTimer >= 10) || (pauseCtx->pageSwitchTimer == 0)) {
|
||||
KaleidoScope_SwitchPage(pauseCtx, 0);
|
||||
@ -946,7 +947,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) || (dpad && 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
Block a user