mirror of
https://github.com/zeldaret/oot.git
synced 2025-02-24 10:03:11 +00:00
PauseContext: stickRel -> stickAdj
This commit is contained in:
parent
739397fd39
commit
d3ed4be96b
7 changed files with 53 additions and 53 deletions
|
@ -838,8 +838,8 @@ typedef struct {
|
||||||
/* 0x0208 */ u16 alpha;
|
/* 0x0208 */ u16 alpha;
|
||||||
/* 0x020A */ s16 offsetY;
|
/* 0x020A */ s16 offsetY;
|
||||||
/* 0x020C */ char unk_20C[0x08];
|
/* 0x020C */ char unk_20C[0x08];
|
||||||
/* 0x0214 */ s16 stickRelX;
|
/* 0x0214 */ s16 stickAdjX;
|
||||||
/* 0x0216 */ s16 stickRelY;
|
/* 0x0216 */ s16 stickAdjY;
|
||||||
/* 0x0218 */ s16 cursorPoint[5]; // "cursor_point"
|
/* 0x0218 */ s16 cursorPoint[5]; // "cursor_point"
|
||||||
/* 0x0222 */ s16 cursorX[5]; // "cur_xpt"
|
/* 0x0222 */ s16 cursorX[5]; // "cur_xpt"
|
||||||
/* 0x022C */ s16 cursorY[5]; // "cur_ypt"
|
/* 0x022C */ s16 cursorY[5]; // "cur_ypt"
|
||||||
|
|
|
@ -125,7 +125,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
if (pauseCtx->cursorSpecialPos == 0) {
|
if (pauseCtx->cursorSpecialPos == 0) {
|
||||||
pauseCtx->nameColorSet = 0;
|
pauseCtx->nameColorSet = 0;
|
||||||
|
|
||||||
if ((pauseCtx->state != PAUSE_STATE_MAIN) || ((pauseCtx->stickRelX == 0) && (pauseCtx->stickRelY == 0))) {
|
if ((pauseCtx->state != PAUSE_STATE_MAIN) || ((pauseCtx->stickAdjX == 0) && (pauseCtx->stickAdjY == 0))) {
|
||||||
// No cursor movement
|
// No cursor movement
|
||||||
cursor = pauseCtx->cursorSlot[PAUSE_QUEST];
|
cursor = pauseCtx->cursorSlot[PAUSE_QUEST];
|
||||||
} else {
|
} else {
|
||||||
|
@ -133,7 +133,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
|
|
||||||
i = pauseCtx->cursorPoint[PAUSE_QUEST];
|
i = pauseCtx->cursorPoint[PAUSE_QUEST];
|
||||||
|
|
||||||
if (pauseCtx->stickRelX < -30) {
|
if (pauseCtx->stickAdjX < -30) {
|
||||||
// Move cursor left
|
// Move cursor left
|
||||||
nextCursorPoint = sCursorPointLinks[i][2];
|
nextCursorPoint = sCursorPointLinks[i][2];
|
||||||
if (nextCursorPoint == CURSOR_TO_LEFT) {
|
if (nextCursorPoint == CURSOR_TO_LEFT) {
|
||||||
|
@ -147,7 +147,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
nextCursorPoint = sCursorPointLinks[nextCursorPoint][2];
|
nextCursorPoint = sCursorPointLinks[nextCursorPoint][2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (pauseCtx->stickRelX > 30) {
|
} else if (pauseCtx->stickAdjX > 30) {
|
||||||
// Move cursor right
|
// Move cursor right
|
||||||
nextCursorPoint = sCursorPointLinks[i][3];
|
nextCursorPoint = sCursorPointLinks[i][3];
|
||||||
if (nextCursorPoint == CURSOR_TO_RIGHT) {
|
if (nextCursorPoint == CURSOR_TO_RIGHT) {
|
||||||
|
@ -163,7 +163,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pauseCtx->stickRelY < -30) {
|
if (pauseCtx->stickAdjY < -30) {
|
||||||
// Move cursor down
|
// Move cursor down
|
||||||
nextCursorPoint = sCursorPointLinks[i][1];
|
nextCursorPoint = sCursorPointLinks[i][1];
|
||||||
while (nextCursorPoint >= 0) {
|
while (nextCursorPoint >= 0) {
|
||||||
|
@ -172,7 +172,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
}
|
}
|
||||||
nextCursorPoint = sCursorPointLinks[nextCursorPoint][1];
|
nextCursorPoint = sCursorPointLinks[nextCursorPoint][1];
|
||||||
}
|
}
|
||||||
} else if (pauseCtx->stickRelY > 30) {
|
} else if (pauseCtx->stickAdjY > 30) {
|
||||||
// Move cursor up
|
// Move cursor up
|
||||||
nextCursorPoint = sCursorPointLinks[i][0];
|
nextCursorPoint = sCursorPointLinks[i][0];
|
||||||
while (nextCursorPoint >= 0) {
|
while (nextCursorPoint >= 0) {
|
||||||
|
@ -273,7 +273,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
}
|
}
|
||||||
} else if (pauseCtx->mainSubState == PAUSE_MAIN_STATE_SONG_PLAYER_PLAYING) {
|
} else if (pauseCtx->mainSubState == PAUSE_MAIN_STATE_SONG_PLAYER_PLAYING) {
|
||||||
// Abort having the player play the song if the stick is moved
|
// Abort having the player play the song if the stick is moved
|
||||||
if ((pauseCtx->stickRelX != 0) || (pauseCtx->stickRelY != 0)) {
|
if ((pauseCtx->stickAdjX != 0) || (pauseCtx->stickAdjY != 0)) {
|
||||||
pauseCtx->mainSubState = PAUSE_MAIN_STATE_IDLE;
|
pauseCtx->mainSubState = PAUSE_MAIN_STATE_IDLE;
|
||||||
|
|
||||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
||||||
|
@ -288,7 +288,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||||
if (pauseCtx->stickRelX > 30) {
|
if (pauseCtx->stickAdjX > 30) {
|
||||||
// Move cursor right from the "scroll to left page" position
|
// Move cursor right from the "scroll to left page" position
|
||||||
|
|
||||||
pauseCtx->cursorPoint[PAUSE_QUEST] = QUEST_STONE_OF_AGONY;
|
pauseCtx->cursorPoint[PAUSE_QUEST] = QUEST_STONE_OF_AGONY;
|
||||||
|
@ -310,7 +310,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
pauseCtx->cursorSlot[pauseCtx->pageIndex] = cursor;
|
pauseCtx->cursorSlot[pauseCtx->pageIndex] = cursor;
|
||||||
}
|
}
|
||||||
} else { // cursorSpecialPos == PAUSE_CURSOR_PAGE_RIGHT
|
} else { // cursorSpecialPos == PAUSE_CURSOR_PAGE_RIGHT
|
||||||
if (pauseCtx->stickRelX < -30) {
|
if (pauseCtx->stickAdjX < -30) {
|
||||||
// Move cursor left from the "scroll to right page" position
|
// Move cursor left from the "scroll to right page" position
|
||||||
|
|
||||||
pauseCtx->cursorPoint[PAUSE_QUEST] = QUEST_MEDALLION_FOREST;
|
pauseCtx->cursorPoint[PAUSE_QUEST] = QUEST_MEDALLION_FOREST;
|
||||||
|
|
|
@ -110,8 +110,8 @@ void KaleidoScope_DrawDebugEditor(PlayState* play) {
|
||||||
|
|
||||||
OPEN_DISPS(play->state.gfxCtx, "../z_kaleido_debug.c", 402);
|
OPEN_DISPS(play->state.gfxCtx, "../z_kaleido_debug.c", 402);
|
||||||
|
|
||||||
pauseCtx->stickRelX = input->rel.stick_x;
|
pauseCtx->stickAdjX = input->rel.stick_x;
|
||||||
pauseCtx->stickRelY = input->rel.stick_y;
|
pauseCtx->stickAdjY = input->rel.stick_y;
|
||||||
|
|
||||||
Gfx_SetupDL_39Opa(play->state.gfxCtx);
|
Gfx_SetupDL_39Opa(play->state.gfxCtx);
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
||||||
|
|
||||||
cursorMoveResult = 0;
|
cursorMoveResult = 0;
|
||||||
while (cursorMoveResult == 0) {
|
while (cursorMoveResult == 0) {
|
||||||
if (pauseCtx->stickRelX < -30) {
|
if (pauseCtx->stickAdjX < -30) {
|
||||||
if (pauseCtx->cursorX[PAUSE_EQUIP] != 0) {
|
if (pauseCtx->cursorX[PAUSE_EQUIP] != 0) {
|
||||||
pauseCtx->cursorX[PAUSE_EQUIP] -= 1;
|
pauseCtx->cursorX[PAUSE_EQUIP] -= 1;
|
||||||
pauseCtx->cursorPoint[PAUSE_EQUIP] -= 1;
|
pauseCtx->cursorPoint[PAUSE_EQUIP] -= 1;
|
||||||
|
@ -211,7 +211,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
||||||
cursorMoveResult = 3;
|
cursorMoveResult = 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (pauseCtx->stickRelX > 30) {
|
} else if (pauseCtx->stickAdjX > 30) {
|
||||||
if (pauseCtx->cursorX[PAUSE_EQUIP] < 3) {
|
if (pauseCtx->cursorX[PAUSE_EQUIP] < 3) {
|
||||||
pauseCtx->cursorX[PAUSE_EQUIP] += 1;
|
pauseCtx->cursorX[PAUSE_EQUIP] += 1;
|
||||||
pauseCtx->cursorPoint[PAUSE_EQUIP] += 1;
|
pauseCtx->cursorPoint[PAUSE_EQUIP] += 1;
|
||||||
|
@ -259,7 +259,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
||||||
|
|
||||||
cursorMoveResult = 0;
|
cursorMoveResult = 0;
|
||||||
while (cursorMoveResult == 0) {
|
while (cursorMoveResult == 0) {
|
||||||
if (pauseCtx->stickRelY > 30) {
|
if (pauseCtx->stickAdjY > 30) {
|
||||||
if (pauseCtx->cursorY[PAUSE_EQUIP] != 0) {
|
if (pauseCtx->cursorY[PAUSE_EQUIP] != 0) {
|
||||||
pauseCtx->cursorY[PAUSE_EQUIP] -= 1;
|
pauseCtx->cursorY[PAUSE_EQUIP] -= 1;
|
||||||
pauseCtx->cursorPoint[PAUSE_EQUIP] -= 4;
|
pauseCtx->cursorPoint[PAUSE_EQUIP] -= 4;
|
||||||
|
@ -281,7 +281,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
||||||
pauseCtx->cursorPoint[PAUSE_EQUIP] = cursorPoint;
|
pauseCtx->cursorPoint[PAUSE_EQUIP] = cursorPoint;
|
||||||
cursorMoveResult = 3;
|
cursorMoveResult = 3;
|
||||||
}
|
}
|
||||||
} else if (pauseCtx->stickRelY < -30) {
|
} else if (pauseCtx->stickAdjY < -30) {
|
||||||
if (pauseCtx->cursorY[PAUSE_EQUIP] < 3) {
|
if (pauseCtx->cursorY[PAUSE_EQUIP] < 3) {
|
||||||
pauseCtx->cursorY[PAUSE_EQUIP] += 1;
|
pauseCtx->cursorY[PAUSE_EQUIP] += 1;
|
||||||
pauseCtx->cursorPoint[PAUSE_EQUIP] += 4;
|
pauseCtx->cursorPoint[PAUSE_EQUIP] += 4;
|
||||||
|
@ -304,7 +304,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||||
if (pauseCtx->stickRelX > 30) {
|
if (pauseCtx->stickAdjX > 30) {
|
||||||
pauseCtx->nameDisplayTimer = 0;
|
pauseCtx->nameDisplayTimer = 0;
|
||||||
pauseCtx->cursorSpecialPos = 0;
|
pauseCtx->cursorSpecialPos = 0;
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (pauseCtx->stickRelX < -30) {
|
if (pauseCtx->stickAdjX < -30) {
|
||||||
pauseCtx->nameDisplayTimer = 0;
|
pauseCtx->nameDisplayTimer = 0;
|
||||||
pauseCtx->cursorSpecialPos = 0;
|
pauseCtx->cursorSpecialPos = 0;
|
||||||
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
Audio_PlaySfxGeneral(NA_SE_SY_CURSOR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||||
|
|
|
@ -115,10 +115,10 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
||||||
pauseCtx->cursorColorSet = 4;
|
pauseCtx->cursorColorSet = 4;
|
||||||
|
|
||||||
if (cursorItem == PAUSE_ITEM_NONE) {
|
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];
|
cursorPoint = pauseCtx->cursorPoint[PAUSE_ITEM];
|
||||||
cursorX = pauseCtx->cursorX[PAUSE_ITEM];
|
cursorX = pauseCtx->cursorX[PAUSE_ITEM];
|
||||||
cursorY = pauseCtx->cursorY[PAUSE_ITEM];
|
cursorY = pauseCtx->cursorY[PAUSE_ITEM];
|
||||||
|
@ -130,7 +130,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
||||||
if (gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]]) {}
|
if (gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]]) {}
|
||||||
|
|
||||||
while (moveCursorResult == 0) {
|
while (moveCursorResult == 0) {
|
||||||
if (pauseCtx->stickRelX < -30) {
|
if (pauseCtx->stickAdjX < -30) {
|
||||||
if (pauseCtx->cursorX[PAUSE_ITEM] != 0) {
|
if (pauseCtx->cursorX[PAUSE_ITEM] != 0) {
|
||||||
pauseCtx->cursorX[PAUSE_ITEM] -= 1;
|
pauseCtx->cursorX[PAUSE_ITEM] -= 1;
|
||||||
pauseCtx->cursorPoint[PAUSE_ITEM] -= 1;
|
pauseCtx->cursorPoint[PAUSE_ITEM] -= 1;
|
||||||
|
@ -162,7 +162,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
||||||
moveCursorResult = 2;
|
moveCursorResult = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (pauseCtx->stickRelX > 30) {
|
} else if (pauseCtx->stickAdjX > 30) {
|
||||||
if (pauseCtx->cursorX[PAUSE_ITEM] < 5) {
|
if (pauseCtx->cursorX[PAUSE_ITEM] < 5) {
|
||||||
pauseCtx->cursorX[PAUSE_ITEM] += 1;
|
pauseCtx->cursorX[PAUSE_ITEM] += 1;
|
||||||
pauseCtx->cursorPoint[PAUSE_ITEM] += 1;
|
pauseCtx->cursorPoint[PAUSE_ITEM] += 1;
|
||||||
|
@ -206,7 +206,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
||||||
cursorItem, pauseCtx->cursorSpecialPos);
|
cursorItem, pauseCtx->cursorSpecialPos);
|
||||||
}
|
}
|
||||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||||
if (pauseCtx->stickRelX > 30) {
|
if (pauseCtx->stickAdjX > 30) {
|
||||||
pauseCtx->nameDisplayTimer = 0;
|
pauseCtx->nameDisplayTimer = 0;
|
||||||
pauseCtx->cursorSpecialPos = 0;
|
pauseCtx->cursorSpecialPos = 0;
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (pauseCtx->stickRelX < -30) {
|
if (pauseCtx->stickAdjX < -30) {
|
||||||
pauseCtx->nameDisplayTimer = 0;
|
pauseCtx->nameDisplayTimer = 0;
|
||||||
pauseCtx->cursorSpecialPos = 0;
|
pauseCtx->cursorSpecialPos = 0;
|
||||||
|
|
||||||
|
@ -280,13 +280,13 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
||||||
|
|
||||||
if (pauseCtx->cursorSpecialPos == 0) {
|
if (pauseCtx->cursorSpecialPos == 0) {
|
||||||
if (cursorItem != PAUSE_ITEM_NONE) {
|
if (cursorItem != PAUSE_ITEM_NONE) {
|
||||||
if (ABS(pauseCtx->stickRelY) > 30) {
|
if (ABS(pauseCtx->stickAdjY) > 30) {
|
||||||
moveCursorResult = 0;
|
moveCursorResult = 0;
|
||||||
|
|
||||||
cursorPoint = pauseCtx->cursorPoint[PAUSE_ITEM];
|
cursorPoint = pauseCtx->cursorPoint[PAUSE_ITEM];
|
||||||
cursorY = pauseCtx->cursorY[PAUSE_ITEM];
|
cursorY = pauseCtx->cursorY[PAUSE_ITEM];
|
||||||
while (moveCursorResult == 0) {
|
while (moveCursorResult == 0) {
|
||||||
if (pauseCtx->stickRelY > 30) {
|
if (pauseCtx->stickAdjY > 30) {
|
||||||
if (pauseCtx->cursorY[PAUSE_ITEM] != 0) {
|
if (pauseCtx->cursorY[PAUSE_ITEM] != 0) {
|
||||||
pauseCtx->cursorY[PAUSE_ITEM] -= 1;
|
pauseCtx->cursorY[PAUSE_ITEM] -= 1;
|
||||||
pauseCtx->cursorPoint[PAUSE_ITEM] -= 6;
|
pauseCtx->cursorPoint[PAUSE_ITEM] -= 6;
|
||||||
|
@ -300,7 +300,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
|
||||||
|
|
||||||
moveCursorResult = 2;
|
moveCursorResult = 2;
|
||||||
}
|
}
|
||||||
} else if (pauseCtx->stickRelY < -30) {
|
} else if (pauseCtx->stickAdjY < -30) {
|
||||||
if (pauseCtx->cursorY[PAUSE_ITEM] < 3) {
|
if (pauseCtx->cursorY[PAUSE_ITEM] < 3) {
|
||||||
pauseCtx->cursorY[PAUSE_ITEM] += 1;
|
pauseCtx->cursorY[PAUSE_ITEM] += 1;
|
||||||
pauseCtx->cursorPoint[PAUSE_ITEM] += 6;
|
pauseCtx->cursorPoint[PAUSE_ITEM] += 6;
|
||||||
|
|
|
@ -52,7 +52,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
oldCursorPoint = pauseCtx->cursorPoint[PAUSE_MAP];
|
oldCursorPoint = pauseCtx->cursorPoint[PAUSE_MAP];
|
||||||
|
|
||||||
if (pauseCtx->cursorSpecialPos == 0) {
|
if (pauseCtx->cursorSpecialPos == 0) {
|
||||||
if (pauseCtx->stickRelX > 30) {
|
if (pauseCtx->stickAdjX > 30) {
|
||||||
if (pauseCtx->cursorX[PAUSE_MAP] != 0) {
|
if (pauseCtx->cursorX[PAUSE_MAP] != 0) {
|
||||||
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_RIGHT);
|
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_RIGHT);
|
||||||
} else {
|
} else {
|
||||||
|
@ -68,7 +68,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (pauseCtx->stickRelX < -30) {
|
} else if (pauseCtx->stickAdjX < -30) {
|
||||||
if (pauseCtx->cursorX[PAUSE_MAP] == 0) {
|
if (pauseCtx->cursorX[PAUSE_MAP] == 0) {
|
||||||
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_LEFT);
|
KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_LEFT);
|
||||||
} else {
|
} else {
|
||||||
|
@ -83,7 +83,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pauseCtx->cursorPoint[PAUSE_MAP] < 3) {
|
if (pauseCtx->cursorPoint[PAUSE_MAP] < 3) {
|
||||||
if (pauseCtx->stickRelY > 30) {
|
if (pauseCtx->stickAdjY > 30) {
|
||||||
if (pauseCtx->cursorPoint[PAUSE_MAP] != 0) {
|
if (pauseCtx->cursorPoint[PAUSE_MAP] != 0) {
|
||||||
for (i = pauseCtx->cursorPoint[PAUSE_MAP] - 1; i >= 0; i--) {
|
for (i = pauseCtx->cursorPoint[PAUSE_MAP] - 1; i >= 0; i--) {
|
||||||
if (CHECK_DUNGEON_ITEM(i, gSaveContext.mapIndex)) {
|
if (CHECK_DUNGEON_ITEM(i, gSaveContext.mapIndex)) {
|
||||||
|
@ -93,7 +93,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (pauseCtx->stickRelY < -30) {
|
if (pauseCtx->stickAdjY < -30) {
|
||||||
if (pauseCtx->cursorPoint[PAUSE_MAP] != 2) {
|
if (pauseCtx->cursorPoint[PAUSE_MAP] != 2) {
|
||||||
for (i = pauseCtx->cursorPoint[PAUSE_MAP] + 1; i < 3; i++) {
|
for (i = pauseCtx->cursorPoint[PAUSE_MAP] + 1; i < 3; i++) {
|
||||||
if (CHECK_DUNGEON_ITEM(i, gSaveContext.mapIndex)) {
|
if (CHECK_DUNGEON_ITEM(i, gSaveContext.mapIndex)) {
|
||||||
|
@ -105,7 +105,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (pauseCtx->stickRelY > 30) {
|
if (pauseCtx->stickAdjY > 30) {
|
||||||
if (pauseCtx->cursorPoint[PAUSE_MAP] >= 4) {
|
if (pauseCtx->cursorPoint[PAUSE_MAP] >= 4) {
|
||||||
for (i = pauseCtx->cursorPoint[PAUSE_MAP] - 3 - 1; i >= 0; i--) {
|
for (i = pauseCtx->cursorPoint[PAUSE_MAP] - 3 - 1; i >= 0; i--) {
|
||||||
if ((gSaveContext.sceneFlags[gSaveContext.mapIndex].floors & gBitFlags[i]) ||
|
if ((gSaveContext.sceneFlags[gSaveContext.mapIndex].floors & gBitFlags[i]) ||
|
||||||
|
@ -116,7 +116,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (pauseCtx->stickRelY < -30) {
|
} else if (pauseCtx->stickAdjY < -30) {
|
||||||
if (pauseCtx->cursorPoint[PAUSE_MAP] != 10) {
|
if (pauseCtx->cursorPoint[PAUSE_MAP] != 10) {
|
||||||
for (i = pauseCtx->cursorPoint[PAUSE_MAP] - 3 + 1; i < 11; i++) {
|
for (i = pauseCtx->cursorPoint[PAUSE_MAP] - 3 + 1; i < 11; i++) {
|
||||||
if ((gSaveContext.sceneFlags[gSaveContext.mapIndex].floors & gBitFlags[i]) ||
|
if ((gSaveContext.sceneFlags[gSaveContext.mapIndex].floors & gBitFlags[i]) ||
|
||||||
|
@ -139,7 +139,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||||
if (pauseCtx->stickRelX > 30) {
|
if (pauseCtx->stickAdjX > 30) {
|
||||||
pauseCtx->nameDisplayTimer = 0;
|
pauseCtx->nameDisplayTimer = 0;
|
||||||
pauseCtx->cursorSpecialPos = 0;
|
pauseCtx->cursorSpecialPos = 0;
|
||||||
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->dungeonMapSlot;
|
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->dungeonMapSlot;
|
||||||
|
@ -150,7 +150,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (pauseCtx->stickRelX < -30) {
|
if (pauseCtx->stickAdjX < -30) {
|
||||||
pauseCtx->nameDisplayTimer = 0;
|
pauseCtx->nameDisplayTimer = 0;
|
||||||
pauseCtx->cursorSpecialPos = 0;
|
pauseCtx->cursorSpecialPos = 0;
|
||||||
pauseCtx->cursorX[PAUSE_MAP] = 1;
|
pauseCtx->cursorX[PAUSE_MAP] = 1;
|
||||||
|
@ -417,7 +417,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
oldCursorPoint = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
oldCursorPoint = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
||||||
|
|
||||||
if (pauseCtx->cursorSpecialPos == 0) {
|
if (pauseCtx->cursorSpecialPos == 0) {
|
||||||
if (pauseCtx->stickRelX > 30) {
|
if (pauseCtx->stickAdjX > 30) {
|
||||||
D_8082A6D4 = 0;
|
D_8082A6D4 = 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
@ -428,7 +428,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} while (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] == 0);
|
} while (pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]] == 0);
|
||||||
} else if (pauseCtx->stickRelX < -30) {
|
} else if (pauseCtx->stickAdjX < -30) {
|
||||||
D_8082A6D4 = 0;
|
D_8082A6D4 = 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
@ -449,7 +449,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
} else {
|
} else {
|
||||||
pauseCtx->cursorItem[PAUSE_MAP] = gSaveContext.worldMapArea + 0x18;
|
pauseCtx->cursorItem[PAUSE_MAP] = gSaveContext.worldMapArea + 0x18;
|
||||||
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||||
if (pauseCtx->stickRelX > 30) {
|
if (pauseCtx->stickAdjX > 30) {
|
||||||
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 0;
|
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 0;
|
||||||
pauseCtx->cursorSpecialPos = 0;
|
pauseCtx->cursorSpecialPos = 0;
|
||||||
|
|
||||||
|
@ -465,7 +465,7 @@ void KaleidoScope_DrawWorldMap(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
D_8082A6D4 = 0;
|
D_8082A6D4 = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (pauseCtx->stickRelX < -30) {
|
if (pauseCtx->stickAdjX < -30) {
|
||||||
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 11;
|
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 11;
|
||||||
pauseCtx->cursorSpecialPos = 0;
|
pauseCtx->cursorSpecialPos = 0;
|
||||||
|
|
||||||
|
|
|
@ -431,7 +431,7 @@ void KaleidoScope_HandlePageToggles(PauseContext* pauseCtx, Input* input) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
|
||||||
if (pauseCtx->stickRelX < -30) {
|
if (pauseCtx->stickAdjX < -30) {
|
||||||
pauseCtx->delaySwitchPageInputTimer++;
|
pauseCtx->delaySwitchPageInputTimer++;
|
||||||
if ((pauseCtx->delaySwitchPageInputTimer >= 10) || (pauseCtx->delaySwitchPageInputTimer == 0)) {
|
if ((pauseCtx->delaySwitchPageInputTimer >= 10) || (pauseCtx->delaySwitchPageInputTimer == 0)) {
|
||||||
KaleidoScope_SwitchPage(pauseCtx, 0);
|
KaleidoScope_SwitchPage(pauseCtx, 0);
|
||||||
|
@ -440,7 +440,7 @@ void KaleidoScope_HandlePageToggles(PauseContext* pauseCtx, Input* input) {
|
||||||
pauseCtx->delaySwitchPageInputTimer = -1;
|
pauseCtx->delaySwitchPageInputTimer = -1;
|
||||||
}
|
}
|
||||||
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_RIGHT) {
|
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_RIGHT) {
|
||||||
if (pauseCtx->stickRelX > 30) {
|
if (pauseCtx->stickAdjX > 30) {
|
||||||
pauseCtx->delaySwitchPageInputTimer++;
|
pauseCtx->delaySwitchPageInputTimer++;
|
||||||
if ((pauseCtx->delaySwitchPageInputTimer >= 10) || (pauseCtx->delaySwitchPageInputTimer == 0)) {
|
if ((pauseCtx->delaySwitchPageInputTimer >= 10) || (pauseCtx->delaySwitchPageInputTimer == 0)) {
|
||||||
KaleidoScope_SwitchPage(pauseCtx, 2);
|
KaleidoScope_SwitchPage(pauseCtx, 2);
|
||||||
|
@ -613,23 +613,23 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pauseCtx->stickRelX < -30) {
|
if (pauseCtx->stickAdjX < -30) {
|
||||||
if (sStickXRepeatState == -1) {
|
if (sStickXRepeatState == -1) {
|
||||||
if (--sStickXRepeatTimer < 0) {
|
if (--sStickXRepeatTimer < 0) {
|
||||||
sStickXRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY_FIRST;
|
sStickXRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY_FIRST;
|
||||||
} else {
|
} else {
|
||||||
pauseCtx->stickRelX = 0;
|
pauseCtx->stickAdjX = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sStickXRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY;
|
sStickXRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY;
|
||||||
sStickXRepeatState = -1;
|
sStickXRepeatState = -1;
|
||||||
}
|
}
|
||||||
} else if (pauseCtx->stickRelX > 30) {
|
} else if (pauseCtx->stickAdjX > 30) {
|
||||||
if (sStickXRepeatState == 1) {
|
if (sStickXRepeatState == 1) {
|
||||||
if (--sStickXRepeatTimer < 0) {
|
if (--sStickXRepeatTimer < 0) {
|
||||||
sStickXRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY_FIRST;
|
sStickXRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY_FIRST;
|
||||||
} else {
|
} else {
|
||||||
pauseCtx->stickRelX = 0;
|
pauseCtx->stickAdjX = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sStickXRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY;
|
sStickXRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY;
|
||||||
|
@ -639,23 +639,23 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
|
||||||
sStickXRepeatState = 0;
|
sStickXRepeatState = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pauseCtx->stickRelY < -30) {
|
if (pauseCtx->stickAdjY < -30) {
|
||||||
if (sStickYRepeatState == -1) {
|
if (sStickYRepeatState == -1) {
|
||||||
if (--sStickYRepeatTimer < 0) {
|
if (--sStickYRepeatTimer < 0) {
|
||||||
sStickYRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY_FIRST;
|
sStickYRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY_FIRST;
|
||||||
} else {
|
} else {
|
||||||
pauseCtx->stickRelY = 0;
|
pauseCtx->stickAdjY = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sStickYRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY;
|
sStickYRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY;
|
||||||
sStickYRepeatState = -1;
|
sStickYRepeatState = -1;
|
||||||
}
|
}
|
||||||
} else if (pauseCtx->stickRelY > 30) {
|
} else if (pauseCtx->stickAdjY > 30) {
|
||||||
if (sStickYRepeatState == 1) {
|
if (sStickYRepeatState == 1) {
|
||||||
if (--sStickYRepeatTimer < 0) {
|
if (--sStickYRepeatTimer < 0) {
|
||||||
sStickYRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY_FIRST;
|
sStickYRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY_FIRST;
|
||||||
} else {
|
} else {
|
||||||
pauseCtx->stickRelY = 0;
|
pauseCtx->stickAdjY = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sStickYRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY;
|
sStickYRepeatTimer = R_PAUSE_STICK_REPEAT_DELAY;
|
||||||
|
@ -2436,8 +2436,8 @@ void KaleidoScope_Draw(PlayState* play) {
|
||||||
|
|
||||||
OPEN_DISPS(play->state.gfxCtx, "../z_kaleido_scope_PAL.c", 3188);
|
OPEN_DISPS(play->state.gfxCtx, "../z_kaleido_scope_PAL.c", 3188);
|
||||||
|
|
||||||
pauseCtx->stickRelX = input->rel.stick_x;
|
pauseCtx->stickAdjX = input->rel.stick_x;
|
||||||
pauseCtx->stickRelY = input->rel.stick_y;
|
pauseCtx->stickAdjY = input->rel.stick_y;
|
||||||
|
|
||||||
gSPSegment(POLY_OPA_DISP++, 0x02, interfaceCtx->parameterSegment);
|
gSPSegment(POLY_OPA_DISP++, 0x02, interfaceCtx->parameterSegment);
|
||||||
gSPSegment(POLY_OPA_DISP++, 0x07, pauseCtx->playerSegment);
|
gSPSegment(POLY_OPA_DISP++, 0x07, pauseCtx->playerSegment);
|
||||||
|
@ -2686,8 +2686,8 @@ void KaleidoScope_Update(PlayState* play) {
|
||||||
(pauseCtx->mainSubState == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG)) &&
|
(pauseCtx->mainSubState == PAUSE_MAIN_STATE_IDLE_CURSOR_ON_SONG)) &&
|
||||||
(pauseCtx->state == PAUSE_STATE_MAIN)) {
|
(pauseCtx->state == PAUSE_STATE_MAIN)) {
|
||||||
|
|
||||||
pauseCtx->stickRelX = input->rel.stick_x;
|
pauseCtx->stickAdjX = input->rel.stick_x;
|
||||||
pauseCtx->stickRelY = input->rel.stick_y;
|
pauseCtx->stickAdjY = input->rel.stick_y;
|
||||||
|
|
||||||
KaleidoScope_UpdateCursorSize(play);
|
KaleidoScope_UpdateCursorSize(play);
|
||||||
KaleidoScope_HandlePageToggles(pauseCtx, input);
|
KaleidoScope_HandlePageToggles(pauseCtx, input);
|
||||||
|
|
Loading…
Add table
Reference in a new issue