mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-19 21:41:59 +00:00
stickRel
-> stickAdj
(#1367)
* kaleido and filselect * ocarina and KaleidoScope_UpdatePrompt
This commit is contained in:
parent
327a813b37
commit
1ab4e6ee5f
12 changed files with 93 additions and 93 deletions
|
@ -235,11 +235,11 @@ void FileSelect_UpdateMainMenu(GameState* thisx) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (ABS(this->stickRelY) > 30) {
|
||||
if (ABS(this->stickAdjY) > 30) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
if (this->stickRelY > 30) {
|
||||
if (this->stickAdjY > 30) {
|
||||
this->buttonIndex--;
|
||||
if (this->buttonIndex < FS_BTN_MAIN_FILE_1) {
|
||||
this->buttonIndex = FS_BTN_MAIN_OPTIONS;
|
||||
|
@ -1334,7 +1334,7 @@ void FileSelect_ConfirmFile(GameState* thisx) {
|
|||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CLOSE, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->selectMode++;
|
||||
} else if (ABS(this->stickRelY) >= 30) {
|
||||
} else if (ABS(this->stickAdjY) >= 30) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->confirmButtonIndex ^= 1;
|
||||
|
@ -1608,28 +1608,28 @@ void FileSelect_Main(GameState* thisx) {
|
|||
|
||||
Gfx_SetupFrame(this->state.gfxCtx, 0, 0, 0);
|
||||
|
||||
this->stickRelX = input->rel.stick_x;
|
||||
this->stickRelY = input->rel.stick_y;
|
||||
this->stickAdjX = input->rel.stick_x;
|
||||
this->stickAdjY = input->rel.stick_y;
|
||||
|
||||
if (this->stickRelX < -30) {
|
||||
if (this->stickAdjX < -30) {
|
||||
if (this->stickXDir == -1) {
|
||||
this->inputTimerX--;
|
||||
if (this->inputTimerX < 0) {
|
||||
this->inputTimerX = 2;
|
||||
} else {
|
||||
this->stickRelX = 0;
|
||||
this->stickAdjX = 0;
|
||||
}
|
||||
} else {
|
||||
this->inputTimerX = 10;
|
||||
this->stickXDir = -1;
|
||||
}
|
||||
} else if (this->stickRelX > 30) {
|
||||
} else if (this->stickAdjX > 30) {
|
||||
if (this->stickXDir == 1) {
|
||||
this->inputTimerX--;
|
||||
if (this->inputTimerX < 0) {
|
||||
this->inputTimerX = 2;
|
||||
} else {
|
||||
this->stickRelX = 0;
|
||||
this->stickAdjX = 0;
|
||||
}
|
||||
} else {
|
||||
this->inputTimerX = 10;
|
||||
|
@ -1639,25 +1639,25 @@ void FileSelect_Main(GameState* thisx) {
|
|||
this->stickXDir = 0;
|
||||
}
|
||||
|
||||
if (this->stickRelY < -30) {
|
||||
if (this->stickAdjY < -30) {
|
||||
if (this->stickYDir == -1) {
|
||||
this->inputTimerY -= 1;
|
||||
if (this->inputTimerY < 0) {
|
||||
this->inputTimerY = 2;
|
||||
} else {
|
||||
this->stickRelY = 0;
|
||||
this->stickAdjY = 0;
|
||||
}
|
||||
} else {
|
||||
this->inputTimerY = 10;
|
||||
this->stickYDir = -1;
|
||||
}
|
||||
} else if (this->stickRelY > 30) {
|
||||
} else if (this->stickAdjY > 30) {
|
||||
if (this->stickYDir == 1) {
|
||||
this->inputTimerY -= 1;
|
||||
if (this->inputTimerY < 0) {
|
||||
this->inputTimerY = 2;
|
||||
} else {
|
||||
this->stickRelY = 0;
|
||||
this->stickAdjY = 0;
|
||||
}
|
||||
} else {
|
||||
this->inputTimerY = 10;
|
||||
|
|
|
@ -85,11 +85,11 @@ void FileSelect_SelectCopySource(GameState* thisx) {
|
|||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else {
|
||||
if (ABS(this->stickRelY) >= 30) {
|
||||
if (ABS(this->stickAdjY) >= 30) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
if (this->stickRelY >= 30) {
|
||||
if (this->stickAdjY >= 30) {
|
||||
this->buttonIndex--;
|
||||
|
||||
if (this->buttonIndex < FS_BTN_COPY_FILE_1) {
|
||||
|
@ -201,11 +201,11 @@ void FileSelect_SelectCopyDest(GameState* thisx) {
|
|||
}
|
||||
} else {
|
||||
|
||||
if (ABS(this->stickRelY) >= 30) {
|
||||
if (ABS(this->stickAdjY) >= 30) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
if (this->stickRelY >= 30) {
|
||||
if (this->stickAdjY >= 30) {
|
||||
this->buttonIndex--;
|
||||
|
||||
if (this->buttonIndex == this->selectedFileIndex) {
|
||||
|
@ -387,7 +387,7 @@ void FileSelect_CopyConfirm(GameState* thisx) {
|
|||
func_800AA000(300.0f, 0xB4, 0x14, 0x64);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_L, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else if (ABS(this->stickRelY) >= 30) {
|
||||
} else if (ABS(this->stickAdjY) >= 30) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->buttonIndex ^= 1;
|
||||
|
@ -716,11 +716,11 @@ void FileSelect_EraseSelect(GameState* thisx) {
|
|||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else {
|
||||
if (ABS(this->stickRelY) >= 30) {
|
||||
if (ABS(this->stickAdjY) >= 30) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
if (this->stickRelY >= 30) {
|
||||
if (this->stickAdjY >= 30) {
|
||||
this->buttonIndex--;
|
||||
if (this->buttonIndex < FS_BTN_ERASE_FILE_1) {
|
||||
this->buttonIndex = FS_BTN_ERASE_QUIT;
|
||||
|
@ -852,7 +852,7 @@ void FileSelect_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->stickAdjY) >= 30) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->buttonIndex ^= 1;
|
||||
|
|
|
@ -520,7 +520,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
|
|||
this->kbdButton = 99;
|
||||
|
||||
if (this->kbdY != 5) {
|
||||
if (this->stickRelX < -30) {
|
||||
if (this->stickAdjX < -30) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->charIndex--;
|
||||
|
@ -529,7 +529,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
|
|||
this->kbdX = 12;
|
||||
this->charIndex = (this->kbdY * 13) + this->kbdX;
|
||||
}
|
||||
} else if (this->stickRelX > 30) {
|
||||
} else if (this->stickAdjX > 30) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->charIndex++;
|
||||
|
@ -540,14 +540,14 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (this->stickRelX < -30) {
|
||||
if (this->stickAdjX < -30) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->kbdX--;
|
||||
if (this->kbdX < 3) {
|
||||
this->kbdX = 4;
|
||||
}
|
||||
} else if (this->stickRelX > 30) {
|
||||
} else if (this->stickAdjX > 30) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->kbdX++;
|
||||
|
@ -557,7 +557,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (this->stickRelY > 30) {
|
||||
if (this->stickAdjY > 30) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->kbdY--;
|
||||
|
@ -589,7 +589,7 @@ void FileSelect_UpdateKeyboardCursor(GameState* thisx) {
|
|||
this->charIndex += this->kbdX;
|
||||
}
|
||||
}
|
||||
} else if (this->stickRelY < -30) {
|
||||
} else if (this->stickAdjY < -30) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
this->kbdY++;
|
||||
|
@ -688,7 +688,7 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (this->stickRelX < -30) {
|
||||
if (this->stickAdjX < -30) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
|
@ -702,7 +702,7 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) {
|
|||
} else {
|
||||
gSaveContext.zTargetSetting ^= 1;
|
||||
}
|
||||
} else if (this->stickRelX > 30) {
|
||||
} else if (this->stickAdjX > 30) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
|
@ -717,7 +717,7 @@ void FileSelect_UpdateOptionsMenu(GameState* thisx) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((this->stickRelY < -30) || (this->stickRelY > 30)) {
|
||||
if ((this->stickAdjY < -30) || (this->stickAdjY > 30)) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
sSelectedSetting ^= 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue