Kaleido OK & icon_item_vtx_static (Documented) (#1243)

* Begin Kaleido

* WIP

* DW macros for gbi

* More Progress

* Match KaleidoScope_GrayOutTextureRGBA32

* DrawGameOver wip

* Add some function names

* A few more matching, some docs

* More docs, data wip

* Import Kaleido Data

* Data cleanup

* Some progress

* Match TitleCard_Draw Again (Thanks Roman)

* Match KaleidoScope_DrawDebugEditor

* KaleidoScope_UpdateDebugEditor WIP

* Some cleanup

* z_kaleido_debug.c OK

* Cleanup

* match func_8081B6EC

* more wip, data cleanup

* match func_80825A50

* match KaleidoScope_InitVertices

* cursor progress

* name func

* item headers

* match KaleidoScope_DrawItemSelect

* KaleidoScope_UpdateItemEquip WIP

* match kaleido item

* doc kaleido item

* z_kaleido_prompt ok

* kaleido mask setup

* small cleanup

* kaleido mask OK

* mask cleanup

* small fix

* quest page setup

* doc save prompt

* sync with prompt docs

* KaleidoScope_Update WIP

* More progress on KaleidoScope_Update

* kaleido update cleanup

* KaleidoScope_Update OK

* Slightly cleaner match in KaleidoScope_Update

* match KaleidoScope_DrawPages and KaleidoScope_DrawGameOver, organize data

* more cleanup

* match KaleidoScope_Draw and KaleidoScope_SetView

* match KaleidoScope_UpdateNamePanel

* match another 2 funcs, segment docs

* another KaleidoScope_UpdateNamePanel ?

* swap update name panel names

* another match, only 2 large/similar vtx function in kaleido nes

* more setup for drawInfoPanel

* match KaleidoScope_DrawDungeonStrayFairyCount, 8 funcs left

* document KaleidoScope_DrawDungeonStrayFairyCount

* KaleidoScope_DrawInfoPanel1 WIP

* match KaleidoScope_DrawInfoPanel2

* gameover pause states

* name two pause states

* match KaleidoScope_UpdateDungeonCursor and KaleidoScope_UpdateWorldMapCursor

* match KaleidoScope_DrawDungeonMap

* KaleidoScope_DrawWorldMap WIP

* cleanup map

* some cursor/texture docs

* more cursor docs

* KaleidoScope_UpdateQuestCursor wip

* match KaleidoScope_UpdateQuestCursor

* quest cleanup

* KaleidoScope_DrawQuestStatus WIP, broke gakufu

* match KaleidoScope_DrawInfoPanel1, Kaleido NES OK

* pause substates

* more cleanup

* map progress

* very small improvements to KaleidoScope_DrawWorldMap

* match KaleidoScope_DrawWorldMap

* cleanup KaleidoScope_DrawWorldMap

* rematch EnGakufu_ProcessNotes, thanks anon58

* gameover and misc docs

* more docs

* small cleanup of maps

* owl warp and other docs

* symmetry in pause state

* some docs and cleanup

* docs

* more docs from OoT WIP

* fix

* quest page docs

* more enums

* more cleanup and enums

* another round of docs

* doc cursor indices

* map docs

* some docs

* cleanup for-loops

* cleanup

* else if

* small docs

* icon_item_field_static

* dungeon static

* eol

* icon item jpn static

* vtx static

* jpn static comments

* import parameter texture functions

* mask cleanup

* sync with PRs

* some docs

* more docs

* fix bss

* some docs

* sync with PR

* quest docs

* fix quest vtx

* sync with PR

* sync with PR

* fix typo

* small cleanup

* vtx madness

* more vtx

* add quad docs

* cleanup vtx

* cleanup

* cleanup

* revert gbi changes

* cleanup

* more cleanup

* another cleanup

* remove empty comment

* some PR review

* more naming suggestions

* namefixer

* L button to Z button

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
This commit is contained in:
engineer124
2023-05-30 02:04:21 +10:00
committed by GitHub
parent fc475a9756
commit aa0a968791
16 changed files with 1413 additions and 221 deletions
+13 -17
View File
@@ -849,17 +849,12 @@ void TitleCard_Draw(GameState* gameState, TitleCardContext* titleCtx) {
if (titleCtx->alpha != 0) {
s32 width = titleCtx->width;
s32 height = titleCtx->height;
s32 unk1;
s32 spC0;
s32 sp38;
s32 spB8;
s32 spB4;
s32 temp;
temp = width * 2;
spC0 = (titleCtx->x * 4) - temp;
spB8 = (titleCtx->y * 4) - (height * 2);
sp38 = width * 2;
s32 doubleWidth = width * 2;
s32 titleX = (titleCtx->x * 4) - doubleWidth;
s32 doubleHeight = height * 2;
s32 titleY = (titleCtx->y * 4) - doubleHeight;
s32 titleSecondY;
s32 textureLanguageOffset;
OPEN_DISPS(gameState->gfxCtx);
@@ -867,29 +862,30 @@ void TitleCard_Draw(GameState* gameState, TitleCardContext* titleCtx) {
height = TMEM_SIZE / width;
}
spB4 = spB8 + (height * 4);
titleSecondY = titleY + (height * 4);
OVERLAY_DISP = Gfx_SetupDL52_NoCD(OVERLAY_DISP);
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity,
(u8)titleCtx->alpha);
gDPLoadTextureBlock(OVERLAY_DISP++, (s32*)titleCtx->texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0,
gDPLoadTextureBlock(OVERLAY_DISP++, titleCtx->texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
G_TX_NOLOD);
gSPTextureRectangle(OVERLAY_DISP++, spC0, spB8, ((sp38 * 2) + spC0) - 4, spB8 + (height * 4) - 1,
gSPTextureRectangle(OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4) - 1,
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
height = titleCtx->height - height;
// If texture is bigger than 0x1000, display the rest
if (height > 0) {
gDPLoadTextureBlock(OVERLAY_DISP++, (s32)titleCtx->texture + 0x1000, G_IM_FMT_IA, G_IM_SIZ_8b, width,
gDPLoadTextureBlock(OVERLAY_DISP++, (uintptr_t)titleCtx->texture + 0x1000, G_IM_FMT_IA, G_IM_SIZ_8b, width,
height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(OVERLAY_DISP++, spC0, spB4, ((sp38 * 2) + spC0) - 4, spB4 + (height * 4) - 1,
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
gSPTextureRectangle(OVERLAY_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4,
titleSecondY + (height * 4) - 1, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
}
CLOSE_DISPS(gameState->gfxCtx);
+2 -2
View File
@@ -40,13 +40,13 @@ void KaleidoScopeCall_Update(PlayState* play) {
if (ShrinkWindow_Letterbox_GetSize() == 0) {
R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_SETUP;
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_0;
pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_APPEARING;
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1;
}
} else if (pauseCtx->state == PAUSE_STATE_GAMEOVER_0) {
R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_SETUP;
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_0;
pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_APPEARING;
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1;
} else if ((pauseCtx->state == PAUSE_STATE_OPENING_1) || (pauseCtx->state == PAUSE_STATE_GAMEOVER_1) ||
(pauseCtx->state == PAUSE_STATE_OWLWARP_1)) {
+1 -1
View File
@@ -145,7 +145,7 @@ void KaleidoSetup_Init(PlayState* play) {
pauseCtx->cursorPoint[PAUSE_MAP] = R_REVERSE_FLOOR_INDEX + (DUNGEON_FLOOR_INDEX_4 - 1);
pauseCtx->cursorSpecialPos = PAUSE_CURSOR_PAGE_RIGHT;
pauseCtx->pageSwitchTimer = 0;
pauseCtx->pageSwitchInputTimer = 0;
pauseCtx->cursorItem[PAUSE_ITEM] = PAUSE_ITEM_NONE;
pauseCtx->cursorItem[PAUSE_MAP] = R_REVERSE_FLOOR_INDEX + (DUNGEON_FLOOR_INDEX_4 - 1);
@@ -13,7 +13,7 @@ extern TexturePtr D_08061000; // gBombersNotebookIconTex
extern TexturePtr D_08062000; // gSongNoteIconTex
s16 sQuestRemainsColorTimerInit[] = { 120, 60, 2, 80 };
s16 sQuestHpColorTimerInit[] = { 20, 4, 20, 10 };
s16 sQuestHpColorTimerInits[] = { 20, 4, 20, 10 };
s16 sQuestSongPlayedOcarinaButtonsNum = 0;
u8 sQuestSongPlayedOcarinaButtons[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
s16 sQuestSongPlayedOcarinaButtonsAlpha[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
@@ -313,7 +313,7 @@ void KaleidoScope_DrawQuestStatus(PlayState* play) {
sQuestHpPrimGreen = sQuestHpPrimColorTargets[sQuestHpPrimColorTargetIndex][1];
sQuestHpPrimBlue = sQuestHpPrimColorTargets[sQuestHpPrimColorTargetIndex][2];
sQuestHpPrimAlpha = sQuestHpPrimColorTargets[sQuestHpPrimColorTargetIndex][3];
sQuestHpColorTimer = sQuestHpColorTimerInit[sQuestHpPrimColorTargetIndex];
sQuestHpColorTimer = sQuestHpColorTimerInits[sQuestHpPrimColorTargetIndex];
if (++sQuestHpPrimColorTargetIndex > 3) {
sQuestHpPrimColorTargetIndex = 0;
}
@@ -618,7 +618,7 @@ void KaleidoScope_UpdateQuestCursor(PlayState* play) {
if (pauseCtx->mainState == PAUSE_MAIN_STATE_SONG_PROMPT) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
}
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
nextCursorPoint = sCursorPointLinks[oldCursorPoint].left;
if (nextCursorPoint == CURSOR_TO_LEFT) {
@@ -641,7 +641,7 @@ void KaleidoScope_UpdateQuestCursor(PlayState* play) {
if (pauseCtx->mainState == PAUSE_MAIN_STATE_SONG_PROMPT) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
}
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
nextCursorPoint = sCursorPointLinks[oldCursorPoint].right;
if (nextCursorPoint == CURSOR_TO_RIGHT) {
@@ -666,7 +666,7 @@ void KaleidoScope_UpdateQuestCursor(PlayState* play) {
nextCursorPoint = sCursorPointLinks[oldCursorPoint].down;
while (nextCursorPoint > CURSOR_NONE) {
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
if (KaleidoScope_UpdateQuestStatusPoint(pauseCtx, nextCursorPoint)) {
break;
}
@@ -679,7 +679,7 @@ void KaleidoScope_UpdateQuestCursor(PlayState* play) {
}
nextCursorPoint = sCursorPointLinks[oldCursorPoint].up;
while (nextCursorPoint > CURSOR_NONE) {
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
if (KaleidoScope_UpdateQuestStatusPoint(pauseCtx, nextCursorPoint)) {
break;
}
@@ -907,7 +907,7 @@ void KaleidoScope_UpdateQuestCursor(PlayState* play) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
}
func_80821A04(play);
KaleidoScope_MoveCursorFromSpecialPos(play);
pauseCtx->cursorPoint[PAUSE_QUEST] = QUEST_BOMBERS_NOTEBOOK;
if (CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
@@ -925,7 +925,7 @@ void KaleidoScope_UpdateQuestCursor(PlayState* play) {
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
}
func_80821A04(play);
KaleidoScope_MoveCursorFromSpecialPos(play);
pauseCtx->cursorPoint[PAUSE_QUEST] = QUEST_REMAINS_GOHT;
if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
@@ -382,7 +382,7 @@ void KaleidoScope_UpdateItemCursor(PlayState* play) {
while (moveCursorResult == PAUSE_CURSOR_RESULT_NONE) {
if (pauseCtx->stickAdjX < -30) {
// move cursor left
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
if (pauseCtx->cursorXIndex[PAUSE_ITEM] != 0) {
pauseCtx->cursorXIndex[PAUSE_ITEM]--;
pauseCtx->cursorPoint[PAUSE_ITEM]--;
@@ -413,7 +413,7 @@ void KaleidoScope_UpdateItemCursor(PlayState* play) {
}
} else if (pauseCtx->stickAdjX > 30) {
// move cursor right
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
if (pauseCtx->cursorXIndex[PAUSE_ITEM] <= 4) {
pauseCtx->cursorXIndex[PAUSE_ITEM]++;
pauseCtx->cursorPoint[PAUSE_ITEM]++;
@@ -451,7 +451,7 @@ void KaleidoScope_UpdateItemCursor(PlayState* play) {
}
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
if (pauseCtx->stickAdjX > 30) {
func_80821A04(play);
KaleidoScope_MoveCursorFromSpecialPos(play);
cursorYIndex = 0;
cursorXIndex = 0;
cursorPoint = 0; // top row, left column (SLOT_OCARINA)
@@ -489,7 +489,7 @@ void KaleidoScope_UpdateItemCursor(PlayState* play) {
}
} else { // PAUSE_CURSOR_PAGE_RIGHT
if (pauseCtx->stickAdjX < -30) {
func_80821A04(play);
KaleidoScope_MoveCursorFromSpecialPos(play);
cursorXIndex = 5;
cursorPoint = 5; // top row, right columne (SLOT_TRADE_DEED)
cursorYIndex = 0;
@@ -541,7 +541,7 @@ void KaleidoScope_UpdateItemCursor(PlayState* play) {
moveCursorResult = PAUSE_CURSOR_RESULT_SPECIAL_POS;
if (pauseCtx->cursorYIndex[PAUSE_ITEM] != 0) {
pauseCtx->cursorYIndex[PAUSE_ITEM]--;
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
pauseCtx->cursorPoint[PAUSE_ITEM] -= 6;
moveCursorResult = PAUSE_CURSOR_RESULT_SLOT;
} else {
@@ -553,7 +553,7 @@ void KaleidoScope_UpdateItemCursor(PlayState* play) {
moveCursorResult = PAUSE_CURSOR_RESULT_SPECIAL_POS;
if (pauseCtx->cursorYIndex[PAUSE_ITEM] < 3) {
pauseCtx->cursorYIndex[PAUSE_ITEM]++;
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
pauseCtx->cursorPoint[PAUSE_ITEM] += 6;
moveCursorResult = PAUSE_CURSOR_RESULT_SLOT;
} else {
@@ -152,7 +152,7 @@ void KaleidoScope_DrawDungeonMap(PlayState* play) {
// QUAD_MAP_PAGE_DUNGEON_BOSS_KEY,
// QUAD_MAP_PAGE_DUNGEON_COMPASS,
// QUAD_MAP_PAGE_DUNGEON_MAP
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[60], 16, 0);
gSPVertex(POLY_OPA_DISP++, &pauseCtx->mapPageVtx[QUAD_MAP_PAGE_DUNGEON_TITLE * 4], 4 * 4, 0);
// Dungeon Title
gDPPipeSync(POLY_OPA_DISP++);
@@ -317,9 +317,9 @@ void KaleidoScope_UpdateDungeonCursor(PlayState* play) {
pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_WHITE;
oldCursorPoint = pauseCtx->cursorPoint[PAUSE_MAP];
if (pauseCtx->stickAdjX > 30) {
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
func_80821A04(play);
KaleidoScope_MoveCursorFromSpecialPos(play);
pauseCtx->cursorXIndex[PAUSE_MAP] = 0;
pauseCtx->cursorSlot[PAUSE_MAP] = pauseCtx->unk_256;
pauseCtx->cursorPoint[PAUSE_MAP] = pauseCtx->unk_256;
@@ -345,9 +345,9 @@ void KaleidoScope_UpdateDungeonCursor(PlayState* play) {
}
}
} else if (pauseCtx->stickAdjX < -30) {
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_RIGHT) {
func_80821A04(play);
KaleidoScope_MoveCursorFromSpecialPos(play);
pauseCtx->cursorXIndex[PAUSE_MAP] = 1;
pauseCtx->cursorPoint[PAUSE_MAP] = DUNGEON_MAP;
if (!CHECK_DUNGEON_ITEM(DUNGEON_MAP, gSaveContext.dungeonIndex)) {
@@ -390,7 +390,7 @@ void KaleidoScope_UpdateDungeonCursor(PlayState* play) {
gBitFlags[i]) ||
func_801090B0(FLOOR_INDEX_MAX - i)) {
pauseCtx->cursorPoint[PAUSE_MAP] = i + DUNGEON_FLOOR_INDEX_4;
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
break;
}
}
@@ -411,7 +411,7 @@ void KaleidoScope_UpdateDungeonCursor(PlayState* play) {
gBitFlags[i]) ||
func_801090B0(FLOOR_INDEX_MAX - i)) {
pauseCtx->cursorPoint[PAUSE_MAP] = i + DUNGEON_FLOOR_INDEX_4;
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
break;
}
}
@@ -854,7 +854,7 @@ void KaleidoScope_UpdateWorldMapCursor(PlayState* play) {
if (pauseCtx->cursorSpecialPos == 0) {
if (pauseCtx->stickAdjX > 30) {
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
sStickAdjTimer = 0;
while (true) {
@@ -869,7 +869,7 @@ void KaleidoScope_UpdateWorldMapCursor(PlayState* play) {
}
}
} else if (pauseCtx->stickAdjX < -30) {
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
sStickAdjTimer = 0;
while (true) {
@@ -898,7 +898,7 @@ void KaleidoScope_UpdateWorldMapCursor(PlayState* play) {
if (pauseCtx->stickAdjX > 30) {
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = -1;
pauseCtx->cursorSpecialPos = 0;
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
while (true) {
pauseCtx->cursorPoint[PAUSE_WORLD_MAP]++;
@@ -923,7 +923,7 @@ void KaleidoScope_UpdateWorldMapCursor(PlayState* play) {
} else if (pauseCtx->stickAdjX < -30) {
pauseCtx->cursorPoint[PAUSE_WORLD_MAP] = 11;
pauseCtx->cursorSpecialPos = 0;
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
while (true) {
pauseCtx->cursorPoint[PAUSE_WORLD_MAP]--;
@@ -958,7 +958,7 @@ void KaleidoScope_UpdateWorldMapCursor(PlayState* play) {
oldCursorPoint = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
if (pauseCtx->stickAdjX > 30) {
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
sStickAdjTimer = 0;
do {
pauseCtx->cursorPoint[PAUSE_WORLD_MAP]++;
@@ -967,7 +967,7 @@ void KaleidoScope_UpdateWorldMapCursor(PlayState* play) {
}
} while (!pauseCtx->worldMapPoints[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]]);
} else if (pauseCtx->stickAdjX < -30) {
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
sStickAdjTimer = 0;
do {
pauseCtx->cursorPoint[PAUSE_WORLD_MAP]--;
@@ -309,7 +309,7 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) {
while (moveCursorResult == PAUSE_CURSOR_RESULT_NONE) {
if (pauseCtx->stickAdjX < -30) {
// move cursor left
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
if (pauseCtx->cursorXIndex[PAUSE_MASK] != 0) {
pauseCtx->cursorXIndex[PAUSE_MASK]--;
pauseCtx->cursorPoint[PAUSE_MASK]--;
@@ -339,7 +339,7 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) {
}
} else if (pauseCtx->stickAdjX > 30) {
// move cursor right
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
if (pauseCtx->cursorXIndex[PAUSE_MASK] <= 4) {
pauseCtx->cursorXIndex[PAUSE_MASK]++;
pauseCtx->cursorPoint[PAUSE_MASK]++;
@@ -380,7 +380,7 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) {
}
} else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
if (pauseCtx->stickAdjX > 30) {
func_80821A04(play);
KaleidoScope_MoveCursorFromSpecialPos(play);
cursorYIndex = 0;
cursorXIndex = 0;
cursorPoint = 0; // top row, left column (SLOT_MASK_POSTMAN)
@@ -421,7 +421,7 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) {
//! FAKE:
if (1) {}
if (pauseCtx->stickAdjX < -30) {
func_80821A04(play);
KaleidoScope_MoveCursorFromSpecialPos(play);
cursorXIndex = 5;
cursorPoint = 5; // top row, right column (SLOT_MASK_DEKU)
cursorYIndex = 0;
@@ -473,7 +473,7 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) {
// move cursor up
moveCursorResult = PAUSE_CURSOR_RESULT_SPECIAL_POS;
if (pauseCtx->cursorYIndex[PAUSE_MASK] != 0) {
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
pauseCtx->cursorYIndex[PAUSE_MASK]--;
pauseCtx->cursorPoint[PAUSE_MASK] -= 6;
moveCursorResult = PAUSE_CURSOR_RESULT_SLOT;
@@ -485,7 +485,7 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) {
// move cursor down
moveCursorResult = PAUSE_CURSOR_RESULT_SPECIAL_POS;
if (pauseCtx->cursorYIndex[PAUSE_MASK] < 3) {
pauseCtx->unk_298 = 4.0f;
pauseCtx->cursorShrinkRate = 4.0f;
pauseCtx->cursorYIndex[PAUSE_MASK]++;
pauseCtx->cursorPoint[PAUSE_MASK] += 6;
moveCursorResult = PAUSE_CURSOR_RESULT_SLOT;
@@ -76,9 +76,9 @@ typedef enum {
} PauseMainState;
typedef enum {
/* 0x00 */ PAUSE_SAVEPROMPT_STATE_0,
/* 0x00 */ PAUSE_SAVEPROMPT_STATE_APPEARING,
/* 0x01 */ PAUSE_SAVEPROMPT_STATE_1,
/* 0x02 */ PAUSE_SAVEPROMPT_STATE_2,
/* 0x02 */ PAUSE_SAVEPROMPT_STATE_RETURN_TO_MENU,
/* 0x03 */ PAUSE_SAVEPROMPT_STATE_3,
/* 0x04 */ PAUSE_SAVEPROMPT_STATE_4,
/* 0x05 */ PAUSE_SAVEPROMPT_STATE_5,
@@ -303,9 +303,35 @@ typedef enum {
/* 66 */ QUAD_MAP_PAGE_WORLD_MAX
} WorldMapPageQuad;
// === INFO PANEL === //
/**
* infoPanelVtx
*
* infoPanelVtx[0] name panel left texture
* infoPanelVtx[4] name panel right texture
* infoPanelVtx[8] Z Button icon
* infoPanelVtx[12] R Button icon
* infoPanelVtx[16] A button icon (or name segment)
* infoPanelVtx[20] pause-to-decide texture
* infoPanelVtx[24] (unused) oot remnant of Gold Skulltula Icon Texture
*/
#define PAUSE_NAME_COLOR_SET_WHITE 0
#define PAUSE_NAME_COLOR_SET_GREY 1
// === CURSOR === //
/**
* cursorVtx
*
* cursorVtx[0] cursor circle
* cursorVtx[4] (unused) oot remnant of top-right corner of cursor
* cursorVtx[8] (unused) oot remnant of bottom-left corner of cursor
* cursorVtx[12] (unused) oot remnant of bottom-right corner of cursor
* cursorVtx[16] equipping item icon (while moving)
*/
#define PAUSE_CURSOR_COLOR_SET_WHITE 0
#define PAUSE_CURSOR_COLOR_SET_YELLOW 2
#define PAUSE_CURSOR_COLOR_SET_BLUE 4
@@ -326,6 +352,36 @@ typedef enum {
/* 5 */ PAUSE_QUAD_CURSOR_MAX
} PauseCursorQuad;
// === PROMPT === //
/**
* promptPageVtx (unused in MM, inferred from OoT)
*
* // PAGE_BG_QUADS
* promptPageVtx[0] prompt page background texture: row 0, column 0
* promptPageVtx[4] prompt page background texture: row 1, column 0
* promptPageVtx[8] prompt page background texture: row 2, column 0
* promptPageVtx[12] prompt page background texture: row 3, column 0
* promptPageVtx[16] prompt page background texture: row 4, column 0
* promptPageVtx[20] prompt page background texture: row 0, column 1
* promptPageVtx[24] prompt page background texture: row 1, column 1
* promptPageVtx[28] prompt page background texture: row 2, column 1
* promptPageVtx[32] prompt page background texture: row 3, column 1
* promptPageVtx[36] prompt page background texture: row 4, column 1
* promptPageVtx[40] prompt page background texture: row 0, column 2
* promptPageVtx[44] prompt page background texture: row 1, column 2
* promptPageVtx[48] prompt page background texture: row 2, column 2
* promptPageVtx[52] prompt page background texture: row 3, column 2
* promptPageVtx[56] prompt page background texture: row 4, column 2
*
* // QUAD_PROMPT_MAX
* promptPageVtx[60] message
* promptPageVtx[64] cursor left
* promptPageVtx[68] cursor right
* promptPageVtx[72] choice (yes)
* promptPageVtx[76] choice (no)
*/
#define PAUSE_PROMPT_YES 0
#define PAUSE_PROMPT_NO 4
@@ -342,7 +398,7 @@ typedef enum {
void KaleidoScope_MoveCursorToSpecialPos(PlayState* play, s16 cursorSpecialPos);
void KaleidoScope_DrawTexQuadRGBA32(GraphicsContext* gfxCtx, TexturePtr texture, u16 width, u16 height, u16 point);
void KaleidoScope_SetView(PauseContext* pauseCtx, f32 eyeX, f32 eyeY, f32 eyeZ);
void func_80821A04(PlayState* play);
void KaleidoScope_MoveCursorFromSpecialPos(PlayState* play);
// Map
void KaleidoScope_DrawDungeonMap(PlayState* play);
File diff suppressed because it is too large Load Diff