mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-27 07:07:09 +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
|
@ -778,8 +778,8 @@ typedef struct {
|
|||
/* 0x0208 */ u16 alpha;
|
||||
/* 0x020A */ s16 offsetY;
|
||||
/* 0x020C */ char unk_20C[0x08];
|
||||
/* 0x0214 */ s16 stickRelX;
|
||||
/* 0x0216 */ s16 stickRelY;
|
||||
/* 0x0214 */ s16 stickAdjX;
|
||||
/* 0x0216 */ s16 stickAdjY;
|
||||
/* 0x0218 */ s16 cursorPoint[5]; // "cursor_point"
|
||||
/* 0x0222 */ s16 cursorX[5]; // "cur_xpt"
|
||||
/* 0x022C */ s16 cursorY[5]; // "cur_ypt"
|
||||
|
@ -1286,8 +1286,8 @@ typedef struct {
|
|||
/* 0x1CAB4 */ s16 inputTimerY;
|
||||
/* 0x1CAB6 */ s16 stickXDir;
|
||||
/* 0x1CAB8 */ s16 stickYDir;
|
||||
/* 0x1CABA */ s16 stickRelX;
|
||||
/* 0x1CABC */ s16 stickRelY;
|
||||
/* 0x1CABA */ s16 stickAdjX;
|
||||
/* 0x1CABC */ s16 stickAdjY;
|
||||
/* 0x1CABE */ s16 nameEntryBoxPosX;
|
||||
/* 0x1CAC0 */ s16 windowPosX;
|
||||
/* 0x1CAC4 */ f32 windowRot;
|
||||
|
|
|
@ -1246,7 +1246,7 @@ OcarinaStaff sPlayingStaff;
|
|||
OcarinaStaff sPlaybackStaff;
|
||||
OcarinaStaff sRecordingStaff;
|
||||
u32 sOcarinaUpdateTaskStart;
|
||||
OcarinaStick sOcarinaInputStickRel;
|
||||
OcarinaStick sOcarinaInputStickAdj;
|
||||
u32 sOcarinaInputButtonCur;
|
||||
u32 sOcarinaInputButtonStart;
|
||||
u32 sOcarinaInputButtonPrev;
|
||||
|
@ -1299,8 +1299,8 @@ void AudioOcarina_ReadControllerInput(void) {
|
|||
PadMgr_RequestPadData(&gPadMgr, inputs, 0);
|
||||
sOcarinaInputButtonCur = input->cur.button;
|
||||
sOcarinaInputButtonPrev = ocarinaInputButtonPrev;
|
||||
sOcarinaInputStickRel.x = input->rel.stick_x;
|
||||
sOcarinaInputStickRel.y = input->rel.stick_y;
|
||||
sOcarinaInputStickAdj.x = input->rel.stick_x;
|
||||
sOcarinaInputStickAdj.y = input->rel.stick_y;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1719,11 +1719,11 @@ void AudioOcarina_PlayControllerInput(u8 unused) {
|
|||
|
||||
if (sRecordingState != OCARINA_RECORD_SCARECROW_SPAWN) {
|
||||
// Bend the pitch of the note based on y control stick
|
||||
sCurOcarinaBendIndex = sOcarinaInputStickRel.y;
|
||||
sCurOcarinaBendIndex = sOcarinaInputStickAdj.y;
|
||||
sCurOcarinaBendFreq = AudioOcarina_BendPitchTwoSemitones(sCurOcarinaBendIndex);
|
||||
|
||||
// Add vibrato of the ocarina note based on the x control stick
|
||||
sCurOcarinaVibrato = ABS_ALT(sOcarinaInputStickRel.x) >> 2;
|
||||
sCurOcarinaVibrato = ABS_ALT(sOcarinaInputStickAdj.x) >> 2;
|
||||
// Sets vibrato to io port 6
|
||||
Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 6, sCurOcarinaVibrato);
|
||||
} else {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -82,12 +82,12 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
if (pauseCtx->cursorSpecialPos == 0) {
|
||||
pauseCtx->nameColorSet = 0;
|
||||
|
||||
if ((pauseCtx->state != 6) || ((pauseCtx->stickRelX == 0) && (pauseCtx->stickRelY == 0))) {
|
||||
if ((pauseCtx->state != 6) || ((pauseCtx->stickAdjX == 0) && (pauseCtx->stickAdjY == 0))) {
|
||||
sp216 = pauseCtx->cursorSlot[PAUSE_QUEST];
|
||||
} else {
|
||||
phi_s3 = pauseCtx->cursorPoint[PAUSE_QUEST];
|
||||
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if (pauseCtx->stickAdjX < -30) {
|
||||
phi_s0 = D_8082A1AC[phi_s3][2];
|
||||
if (phi_s0 == -3) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_LEFT);
|
||||
|
@ -100,7 +100,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
phi_s0 = D_8082A1AC[phi_s0][2];
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->stickRelX > 30) {
|
||||
} else if (pauseCtx->stickAdjX > 30) {
|
||||
phi_s0 = D_8082A1AC[phi_s3][3];
|
||||
if (phi_s0 == -2) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_RIGHT);
|
||||
|
@ -115,7 +115,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (pauseCtx->stickRelY < -30) {
|
||||
if (pauseCtx->stickAdjY < -30) {
|
||||
phi_s0 = D_8082A1AC[phi_s3][1];
|
||||
while (phi_s0 >= 0) {
|
||||
if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
|
||||
|
@ -123,7 +123,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
phi_s0 = D_8082A1AC[phi_s0][1];
|
||||
}
|
||||
} else if (pauseCtx->stickRelY > 30) {
|
||||
} else if (pauseCtx->stickAdjY > 30) {
|
||||
phi_s0 = D_8082A1AC[phi_s3][0];
|
||||
while (phi_s0 >= 0) {
|
||||
if ((s16)KaleidoScope_UpdateQuestStatusPoint(pauseCtx, phi_s0) != 0) {
|
||||
|
@ -202,7 +202,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
}
|
||||
} else if (pauseCtx->unk_1E4 == 5) {
|
||||
if ((pauseCtx->stickRelX != 0) || (pauseCtx->stickRelY != 0)) {
|
||||
if ((pauseCtx->stickAdjX != 0) || (pauseCtx->stickAdjY != 0)) {
|
||||
pauseCtx->unk_1E4 = 0;
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
}
|
||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if (pauseCtx->stickAdjX > 30) {
|
||||
pauseCtx->cursorPoint[PAUSE_QUEST] = 0x15;
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
@ -232,7 +232,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
pauseCtx->cursorSlot[pauseCtx->pageIndex] = sp216;
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if (pauseCtx->stickAdjX < -30) {
|
||||
pauseCtx->cursorPoint[PAUSE_QUEST] = 0;
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
|
|
@ -110,8 +110,8 @@ void KaleidoScope_DrawDebugEditor(PlayState* play) {
|
|||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_kaleido_debug.c", 402);
|
||||
|
||||
pauseCtx->stickRelX = input->rel.stick_x;
|
||||
pauseCtx->stickRelY = input->rel.stick_y;
|
||||
pauseCtx->stickAdjX = input->rel.stick_x;
|
||||
pauseCtx->stickAdjY = input->rel.stick_y;
|
||||
|
||||
Gfx_SetupDL_39Opa(play->state.gfxCtx);
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
|||
|
||||
cursorMoveResult = 0;
|
||||
while (cursorMoveResult == 0) {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if (pauseCtx->stickAdjX < -30) {
|
||||
if (pauseCtx->cursorX[PAUSE_EQUIP] != 0) {
|
||||
pauseCtx->cursorX[PAUSE_EQUIP] -= 1;
|
||||
pauseCtx->cursorPoint[PAUSE_EQUIP] -= 1;
|
||||
|
@ -210,7 +210,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
|||
cursorMoveResult = 3;
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->stickRelX > 30) {
|
||||
} else if (pauseCtx->stickAdjX > 30) {
|
||||
if (pauseCtx->cursorX[PAUSE_EQUIP] < 3) {
|
||||
pauseCtx->cursorX[PAUSE_EQUIP] += 1;
|
||||
pauseCtx->cursorPoint[PAUSE_EQUIP] += 1;
|
||||
|
@ -258,7 +258,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
|||
|
||||
cursorMoveResult = 0;
|
||||
while (cursorMoveResult == 0) {
|
||||
if (pauseCtx->stickRelY > 30) {
|
||||
if (pauseCtx->stickAdjY > 30) {
|
||||
if (pauseCtx->cursorY[PAUSE_EQUIP] != 0) {
|
||||
pauseCtx->cursorY[PAUSE_EQUIP] -= 1;
|
||||
pauseCtx->cursorPoint[PAUSE_EQUIP] -= 4;
|
||||
|
@ -280,7 +280,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
|||
pauseCtx->cursorPoint[PAUSE_EQUIP] = cursorPoint;
|
||||
cursorMoveResult = 3;
|
||||
}
|
||||
} else if (pauseCtx->stickRelY < -30) {
|
||||
} else if (pauseCtx->stickAdjY < -30) {
|
||||
if (pauseCtx->cursorY[PAUSE_EQUIP] < 3) {
|
||||
pauseCtx->cursorY[PAUSE_EQUIP] += 1;
|
||||
pauseCtx->cursorPoint[PAUSE_EQUIP] += 4;
|
||||
|
@ -303,7 +303,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
|||
}
|
||||
}
|
||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if (pauseCtx->stickAdjX > 30) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
||||
|
@ -351,7 +351,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if (pauseCtx->stickAdjX < -30) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
|
|
|
@ -114,10 +114,10 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
|||
pauseCtx->cursorColorSet = 4;
|
||||
|
||||
if (cursorItem == PAUSE_ITEM_NONE) {
|
||||
pauseCtx->stickRelX = 40;
|
||||
pauseCtx->stickAdjX = 40;
|
||||
}
|
||||
|
||||
if (ABS(pauseCtx->stickRelX) > 30) {
|
||||
if (ABS(pauseCtx->stickAdjX) > 30) {
|
||||
cursorPoint = pauseCtx->cursorPoint[PAUSE_ITEM];
|
||||
cursorX = pauseCtx->cursorX[PAUSE_ITEM];
|
||||
cursorY = pauseCtx->cursorY[PAUSE_ITEM];
|
||||
|
@ -129,7 +129,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
|||
if (gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]]) {}
|
||||
|
||||
while (moveCursorResult == 0) {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if (pauseCtx->stickAdjX < -30) {
|
||||
if (pauseCtx->cursorX[PAUSE_ITEM] != 0) {
|
||||
pauseCtx->cursorX[PAUSE_ITEM] -= 1;
|
||||
pauseCtx->cursorPoint[PAUSE_ITEM] -= 1;
|
||||
|
@ -161,7 +161,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
|||
moveCursorResult = 2;
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->stickRelX > 30) {
|
||||
} else if (pauseCtx->stickAdjX > 30) {
|
||||
if (pauseCtx->cursorX[PAUSE_ITEM] < 5) {
|
||||
pauseCtx->cursorX[PAUSE_ITEM] += 1;
|
||||
pauseCtx->cursorPoint[PAUSE_ITEM] += 1;
|
||||
|
@ -205,7 +205,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
|||
cursorItem, pauseCtx->cursorSpecialPos);
|
||||
}
|
||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if (pauseCtx->stickAdjX > 30) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
||||
|
@ -240,7 +240,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if (pauseCtx->stickAdjX < -30) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
||||
|
@ -279,13 +279,13 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
|||
|
||||
if (pauseCtx->cursorSpecialPos == 0) {
|
||||
if (cursorItem != PAUSE_ITEM_NONE) {
|
||||
if (ABS(pauseCtx->stickRelY) > 30) {
|
||||
if (ABS(pauseCtx->stickAdjY) > 30) {
|
||||
moveCursorResult = 0;
|
||||
|
||||
cursorPoint = pauseCtx->cursorPoint[PAUSE_ITEM];
|
||||
cursorY = pauseCtx->cursorY[PAUSE_ITEM];
|
||||
while (moveCursorResult == 0) {
|
||||
if (pauseCtx->stickRelY > 30) {
|
||||
if (pauseCtx->stickAdjY > 30) {
|
||||
if (pauseCtx->cursorY[PAUSE_ITEM] != 0) {
|
||||
pauseCtx->cursorY[PAUSE_ITEM] -= 1;
|
||||
pauseCtx->cursorPoint[PAUSE_ITEM] -= 6;
|
||||
|
@ -299,7 +299,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
|||
|
||||
moveCursorResult = 2;
|
||||
}
|
||||
} else if (pauseCtx->stickRelY < -30) {
|
||||
} else if (pauseCtx->stickAdjY < -30) {
|
||||
if (pauseCtx->cursorY[PAUSE_ITEM] < 3) {
|
||||
pauseCtx->cursorY[PAUSE_ITEM] += 1;
|
||||
pauseCtx->cursorPoint[PAUSE_ITEM] += 6;
|
||||
|
|
|
@ -51,7 +51,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
oldCursorPoint = pauseCtx->cursorPoint[PAUSE_MAP];
|
||||
|
||||
if (pauseCtx->cursorSpecialPos == 0) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if (pauseCtx->stickAdjX > 30) {
|
||||
if (pauseCtx->cursorX[PAUSE_MAP] != 0) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_RIGHT);
|
||||
} else {
|
||||
|
@ -67,7 +67,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->stickRelX < -30) {
|
||||
} else if (pauseCtx->stickAdjX < -30) {
|
||||
if (pauseCtx->cursorX[PAUSE_MAP] == 0) {
|
||||
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_LEFT);
|
||||
} else {
|
||||
|
@ -82,7 +82,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
|
||||
if (pauseCtx->cursorPoint[PAUSE_MAP] < 3) {
|
||||
if (pauseCtx->stickRelY > 30) {
|
||||
if (pauseCtx->stickAdjY > 30) {
|
||||
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 +92,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelY < -30) {
|
||||
if (pauseCtx->stickAdjY < -30) {
|
||||
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 +104,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelY > 30) {
|
||||
if (pauseCtx->stickAdjY > 30) {
|
||||
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 +115,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if (pauseCtx->stickRelY < -30) {
|
||||
} else if (pauseCtx->stickAdjY < -30) {
|
||||
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 +138,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
}
|
||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if (pauseCtx->stickAdjX > 30) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->dungeonMapSlot;
|
||||
|
@ -149,7 +149,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if (pauseCtx->stickAdjX < -30) {
|
||||
pauseCtx->nameDisplayTimer = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
pauseCtx->cursorX[PAUSE_MAP] = 1;
|
||||
|
@ -415,7 +415,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
oldCursorPoint = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
||||
|
||||
if (pauseCtx->cursorSpecialPos == 0) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if (pauseCtx->stickAdjX > 30) {
|
||||
D_8082A6D4 = 0;
|
||||
|
||||
do {
|
||||
|
@ -426,7 +426,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
break;
|
||||
}
|
||||
} while (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] == 0);
|
||||
} else if (pauseCtx->stickRelX < -30) {
|
||||
} else if (pauseCtx->stickAdjX < -30) {
|
||||
D_8082A6D4 = 0;
|
||||
|
||||
do {
|
||||
|
@ -447,7 +447,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
} else {
|
||||
pauseCtx->cursorItem[PAUSE_MAP] = gSaveContext.worldMapArea + 0x18;
|
||||
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickRelX > 30) {
|
||||
if (pauseCtx->stickAdjX > 30) {
|
||||
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 0;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
||||
|
@ -463,7 +463,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
D_8082A6D4 = 0;
|
||||
}
|
||||
} else {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if (pauseCtx->stickAdjX < -30) {
|
||||
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 11;
|
||||
pauseCtx->cursorSpecialPos = 0;
|
||||
|
||||
|
|
|
@ -5,15 +5,15 @@ static s16 D_8082A6E0[] = { 100, 255 };
|
|||
void KaleidoScope_UpdatePrompt(PlayState* play) {
|
||||
PauseContext* pauseCtx = &play->pauseCtx;
|
||||
Input* input = &play->state.input[0];
|
||||
s8 relStickX = input->rel.stick_x;
|
||||
s8 stickAdjX = input->rel.stick_x;
|
||||
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) && (stickAdjX >= 30)) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
pauseCtx->promptChoice = 4;
|
||||
} else if ((pauseCtx->promptChoice != 0) && (relStickX <= -30)) {
|
||||
} else if ((pauseCtx->promptChoice != 0) && (stickAdjX <= -30)) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
pauseCtx->promptChoice = 0;
|
||||
|
|
|
@ -408,7 +408,7 @@ void KaleidoScope_HandlePageToggles(PauseContext* pauseCtx, Input* input) {
|
|||
}
|
||||
|
||||
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if (pauseCtx->stickAdjX < -30) {
|
||||
pauseCtx->pageSwitchTimer++;
|
||||
if ((pauseCtx->pageSwitchTimer >= 10) || (pauseCtx->pageSwitchTimer == 0)) {
|
||||
KaleidoScope_SwitchPage(pauseCtx, 0);
|
||||
|
@ -417,7 +417,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->stickAdjX > 30) {
|
||||
pauseCtx->pageSwitchTimer++;
|
||||
if ((pauseCtx->pageSwitchTimer >= 10) || (pauseCtx->pageSwitchTimer == 0)) {
|
||||
KaleidoScope_SwitchPage(pauseCtx, 2);
|
||||
|
@ -552,23 +552,23 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if (pauseCtx->stickRelX < -30) {
|
||||
if (pauseCtx->stickAdjX < -30) {
|
||||
if (D_8082AD4C == -1) {
|
||||
if (--D_8082AD44 < 0) {
|
||||
D_8082AD44 = XREG(6);
|
||||
} else {
|
||||
pauseCtx->stickRelX = 0;
|
||||
pauseCtx->stickAdjX = 0;
|
||||
}
|
||||
} else {
|
||||
D_8082AD44 = XREG(8);
|
||||
D_8082AD4C = -1;
|
||||
}
|
||||
} else if (pauseCtx->stickRelX > 30) {
|
||||
} else if (pauseCtx->stickAdjX > 30) {
|
||||
if (D_8082AD4C == 1) {
|
||||
if (--D_8082AD44 < 0) {
|
||||
D_8082AD44 = XREG(6);
|
||||
} else {
|
||||
pauseCtx->stickRelX = 0;
|
||||
pauseCtx->stickAdjX = 0;
|
||||
}
|
||||
} else {
|
||||
D_8082AD44 = XREG(8);
|
||||
|
@ -578,23 +578,23 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
|
|||
D_8082AD4C = 0;
|
||||
}
|
||||
|
||||
if (pauseCtx->stickRelY < -30) {
|
||||
if (pauseCtx->stickAdjY < -30) {
|
||||
if (D_8082AD50 == -1) {
|
||||
if (--D_8082AD48 < 0) {
|
||||
D_8082AD48 = XREG(6);
|
||||
} else {
|
||||
pauseCtx->stickRelY = 0;
|
||||
pauseCtx->stickAdjY = 0;
|
||||
}
|
||||
} else {
|
||||
D_8082AD48 = XREG(8);
|
||||
D_8082AD50 = -1;
|
||||
}
|
||||
} else if (pauseCtx->stickRelY > 30) {
|
||||
} else if (pauseCtx->stickAdjY > 30) {
|
||||
if (D_8082AD50 == 1) {
|
||||
if (--D_8082AD48 < 0) {
|
||||
D_8082AD48 = XREG(6);
|
||||
} else {
|
||||
pauseCtx->stickRelY = 0;
|
||||
pauseCtx->stickAdjY = 0;
|
||||
}
|
||||
} else {
|
||||
D_8082AD48 = XREG(8);
|
||||
|
@ -2262,8 +2262,8 @@ void KaleidoScope_Draw(PlayState* play) {
|
|||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_kaleido_scope_PAL.c", 3188);
|
||||
|
||||
pauseCtx->stickRelX = input->rel.stick_x;
|
||||
pauseCtx->stickRelY = input->rel.stick_y;
|
||||
pauseCtx->stickAdjX = input->rel.stick_x;
|
||||
pauseCtx->stickAdjY = input->rel.stick_y;
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x02, interfaceCtx->parameterSegment);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x07, pauseCtx->playerSegment);
|
||||
|
@ -2492,8 +2492,8 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
((pauseCtx->state >= 0xA) && (pauseCtx->state <= 0x12)))) {
|
||||
|
||||
if ((!pauseCtx->unk_1E4 || (pauseCtx->unk_1E4 == 8)) && (pauseCtx->state == 6)) {
|
||||
pauseCtx->stickRelX = input->rel.stick_x;
|
||||
pauseCtx->stickRelY = input->rel.stick_y;
|
||||
pauseCtx->stickAdjX = input->rel.stick_x;
|
||||
pauseCtx->stickAdjY = input->rel.stick_y;
|
||||
KaleidoScope_UpdateCursorSize(play);
|
||||
KaleidoScope_HandlePageToggles(pauseCtx, input);
|
||||
} else if ((pauseCtx->pageIndex == PAUSE_QUEST) && ((pauseCtx->unk_1E4 < 3) || (pauseCtx->unk_1E4 == 5))) {
|
||||
|
|
Loading…
Reference in a new issue