summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2022-10-12 23:39:39 -0400
committerGitHub <noreply@github.com>2022-10-13 04:39:39 +0100
commitf3db0299367c4dd7cf44ab9e12cf6c8b56d598ab (patch)
treeeb04b18ef915e478290d49a7ba4e1fa673e8918f /src
parent868029b213128eaa24d0b80f854f71704cfafe8c (diff)
z_kaleido_collect.c (1 non-matching) and Mostly Documented (Pause Menu Quest Page) (#1108)
* import quest docs * cleanup * eol * temp change to non-eq * more missed stuff * fix questVtx * PR suggestions * adjust comment * missed two * PR Suggestions
Diffstat (limited to 'src')
-rw-r--r--src/code/audio/code_8019AF00.c2
-rw-r--r--src/code/code_8012EC80.c12
-rw-r--r--src/code/z_demo.c2
-rw-r--r--src/code/z_kaleido_setup.c4
-rw-r--r--src/code/z_message.c2
-rw-r--r--src/code/z_parameter.c6
-rw-r--r--src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c4
-rw-r--r--src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c6
-rw-r--r--src/overlays/actors/ovl_En_Fall/z_en_fall.c2
-rw-r--r--src/overlays/actors/ovl_En_Gakufu/z_en_gakufu.c5
-rw-r--r--src/overlays/actors/ovl_En_Giant/z_en_giant.c2
-rw-r--r--src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c2
-rw-r--r--src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_collect.c1028
-rw-r--r--src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_debug.c2
-rw-r--r--src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c16
-rw-r--r--src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_map.c6
-rw-r--r--src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c14
-rw-r--r--src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h26
-rw-r--r--src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c191
19 files changed, 1197 insertions, 135 deletions
diff --git a/src/code/audio/code_8019AF00.c b/src/code/audio/code_8019AF00.c
index 6d1468d82..9df12e7fe 100644
--- a/src/code/audio/code_8019AF00.c
+++ b/src/code/audio/code_8019AF00.c
@@ -2733,7 +2733,7 @@ void AudioOcarina_SetOcarinaDisableTimer(u8 unused, u8 timer) {
sOcarinaUnused = unused;
}
-u32 AudioOcarina_SetInstrument(u8 ocarinaInstrumentId) {
+void AudioOcarina_SetInstrument(u8 ocarinaInstrumentId) {
if ((sOcarinaInstrumentId != ocarinaInstrumentId) || (ocarinaInstrumentId == OCARINA_INSTRUMENT_DEFAULT)) {
Audio_QueueSeqCmd(0x80000000 | ((u32)(SEQ_PLAYER_SFX) << 24) | ((u32)(1) << 16) |
((u32)(SFX_CHANNEL_OCARINA) << 8) | (u32)(ocarinaInstrumentId));
diff --git a/src/code/code_8012EC80.c b/src/code/code_8012EC80.c
index eb70cfbc8..fb6f0743d 100644
--- a/src/code/code_8012EC80.c
+++ b/src/code/code_8012EC80.c
@@ -661,17 +661,17 @@ void Inventory_SetWorldMapCloudVisibility(s16 tingleIndex) {
i++;
}
- if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[0]) {
+ if (*tingleMapSceneIds == sSceneIdsPerTingleMap[TINGLE_MAP_CLOCK_TOWN]) {
gSaveContext.save.worldMapCloudVisibility |= 3;
- } else if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[1]) {
+ } else if (*tingleMapSceneIds == sSceneIdsPerTingleMap[TINGLE_MAP_WOODFALL]) {
gSaveContext.save.worldMapCloudVisibility |= 0x1C;
- } else if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[2]) {
+ } else if (*tingleMapSceneIds == sSceneIdsPerTingleMap[TINGLE_MAP_SNOWHEAD]) {
gSaveContext.save.worldMapCloudVisibility |= 0xE0;
- } else if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[3]) {
+ } else if (*tingleMapSceneIds == sSceneIdsPerTingleMap[TINGLE_MAP_ROMANI_RANCH]) {
gSaveContext.save.worldMapCloudVisibility |= 0x100;
- } else if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[4]) {
+ } else if (*tingleMapSceneIds == sSceneIdsPerTingleMap[TINGLE_MAP_GREAT_BAY]) {
gSaveContext.save.worldMapCloudVisibility |= 0x1E00;
- } else if ((*tingleMapSceneIds) == sSceneIdsPerTingleMap[5]) {
+ } else if (*tingleMapSceneIds == sSceneIdsPerTingleMap[TINGLE_MAP_STONE_TOWER]) {
gSaveContext.save.worldMapCloudVisibility |= 0x6000;
}
}
diff --git a/src/code/z_demo.c b/src/code/z_demo.c
index 1fa041be1..25b2b471a 100644
--- a/src/code/z_demo.c
+++ b/src/code/z_demo.c
@@ -990,7 +990,7 @@ void Cutscene_Command_Textbox(PlayState* play, CutsceneContext* csCtx, CsCmdText
D_801BB160 = CS_TEXTBOX_TYPE_1;
D_801BB124 = cmd->base;
if (cmd->type == CS_TEXTBOX_TYPE_BOSSES_REMAINS) {
- if (CHECK_QUEST_ITEM(QUEST_REMAINS_ODOWLA) && CHECK_QUEST_ITEM(QUEST_REMAINS_GOHT) &&
+ if (CHECK_QUEST_ITEM(QUEST_REMAINS_ODOLWA) && CHECK_QUEST_ITEM(QUEST_REMAINS_GOHT) &&
CHECK_QUEST_ITEM(QUEST_REMAINS_GYORG) && CHECK_QUEST_ITEM(QUEST_REMAINS_TWINMOLD)) {
if (cmd->textId1 != 0xFFFF) {
Message_StartTextbox(play, cmd->textId1, NULL);
diff --git a/src/code/z_kaleido_setup.c b/src/code/z_kaleido_setup.c
index 2f2e3c388..a096aaabe 100644
--- a/src/code/z_kaleido_setup.c
+++ b/src/code/z_kaleido_setup.c
@@ -137,8 +137,8 @@ void KaleidoSetup_Init(PlayState* play) {
pauseCtx->cursorSlot[PAUSE_ITEM] = 0;
pauseCtx->cursorSlot[PAUSE_MAP] = R_REVERSE_FLOOR_INDEX + (DUNGEON_FLOOR_INDEX_4 - 1);
- pauseCtx->cursorColorSet = 2;
- pauseCtx->unk_2A0 = -1;
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_YELLOW;
+ pauseCtx->ocarinaSongIndex = -1;
pauseCtx->equipAnimScale = 320;
pauseCtx->equipAnimShrinkRate = 40;
pauseCtx->promptAlpha = 100;
diff --git a/src/code/z_message.c b/src/code/z_message.c
index de3a81c73..5b3598617 100644
--- a/src/code/z_message.c
+++ b/src/code/z_message.c
@@ -329,7 +329,7 @@ void func_80151938(PlayState* play, u16 textId) {
}
msgCtx->unk1203C = msgCtx->unk1203A;
- if (play->pauseCtx.unk_1F0 != 0) {
+ if (play->pauseCtx.bombersNotebookOpen) {
msgCtx->unk12004 = 0x22;
msgCtx->unk12006 = 0x15E;
func_80149C18(play);
diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c
index 4620dd816..d463edff3 100644
--- a/src/code/z_parameter.c
+++ b/src/code/z_parameter.c
@@ -1172,7 +1172,9 @@ u8 Item_Give(PlayState* play, u8 item) {
}
if (item == ITEM_SKULL_TOKEN) {
- SET_QUEST_ITEM(item - ITEM_SKULL_TOKEN + QUEST_SKULL_TOKEN);
+ //! @bug: Sets QUEST_QUIVER instead of QUEST_SKULL_TOKEN
+ // Setting `QUEST_SKULL_TOKEN` will result in misplaced digits on the pause menu - Quest Status page.
+ SET_QUEST_ITEM(item - ITEM_SKULL_TOKEN + QUEST_QUIVER);
Inventory_IncrementSkullTokenCount(play->sceneId);
return ITEM_NONE;
@@ -1446,7 +1448,7 @@ u8 Item_Give(PlayState* play, u8 item) {
return ITEM_NONE;
} else if ((item >= ITEM_REMAINS_ODOLWA) && (item <= ITEM_REMAINS_TWINMOLD)) {
- SET_QUEST_ITEM(item - ITEM_REMAINS_ODOLWA + QUEST_REMAINS_ODOWLA);
+ SET_QUEST_ITEM(item - ITEM_REMAINS_ODOLWA + QUEST_REMAINS_ODOLWA);
return ITEM_NONE;
} else if (item == ITEM_RECOVERY_HEART) {
diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c
index 03531bb31..2d384ccf6 100644
--- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c
+++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c
@@ -75,7 +75,7 @@ void DoorWarp1_SetupAction(DoorWarp1* this, DoorWarp1ActionFunc actionFunc) {
s32 func_808B849C(DoorWarp1* this, PlayState* play) {
s32 ret = 0;
- if ((play->sceneId == SCENE_MITURIN_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_ODOWLA)) {
+ if ((play->sceneId == SCENE_MITURIN_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_ODOLWA)) {
ret = 1;
} else if ((play->sceneId == SCENE_HAKUGIN_BS) && !CHECK_QUEST_ITEM(QUEST_REMAINS_GOHT)) {
ret = 2;
@@ -239,7 +239,7 @@ void func_808B8C48(DoorWarp1* this, PlayState* play) {
this->dyna.actor.world.pos.z, 200, 255, 255, 255);
Lights_PointNoGlowSetInfo(&this->unk_1F4, this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
this->dyna.actor.world.pos.z, 200, 255, 255, 255);
- if (((DOORWARP1_GET_FF(&this->dyna.actor) == ENDOORWARP1_FF_2) && CHECK_QUEST_ITEM(QUEST_REMAINS_ODOWLA)) ||
+ if (((DOORWARP1_GET_FF(&this->dyna.actor) == ENDOORWARP1_FF_2) && CHECK_QUEST_ITEM(QUEST_REMAINS_ODOLWA)) ||
((DOORWARP1_GET_FF(&this->dyna.actor) == ENDOORWARP1_FF_3) && CHECK_QUEST_ITEM(QUEST_REMAINS_GOHT)) ||
((DOORWARP1_GET_FF(&this->dyna.actor) == ENDOORWARP1_FF_4) && CHECK_QUEST_ITEM(QUEST_REMAINS_GYORG)) ||
((DOORWARP1_GET_FF(&this->dyna.actor) == ENDOORWARP1_FF_5) && CHECK_QUEST_ITEM(QUEST_REMAINS_TWINMOLD))) {
diff --git a/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c b/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c
index e8c874df4..c21da42b0 100644
--- a/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c
+++ b/src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c
@@ -41,7 +41,7 @@ static InitChainEntry sInitChain[] = {
};
s32 func_80BA15A0(void) {
- if (CHECK_QUEST_ITEM(QUEST_REMAINS_ODOWLA) && !(gSaveContext.save.weekEventReg[87] & 0x10)) {
+ if (CHECK_QUEST_ITEM(QUEST_REMAINS_ODOLWA) && !(gSaveContext.save.weekEventReg[87] & 0x10)) {
return true;
}
@@ -61,7 +61,7 @@ s32 func_80BA15A0(void) {
}
void func_80BA165C(void) {
- if (CHECK_QUEST_ITEM(QUEST_REMAINS_ODOWLA)) {
+ if (CHECK_QUEST_ITEM(QUEST_REMAINS_ODOLWA)) {
gSaveContext.save.weekEventReg[87] |= 0x10;
}
@@ -88,7 +88,7 @@ s32 func_80BA16F4(ElfMsg6* this, PlayState* play) {
return true;
}
- if (!CHECK_QUEST_ITEM(QUEST_REMAINS_ODOWLA)) {
+ if (!CHECK_QUEST_ITEM(QUEST_REMAINS_ODOLWA)) {
this->actor.textId = 0x256;
return false;
}
diff --git a/src/overlays/actors/ovl_En_Fall/z_en_fall.c b/src/overlays/actors/ovl_En_Fall/z_en_fall.c
index d7d3e446e..508090fd5 100644
--- a/src/overlays/actors/ovl_En_Fall/z_en_fall.c
+++ b/src/overlays/actors/ovl_En_Fall/z_en_fall.c
@@ -324,7 +324,7 @@ void EnFall_CrashingMoon_HandleGiantsCutscene(EnFall* this, PlayState* play) {
break;
case 2:
- if (CHECK_QUEST_ITEM(QUEST_REMAINS_ODOWLA) && CHECK_QUEST_ITEM(QUEST_REMAINS_GOHT) &&
+ if (CHECK_QUEST_ITEM(QUEST_REMAINS_ODOLWA) && CHECK_QUEST_ITEM(QUEST_REMAINS_GOHT) &&
CHECK_QUEST_ITEM(QUEST_REMAINS_GYORG) && CHECK_QUEST_ITEM(QUEST_REMAINS_TWINMOLD)) {
if (gSaveContext.save.weekEventReg[93] & 4) {
if (ActorCutscene_GetCanPlayNext(0xC)) {
diff --git a/src/overlays/actors/ovl_En_Gakufu/z_en_gakufu.c b/src/overlays/actors/ovl_En_Gakufu/z_en_gakufu.c
index cc19acb63..9b4836637 100644
--- a/src/overlays/actors/ovl_En_Gakufu/z_en_gakufu.c
+++ b/src/overlays/actors/ovl_En_Gakufu/z_en_gakufu.c
@@ -115,9 +115,12 @@ void EnGakufu_ProcessNotes(EnGakufu* this) {
songIndex = this->songIndex;
ocarinaSongButtons = &gOcarinaSongButtons[songIndex];
+
+ //! FAKE:
+ if (1) {}
songNumButtons = gOcarinaSongButtons[this->songIndex].numButtons;
- for (i = 0; i < songNumButtons; i++) {
+ for (i = 0; i < (u8)songNumButtons; i++) {
this->buttonIndex[i] = ocarinaSongButtons->buttonIndex[i];
}
diff --git a/src/overlays/actors/ovl_En_Giant/z_en_giant.c b/src/overlays/actors/ovl_En_Giant/z_en_giant.c
index 7d2819ff9..10951f76d 100644
--- a/src/overlays/actors/ovl_En_Giant/z_en_giant.c
+++ b/src/overlays/actors/ovl_En_Giant/z_en_giant.c
@@ -110,7 +110,7 @@ s32 EnGiant_IsImprisoned(EnGiant* this) {
case GIANT_TYPE_SWAMP_CLOCK_TOWER_SUCCESS:
case GIANT_TYPE_SWAMP_GIANTS_CHAMBER_AND_ENDING:
case GIANT_TYPE_SWAMP_CLOCK_TOWER_FAILURE:
- if (!CHECK_QUEST_ITEM(QUEST_REMAINS_ODOWLA)) {
+ if (!CHECK_QUEST_ITEM(QUEST_REMAINS_ODOLWA)) {
return true;
}
break;
diff --git a/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c b/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c
index 04e44bb16..a8e74ff6e 100644
--- a/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c
+++ b/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c
@@ -91,7 +91,7 @@ void func_80AC9FE4(EnTimeTag* this, PlayState* play) {
ActorCutscene_StartAndSetUnkLinkFields(this->actor.cutscene, &this->actor);
this->actionFunc = func_80AC9FD4;
gSaveContext.timerStates[TIMER_ID_MOON_CRASH] = TIMER_STATE_OFF;
- if (CHECK_QUEST_ITEM(QUEST_REMAINS_ODOWLA) && CHECK_QUEST_ITEM(QUEST_REMAINS_GOHT) &&
+ if (CHECK_QUEST_ITEM(QUEST_REMAINS_ODOLWA) && CHECK_QUEST_ITEM(QUEST_REMAINS_GOHT) &&
CHECK_QUEST_ITEM(QUEST_REMAINS_GYORG) && CHECK_QUEST_ITEM(QUEST_REMAINS_TWINMOLD)) {
gSaveContext.save.weekEventReg[25] |= 2;
}
diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_collect.c b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_collect.c
index 316ad3355..90a1a0eff 100644
--- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_collect.c
+++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_collect.c
@@ -1,103 +1,1003 @@
/*
* File: z_kaleido_collect.c
* Overlay: ovl_kaleido_scope
- * Description:
+ * Description: Pause Menu - Quest Status Page
*/
#include "z_kaleido_scope.h"
+#include "interface/parameter_static/parameter_static.h"
-extern UNK_TYPE D_02001360;
-extern UNK_TYPE D_020044A0;
-extern UNK_TYPE D_02004AA0;
-extern UNK_TYPE D_0200B998;
-extern UNK_TYPE D_08062000;
-extern UNK_TYPE D_08064340;
-extern UNK_TYPE D_0B000000;
-extern UNK_TYPE D_0C000000;
-extern UNK_TYPE D_0C006C00;
+s32 KaleidoScope_UpdateQuestStatusPoint(PauseContext* pauseCtx, s16 point);
-s16 D_8082AED0[] = { 120, 60, 2, 80 };
+extern TexturePtr D_08061000; // gBombersNotebookIconTex
+extern TexturePtr D_08062000; // gSongNoteIconTex
-s16 D_8082AED8[] = { 20, 4, 20, 10 };
+s16 sQuestRemainsColorTimerInit[] = { 120, 60, 2, 80 };
+s16 sQuestHpColorTimerInit[] = { 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 };
+s16 sQuestHpPrimColorTargets[][4] = {
+ { 255, 0, 0, 255 },
+ { 255, 70, 0, 150 },
+ { 255, 70, 0, 150 },
+ { 255, 0, 0, 255 },
+};
+s16 sQuestRemainsEnvTargets[][3] = {
+ { 0, 0, 0 }, // QUEST_REMAINS_ODOLWA Target 1
+ { 0, 0, 0 }, // QUEST_REMAINS_GOHT Target 1
+ { 0, 0, 0 }, // QUEST_REMAINS_GYORG Target 1
+ { 0, 0, 0 }, // QUEST_REMAINS_TWINMOLD Target 1
+ { 0, 0, 0 }, // Unused
+ { 0, 0, 0 }, // Unused
+ { 0, 60, 0 }, // QUEST_REMAINS_ODOLWA Target 2
+ { 90, 0, 0 }, // QUEST_REMAINS_GOHT Target 2
+ { 0, 40, 110 }, // QUEST_REMAINS_GYORG Target 2
+ { 80, 40, 0 }, // QUEST_REMAINS_TWINMOLD Target 2
+ { 70, 0, 90 }, // Unused
+ { 90, 90, 0 }, // Unused
+};
+s16 sQuestRemainsEnvRed[] = {
+ 255, // QUEST_REMAINS_ODOLWA
+ 255, // QUEST_REMAINS_GOHT
+ 255, // QUEST_REMAINS_GYORG
+ 255, // QUEST_REMAINS_TWINMOLD
+ 255, // Unused
+ 255, // Unused
+};
+s16 sQuestRemainsEnvGreen[] = {
+ 255, // QUEST_REMAINS_ODOLWA
+ 255, // QUEST_REMAINS_GOHT
+ 255, // QUEST_REMAINS_GYORG
+ 255, // QUEST_REMAINS_TWINMOLD
+ 255, // Unused
+ 255, // Unused
+};
+s16 sQuestRemainsEnvBlue[] = {
+ 150, // QUEST_REMAINS_ODOLWA
+ 150, // QUEST_REMAINS_GOHT
+ 150, // QUEST_REMAINS_GYORG
+ 150, // QUEST_REMAINS_TWINMOLD
+ 150, // Unused
+ 150, // Unused
+};
-s32 D_8082AEE0 = 0;
+#ifdef NON_EQUIVALENT
+// TODO: is actually NON_MATCHING, update once `z_kaleido_scope_NES.c` is decompiled
+// A single small regalloc at the first `func_8010DC58` for the heart piece count (see `gItemIcons`)
+void KaleidoScope_DrawQuestStatus(PlayState* play) {
+ static s16 sQuestRemainsColorTimer = 20;
+ static s16 sQuestRemainsColorTimerIndex = 0;
+ static s16 sQuestHpPrimRed = 0;
+ static s16 sQuestHpPrimGreen = 0;
+ static s16 sQuestHpPrimBlue = 0;
+ static s16 sQuestHpPrimAlpha = 0;
+ static s16 sQuestHpColorTimer = 20;
+ static s16 sQuestHpPrimColorTargetIndex = 0;
+ static TexturePtr sOcarinaButtonTextures[] = {
+ gOcarinaATex, gOcarinaCDownTex, gOcarinaCRightTex, gOcarinaCLeftTex, gOcarinaCUpTex,
+ };
+ static s16 sQuestSongsPrimRed[] = {
+ 150, // QUEST_SONG_SONATA
+ 255, // QUEST_SONG_LULLABY
+ 100, // QUEST_SONG_BOSSA_NOVA
+ 255, // QUEST_SONG_ELEGY
+ 255, // QUEST_SONG_OATH
+ 255, // QUEST_SONG_SARIA
+ 255, // QUEST_SONG_TIME
+ 255, // QUEST_SONG_HEALING
+ 255, // QUEST_SONG_EPONA
+ 255, // QUEST_SONG_SOARING
+ 255, // QUEST_SONG_STORMS
+ 255, // QUEST_SONG_SUN
+ };
+ static s16 sQuestSongsPrimGreen[] = {
+ 255, // QUEST_SONG_SONATA
+ 80, // QUEST_SONG_LULLABY
+ 150, // QUEST_SONG_BOSSA_NOVA
+ 160, // QUEST_SONG_ELEGY
+ 100, // QUEST_SONG_OATH
+ 240, // QUEST_SONG_SARIA
+ 255, // QUEST_SONG_TIME
+ 255, // QUEST_SONG_HEALING
+ 255, // QUEST_SONG_EPONA
+ 255, // QUEST_SONG_SOARING
+ 255, // QUEST_SONG_STORMS
+ 255, // QUEST_SONG_SUN
+ };
+ static s16 sQuestSongsPrimBlue[] = {
+ 100, // QUEST_SONG_SONATA
+ 40, // QUEST_SONG_LULLABY
+ 255, // QUEST_SONG_BOSSA_NOVA
+ 0, // QUEST_SONG_ELEGY
+ 255, // QUEST_SONG_OATH
+ 100, // QUEST_SONG_SARIA
+ 255, // QUEST_SONG_TIME
+ 255, // QUEST_SONG_HEALING
+ 255, // QUEST_SONG_EPONA
+ 255, // QUEST_SONG_SOARING
+ 255, // QUEST_SONG_STORMS
+ 255, // QUEST_SONG_SUN
+ };
+ static TexturePtr sQuestUpgradeTextures[][3] = {
+ { 0x08053000, 0x08054000, 0x08055000 }, // UPG_QUIVER
+ { 0x08056000, 0x08057000, 0x08058000 }, // UPG_BOMB_BAG
+ };
+ static u8 sQuestUpgrades[] = { UPG_QUIVER, UPG_BOMB_BAG };
+ PauseContext* pauseCtx = &play->pauseCtx;
+ s16 sp1CA; // colorSetR and numOcarinaButtons
+ s16 sp1C8; // colorSetG and ocarinaButtonIndex
+ s16 sp1C6;
+ s16 sp1C4;
+ s16 var_v1;
+ s16 i;
+ s16 j;
+ s16 k;
+ s16 skullTokenDigits[3];
+ u16 isDigitDrawn;
-s32 D_8082AEE4[] = { 0, 0, 0 };
+ OPEN_DISPS(play->state.gfxCtx);
-s32 D_8082AEF0[] = { 0, 0, 0, 0, 0 };
+ KaleidoScope_SetCursorVtx(pauseCtx, pauseCtx->cursorSlot[PAUSE_QUEST] * 4, pauseCtx->questVtx);
-s16 D_8082AF04[] = {
- 255, 0, 0, 255, 255, 70, 0, 150, 255, 70, 0, 150, 255, 0, 0, 255,
-};
+ gDPPipeSync(POLY_OPA_DISP++);
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
+ gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE,
+ ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
-s16 D_8082AF24[] = {
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x003C, 0x0000, 0x005A, 0x0000, 0x0000,
- 0x0000, 0x0028, 0x006E, 0x0050, 0x0028, 0x0000, 0x0046, 0x0000, 0x005A, 0x005A, 0x005A, 0x0000,
-};
+ // Draw the Boss Remains icons
+ sQuestRemainsColorTimer--;
+ for (i = 0, j = 0; i < 4; i++, j += 4) {
+ if ((sQuestRemainsColorTimerIndex != 1) && (sQuestRemainsColorTimerIndex != 3)) {
+ var_v1 = (sQuestRemainsColorTimerIndex != 0) ? (i + 6) : i;
-s16 D_8082AF6C[] = {
- 255, 255, 255, 255, 255, 255,
-};
+ if (sQuestRemainsColorTimer != 0) {
+ sp1CA = ABS_ALT(sQuestRemainsEnvRed[i] - sQuestRemainsEnvTargets[var_v1][0]) / sQuestRemainsColorTimer;
+ sp1C8 =
+ ABS_ALT(sQuestRemainsEnvGreen[i] - sQuestRemainsEnvTargets[var_v1][1]) / sQuestRemainsColorTimer;
+ sp1C6 = ABS_ALT(sQuestRemainsEnvBlue[i] - sQuestRemainsEnvTargets[var_v1][2]) / sQuestRemainsColorTimer;
-s16 D_8082AF78[] = {
- 255, 255, 255, 255, 255, 255,
-};
+ if (sQuestRemainsEnvRed[i] >= sQuestRemainsEnvTargets[var_v1][0]) {
+ sQuestRemainsEnvRed[i] -= sp1CA;
+ } else {
+ sQuestRemainsEnvRed[i] += sp1CA;
+ }
+ if (sQuestRemainsEnvGreen[i] >= sQuestRemainsEnvTargets[var_v1][1]) {
+ sQuestRemainsEnvGreen[i] -= sp1C8;
+ } else {
+ sQuestRemainsEnvGreen[i] += sp1C8;
+ }
+ if (sQuestRemainsEnvBlue[i] >= sQuestRemainsEnvTargets[var_v1][2]) {
+ sQuestRemainsEnvBlue[i] -= sp1C6;
+ } else {
+ sQuestRemainsEnvBlue[i] += sp1C6;
+ }
+ } else {
+ sQuestRemainsEnvRed[i] = sQuestRemainsEnvTargets[var_v1][0];
+ sQuestRemainsEnvGreen[i] = sQuestRemainsEnvTargets[var_v1][1];
+ sQuestRemainsEnvBlue[i] = sQuestRemainsEnvTargets[var_v1][2];
+ }
+ }
-s16 D_8082AF84[] = {
- 150, 150, 150, 150, 150, 150,
-};
+ if (CHECK_QUEST_ITEM(i)) {
+ gDPPipeSync(POLY_OPA_DISP++);
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
+ gDPSetEnvColor(POLY_OPA_DISP++, sQuestRemainsEnvRed[i], sQuestRemainsEnvGreen[i], sQuestRemainsEnvBlue[i],
+ 0);
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[j], 4, 0);
+ KaleidoScope_DrawTexQuadRGBA32(play->state.gfxCtx, gItemIcons[ITEM_REMAINS_ODOLWA + i], 32, 32, 0);
+ }
+ }
-s16 D_8082AF90 = 20;
+ if (sQuestRemainsColorTimer == 0) {
+ sQuestRemainsColorTimer = sQuestRemainsColorTimerInit[sQuestRemainsColorTimerIndex];
+ if (++sQuestRemainsColorTimerIndex > 3) {
+ sQuestRemainsColorTimerIndex = 0;
+ }
+ }
-s32 D_8082AF94 = 0;
+ // Draw shield
+ gDPPipeSync(POLY_OPA_DISP++);
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
+ gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
-s32 D_8082AF98 = 0;
+ if (GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) != EQUIP_VALUE_SHIELD_NONE) {
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[j], 4, 0);
+ KaleidoScope_DrawTexQuadRGBA32(play->state.gfxCtx, gItemIcons[(ITEM_SHIELD_HERO - 1) + GET_CUR_EQUIP_VALUE(1)],
+ 32, 32, 0);
+ }
-s32 D_8082AF9C = 0;
+ j += 4;
-s32 D_8082AFA0 = 0;
+ // Draw Sword
+ if (GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) != EQUIP_VALUE_SWORD_NONE) {
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[j], 4, 0);
+ KaleidoScope_DrawTexQuadRGBA32(play->state.gfxCtx, gItemIcons[(ITEM_SWORD_KOKIRI - 1) + GET_CUR_EQUIP_VALUE(0)],
+ 32, 32, 0);
+ }
-s32 D_8082AFA4 = 0;
+ j += 4;
-s16 D_8082AFA8 = 20;
+ // Draw Songs
+ gDPPipeSync(POLY_OPA_DISP++);
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
+ gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
-s32 D_8082AFAC = 0;
+ gDPLoadTextureBlock(POLY_OPA_DISP++, &D_08062000, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 24, 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);
-void* D_8082AFB0[] = {
- 0x020024A0, 0x020025A0, 0x020026A0, 0x020027A0, 0x020028A0,
-};
+ for (i = 0; i < 12; i++, j += 4) {
+ if (CHECK_QUEST_ITEM(i + QUEST_SONG_SONATA) ||
+ ((i == (QUEST_SONG_LULLABY - QUEST_SONG_SONATA)) && !CHECK_QUEST_ITEM(i + QUEST_SONG_SONATA) &&
+ CHECK_QUEST_ITEM(QUEST_SONG_LULLABY_INTRO))) {
+ if ((i + QUEST_SONG_SONATA) == pauseCtx->cursorSlot[PAUSE_QUEST]) {
+ pauseCtx->questVtx[j + 0].v.ob[0] = pauseCtx->questVtx[j + 2].v.ob[0] =
+ pauseCtx->questVtx[j + 0].v.ob[0] - 2;
+
+ pauseCtx->questVtx[j + 1].v.ob[0] = pauseCtx->questVtx[j + 3].v.ob[0] =
+ pauseCtx->questVtx[j + 1].v.ob[0] + 4;
+
+ pauseCtx->questVtx[j + 0].v.ob[1] = pauseCtx->questVtx[j + 1].v.ob[1] =
+ pauseCtx->questVtx[j + 0].v.ob[1] + 2;
+
+ pauseCtx->questVtx[j + 2].v.ob[1] = pauseCtx->questVtx[j + 3].v.ob[1] =
+ pauseCtx->questVtx[j + 2].v.ob[1] - 4;
+ }
+
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sQuestSongsPrimRed[i], sQuestSongsPrimGreen[i],
+ sQuestSongsPrimBlue[i], pauseCtx->alpha);
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[j], 4, 0);
+ gSP1Quadrangle(POLY_OPA_DISP++, 0, 2, 3, 1, 0);
+ }
+ }
+
+ // Draw Bombers Notebook
+ gDPPipeSync(POLY_OPA_DISP++);
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
+ gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
+
+ if (CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[j], 4, 0);
+ KaleidoScope_DrawTexQuadRGBA32(play->state.gfxCtx, &D_08061000, 32, 32, 0);
+ }
+
+ j += 4;
+
+ gDPPipeSync(POLY_OPA_DISP++);
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
+
+ // Loop over quest item upgrades
+ for (i = 0; i < 2; i++, j += 4) {
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[j], 4, 0);
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
+
+ if (GET_CUR_UPG_VALUE(sQuestUpgrades[i]) != 0) {
+ KaleidoScope_DrawTexQuadRGBA32(
+ play->state.gfxCtx, sQuestUpgradeTextures[i][GET_CUR_UPG_VALUE(sQuestUpgrades[i]) - 1], 32, 32, 0);
+ }
+ }
+
+ // Skip over &pauseCtx->questVtx[84], which should be `QUEST_SKULL_TOKEN`
+ j += 4;
+
+ sp1CA = ABS_ALT(sQuestHpPrimRed - sQuestHpPrimColorTargets[sQuestHpPrimColorTargetIndex][0]) / sQuestHpColorTimer;
+ sp1C8 = ABS_ALT(sQuestHpPrimGreen - sQuestHpPrimColorTargets[sQuestHpPrimColorTargetIndex][1]) / sQuestHpColorTimer;
+ sp1C6 = ABS_ALT(sQuestHpPrimBlue - sQuestHpPrimColorTargets[sQuestHpPrimColorTargetIndex][2]) / sQuestHpColorTimer;
+ sp1C4 = ABS_ALT(sQuestHpPrimAlpha - sQuestHpPrimColorTargets[sQuestHpPrimColorTargetIndex][3]) / sQuestHpColorTimer;
+
+ if (sQuestHpPrimRed >= sQuestHpPrimColorTargets[sQuestHpPrimColorTargetIndex][0]) {
+ sQuestHpPrimRed -= sp1CA;
+ } else {
+ sQuestHpPrimRed += sp1CA;
+ }
+
+ if (sQuestHpPrimGreen >= sQuestHpPrimColorTargets[sQuestHpPrimColorTargetIndex][1]) {
+ sQuestHpPrimGreen -= sp1C8;
+ } else {
+ sQuestHpPrimGreen += sp1C8;
+ }
+
+ if (sQuestHpPrimBlue >= sQuestHpPrimColorTargets[sQuestHpPrimColorTargetIndex][2]) {
+ sQuestHpPrimBlue -= sp1C6;
+ } else {
+ sQuestHpPrimBlue += sp1C6;
+ }
+
+ if (sQuestHpPrimAlpha >= sQuestHpPrimColorTargets[sQuestHpPrimColorTargetIndex][3]) {
+ sQuestHpPrimAlpha -= sp1C4;
+ } else {
+ sQuestHpPrimAlpha += sp1C4;
+ }
+
+ sQuestHpColorTimer--;
+ if (sQuestHpColorTimer == 0) {
+ sQuestHpPrimRed = sQuestHpPrimColorTargets[sQuestHpPrimColorTargetIndex][0];
+ sQuestHpPrimGreen = sQuestHpPrimColorTargets[sQuestHpPrimColorTargetIndex][1];
+ sQuestHpPrimBlue = sQuestHpPrimColorTargets[sQuestHpPrimColorTargetIndex][2];
+ sQuestHpPrimAlpha = sQuestHpPrimColorTargets[sQuestHpPrimColorTargetIndex][3];
+ sQuestHpColorTimer = sQuestHpColorTimerInit[sQuestHpPrimColorTargetIndex];
+ if (++sQuestHpPrimColorTargetIndex > 3) {
+ sQuestHpPrimColorTargetIndex = 0;
+ }
+ }
+
+ if ((GET_SAVE_INVENTORY_QUEST_ITEMS >> QUEST_HEART_PIECE_COUNT) != 0) {
+ gDPPipeSync(POLY_OPA_DISP++);
+ gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0,
+ PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
+
+ if ((pauseCtx->state == 4) || (pauseCtx->state == 0x1A)) {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sQuestHpPrimColorTargets[0][0], sQuestHpPrimColorTargets[0][1],
+ sQuestHpPrimColorTargets[0][2], pauseCtx->alpha);
+ } else {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sQuestHpPrimRed, sQuestHpPrimGreen, sQuestHpPrimBlue,
+ sQuestHpPrimAlpha);
+ }
+
+ gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[j], 4, 0);
+
+ POLY_OPA_DISP = func_8010DC58(
+ POLY_OPA_DISP,
+ gItemIcons[(0x7A + ((GET_SAVE_INVENTORY_QUEST_ITEMS & 0xF0000000) >> QUEST_HEART_PIECE_COUNT))], 48, 48, 0);
+ }
+
+ j += 4;
+
+ if (pauseCtx->state == 6) {
+ gDPPipeSync(POLY_OPA_DISP++);
+ gDPSetCombineMode(POLY_OPA_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
+
+ if (pauseCtx->unk_200 == 2) {
+ // Draw ocarina buttons as they are played back
+ pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
+
+ if (pauseCtx->ocarinaStaff->pos != 0) {
+ if (sQuestSongPlayedOcarinaButtonsNum == (pauseCtx->ocarinaStaff->pos - 1)) {
+ sQuestSongPlayedOcarinaButtonsNum++;
+ sQuestSongPlayedOcarinaButtons[pauseCtx->ocarinaStaff->pos - 1] =
+ pauseCtx->ocarinaStaff->buttonIndex;
+ }
+
+ for (i = 0, k = 0; i < 8; i++, k += 4, j += 4) {
+ if (sQuestSongPlayedOcarinaButtons[i] == OCARINA_BTN_INVALID) {
+ break;
+ }
+
+ if (sQuestSongPlayedOcarinaButtonsAlpha[i] != 255) {
+ sQuestSongPlayedOcarinaButtonsAlpha[i] += 50;
+ if (sQuestSongPlayedOcarinaButtonsAlpha[i] >= 255) {
+ sQuestSongPlayedOcarinaButtonsAlpha[i] = 255;
+ }
+ }
+
+ pauseCtx->questVtx[j + 0].v.ob[1] = pauseCtx->questVtx[j + 1].v.ob[1] =
+ pauseCtx->ocarinaButtonsY[sQuestSongPlayedOcarinaButtons[i]];
+
+ pauseCtx->questVtx[j + 2].v.ob[1] = pauseCtx->questVtx[j + 3].v.ob[1] =
+ pauseCtx->questVtx[j + 0].v.ob[1] - 12;
+
+ gDPPipeSync(POLY_OPA_DISP++);
+
+ if (sQuestSongPlayedOcarinaButtons[i] == OCARINA_BTN_A) {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 80, 150, 255, sQuestSongPlayedOcarinaButtonsAlpha[i]);
+ } else {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 50, sQuestSongPlayedOcarinaButtonsAlpha[i]);
+ }
+
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[j], 4, 0);
+
+ POLY_OPA_DISP = func_8010DC58(POLY_OPA_DISP,
+ sOcarinaButtonTextures[sQuestSongPlayedOcarinaButtons[i]], 16, 16, 0);
+ }
+ }
+ } else if (((pauseCtx->unk_200 >= 4) && (pauseCtx->unk_200 <= 6)) || (pauseCtx->unk_200 == 8)) {
+ // Draw the buttons for playing a song
+ sp1C8 = pauseCtx->ocarinaSongIndex;
+ sp1CA = gOcarinaSongButtons[sp1C8].numButtons;
+
+ i = j;
+
+ for (k = 0; k < sp1CA; k++, j += 4) {
+ pauseCtx->questVtx[j + 0].v.ob[1] = pauseCtx->questVtx[j + 1].v.ob[1] =
+ pauseCtx->ocarinaButtonsY[gOcarinaSongButtons[sp1C8].buttonIndex[k]];
+
+ pauseCtx->questVtx[j + 2].v.ob[1] = pauseCtx->questVtx[j + 3].v.ob[1] =
+ pauseCtx->questVtx[j + 0].v.ob[1] - 12;
+
+ gDPPipeSync(POLY_OPA_DISP++);
+
+ if (pauseCtx->unk_200 == 8) {
+ // Draw ocarina buttons colored
+ if (gOcarinaSongButtons[sp1C8].buttonIndex[k] == OCARINA_BTN_A) {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 80, 150, 255, 200);
+ } else {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 50, 200);
+ }
+ } else {
+ // Gray out buttons while reading ocarina song inputs
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 150, 150, 150, 150);
+ }
+
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[j], 4, 0);
+
+ POLY_OPA_DISP = func_8010DC58(
+ POLY_OPA_DISP, sOcarinaButtonTextures[gOcarinaSongButtons[sp1C8].buttonIndex[k]], 16, 16, 0);
+ }
+
+ if (pauseCtx->unk_200 != 8) {
+ pauseCtx->ocarinaStaff = AudioOcarina_GetPlayingStaff();
+
+ // Update ocarina song inputs
+ if (pauseCtx->ocarinaStaff->pos != 0) {
+ if (sQuestSongPlayedOcarinaButtonsNum == (pauseCtx->ocarinaStaff->pos - 1)) {
+ if (pauseCtx->ocarinaStaff->buttonIndex <= OCARINA_BTN_C_UP) {
+ sQuestSongPlayedOcarinaButtons[pauseCtx->ocarinaStaff->pos - 1] =
+ pauseCtx->ocarinaStaff->buttonIndex;
+ sQuestSongPlayedOcarinaButtons[pauseCtx->ocarinaStaff->pos] = OCARINA_BTN_INVALID;
+ sQuestSongPlayedOcarinaButtonsNum++;
+ }
+ }
+ }
+
+ // Draw the buttons colored as the ocarina song inputs are read from
+ j = i + 32;
+ k = 0;
+ for (; k < 8; k++, j += 4) {
+ if (sQuestSongPlayedOcarinaButtons[k] == OCARINA_BTN_INVALID) {
+ continue;
+ }
+
+ if (sQuestSongPlayedOcarinaButtonsAlpha[k] != 255) {
+ sQuestSongPlayedOcarinaButtonsAlpha[k] += 50;
+ if (sQuestSongPlayedOcarinaButtonsAlpha[k] >= 255) {
+ sQuestSongPlayedOcarinaButtonsAlpha[k] = 255;
+ }
+ }
+
+ pauseCtx->questVtx[j + 0].v.ob[1] = pauseCtx->questVtx[j + 1].v.ob[1] =
+ pauseCtx->ocarinaButtonsY[sQuestSongPlayedOcarinaButtons[k]];
-s16 D_8082AFC4[] = {
+ pauseCtx->questVtx[j + 2].v.ob[1] = pauseCtx->questVtx[j + 3].v.ob[1] =
+ pauseCtx->questVtx[j + 0].v.ob[1] - 12;
+
+ gDPPipeSync(POLY_OPA_DISP++);
+
+ if (sQuestSongPlayedOcarinaButtons[k] == OCARINA_BTN_A) {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 80, 150, 255, sQuestSongPlayedOcarinaButtonsAlpha[k]);
+ } else {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 50, sQuestSongPlayedOcarinaButtonsAlpha[k]);
+ }
+
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[j], 4, 0);
+
+ POLY_OPA_DISP = func_8010DC58(POLY_OPA_DISP,
+ sOcarinaButtonTextures[sQuestSongPlayedOcarinaButtons[k]], 16, 16, 0);
+ }
+
+ if (pauseCtx->unk_200 == 4) {
+ for (k = 0; k < 8; k++) {
+ sQuestSongPlayedOcarinaButtons[k] = OCARINA_BTN_INVALID;
+ sQuestSongPlayedOcarinaButtonsAlpha[k] = 0;
+ }
+
+ sQuestSongPlayedOcarinaButtonsNum = 0;
+ AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
+ AudioOcarina_StartDefault((1 << pauseCtx->ocarinaSongIndex) | 0x80000000);
+ pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
+ pauseCtx->ocarinaStaff->pos = 0;
+ pauseCtx->ocarinaStaff->state = 0xFE;
+ pauseCtx->unk_200 = 5;
+ }
+ }
+ }
+ }
+
+ // Draw Skull Token Count
+ // QUEST_SKULL_TOKEN never properly set, see Item_Give(),
+ // Vertices not well placed, digits are not aligned and placed in unintended positions
+ if (CHECK_QUEST_ITEM(QUEST_SKULL_TOKEN) && ((play->sceneId == SCENE_KINSTA1) || (play->sceneId == SCENE_KINDAN2))) {
+ gDPPipeSync(POLY_OPA_DISP++);
+ gDPSetCombineLERP(POLY_OPA_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0,
+ PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
+ gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 0);
+
+ skullTokenDigits[0] = skullTokenDigits[1] = 0;
+ skullTokenDigits[2] = Inventory_GetSkullTokenCount(play->sceneId);
+
+ while (skullTokenDigits[2] >= 100) {
+ skullTokenDigits[0]++;
+ skullTokenDigits[2] -= 100;
+ }
+
+ while (skullTokenDigits[2] >= 10) {
+ skullTokenDigits[1]++;
+ skullTokenDigits[2] -= 10;
+ }
+
+ //! @bug: &pauseCtx->questVtx[84] is the questVtx for skull tokens
+ gSPVertex(POLY_OPA_DISP++, &pauseCtx->questVtx[152], 24, 0);
+
+ // Loop over two sets of digits, the first is shadowed, the second is colored
+ for (k = 0, i = 0; k < 2; k++) {
+ if (k == 0) {
+ // shadow
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, pauseCtx->alpha);
+ } else {
+ if (Inventory_GetSkullTokenCount(play->sceneId) == 100) {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 200, 50, 50, pauseCtx->alpha);
+ } else {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
+ }
+ }
+
+ isDigitDrawn = false;
+ for (j = 0; j < 3; j++, i += 4) {
+ if ((j >= 2) || (skullTokenDigits[j] != 0) || isDigitDrawn) {
+ gDPLoadTextureBlock(POLY_OPA_DISP++, ((u8*)gCounterDigit0Tex + (8 * 16 * skullTokenDigits[j])),
+ G_IM_FMT_I, G_IM_SIZ_8b, 8, 16, 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);
+
+ gSP1Quadrangle(POLY_OPA_DISP++, i, i + 2, i + 3, i + 1, 0);
+
+ isDigitDrawn = true;
+ }
+ }
+ }
+ }
+
+ CLOSE_DISPS(play->state.gfxCtx);
+}
+#else
+s16 sQuestRemainsColorTimer = 20;
+s16 sQuestRemainsColorTimerIndex = 0;
+s16 sQuestHpPrimRed = 0;
+s16 sQuestHpPrimGreen = 0;
+s16 sQuestHpPrimBlue = 0;
+s16 sQuestHpPrimAlpha = 0;
+s16 sQuestHpColorTimer = 20;
+s16 sQuestHpPrimColorTargetIndex = 0;
+TexturePtr sOcarinaButtonTextures[] = {
+ gOcarinaATex, gOcarinaCDownTex, gOcarinaCRightTex, gOcarinaCLeftTex, gOcarinaCUpTex,
+};
+s16 sQuestSongsPrimRed[] = {
150, 255, 100, 255, 255, 255, 255, 255, 255, 255, 255, 255,
};
-
-s16 D_8082AFDC[] = {
+s16 sQuestSongsPrimGreen[] = {
255, 80, 150, 160, 100, 240, 255, 255, 255, 255, 255, 255,
};
+s16 sQuestSongsPrimBlue[] = {
+ 100, 40, 255, 0, 255, 100, 255, 255, 255, 255, 255, 255,
+};
+TexturePtr sQuestUpgradeTextures[][3] = {
+ { 0x08053000, 0x08054000, 0x08055000 },
+ { 0x08056000, 0x08057000, 0x08058000 },
+};
+u8 sQuestUpgrades[] = { UPG_QUIVER, UPG_BOMB_BAG };
+#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_kaleido_scope/KaleidoScope_DrawQuestStatus.s")
+#endif
-s16 D_8082AFF4[] = { 100, 40, 255, 0, 255, 100, 255, 255, 255, 255, 255, 255 };
+typedef enum {
+ /* -3 */ CURSOR_TO_LEFT = -3, // Cursor on the "scroll to left page" position
+ /* -2 */ CURSOR_TO_RIGHT, // Cursor on the "scroll to right page" position
+ /* -1 */ CURSOR_NONE // No position in that direction, cursor stays where it is
+} CursorPointNext;
-void* D_8082B00C[] = {
- 0x08053000, 0x08054000, 0x08055000, 0x08056000, 0x08057000, 0x08058000,
-};
+typedef struct {
+ /* 0x0 */ s16 up;
+ /* 0x2 */ s16 down;
+ /* 0x4 */ s16 left;
+ /* 0x6 */ s16 right;
+} CursorPointDirection;
-s16 D_8082B024 = 1;
+void KaleidoScope_UpdateQuestCursor(PlayState* play) {
+ static s16 sQuestSongPlaybackDelayTimer = 0;
+ static CursorPointDirection sCursorPointLinks[] = {
+ { CURSOR_NONE, QUEST_REMAINS_TWINMOLD, QUEST_REMAINS_GYORG, QUEST_REMAINS_GOHT }, // QUEST_REMAINS_ODOLWA
+ { QUEST_REMAINS_ODOLWA, QUEST_SHIELD, QUEST_REMAINS_TWINMOLD, CURSOR_TO_RIGHT }, // QUEST_REMAINS_GOHT
+ { QUEST_REMAINS_ODOLWA, QUEST_SWORD, QUEST_HEART_PIECE, QUEST_REMAINS_TWINMOLD }, // QUEST_REMAINS_GYORG
+ { QUEST_REMAINS_ODOLWA, QUEST_SHIELD, QUEST_REMAINS_GYORG, QUEST_REMAINS_GOHT }, // QUEST_REMAINS_TWINMOLD
+ { QUEST_REMAINS_GOHT, QUEST_BOMB_BAG, QUEST_SWORD, CURSOR_TO_RIGHT }, // QUEST_SHIELD
+ { QUEST_REMAINS_GYORG, QUEST_QUIVER, QUEST_SONG_STORMS, QUEST_SHIELD }, // QUEST_SWORD
+ { QUEST_SONG_TIME, CURSOR_NONE, CURSOR_TO_LEFT, QUEST_SONG_LULLABY }, // QUEST_SONG_SONATA
+ { QUEST_SONG_HEALING, CURSOR_NONE, QUEST_SONG_SONATA, QUEST_SONG_BOSSA_NOVA }, // QUEST_SONG_LULLABY
+ { QUEST_SONG_EPONA, CURSOR_NONE, QUEST_SONG_LULLABY, QUEST_SONG_ELEGY }, // QUEST_SONG_BOSSA_NOVA
+ { QUEST_SONG_SOARING, CURSOR_NONE, QUEST_SONG_BOSSA_NOVA, QUEST_SONG_OATH }, // QUEST_SONG_ELEGY
+ { QUEST_SONG_STORMS, CURSOR_NONE, QUEST_SONG_ELEGY, QUEST_QUIVER }, // QUEST_SONG_OATH
+ { QUEST_SONG_SUN, CURSOR_NONE, QUEST_SONG_OATH, QUEST_SWORD }, // QUEST_SONG_SARIA
+ { QUEST_BOMBERS_NOTEBOOK, QUEST_SONG_SONATA, CURSOR_TO_LEFT, QUEST_SONG_HEALING }, // QUEST_SONG_TIME
+ { QUEST_BOMBERS_NOTEBOOK, QUEST_SONG_LULLABY, QUEST_SONG_TIME, QUEST_SONG_EPONA }, // QUEST_SONG_HEALING
+ { QUEST_HEART_PIECE, QUEST_SONG_BOSSA_NOVA, QUEST_SONG_HEALING, QUEST_SONG_SOARING }, // QUEST_SONG_EPONA
+ { QUEST_HEART_PIECE, QUEST_SONG_ELEGY, QUEST_SONG_EPONA, QUEST_SONG_STORMS }, // QUEST_SONG_SOARING
+ { QUEST_HEART_PIECE, QUEST_SONG_OATH, QUEST_SONG_SOARING, QUEST_SWORD }, // QUEST_SONG_STORMS
+ { QUEST_HEART_PIECE, QUEST_SONG_SARIA, QUEST_SONG_STORMS, QUEST_SWORD }, // QUEST_SONG_SUN
+ { CURSOR_NONE, QUEST_SONG_TIME, CURSOR_TO_LEFT, QUEST_HEART_PIECE }, // QUEST_BOMBERS_NOTEBOOK
+ { QUEST_SWORD, CURSOR_NONE, QUEST_SONG_OATH, QUEST_BOMB_BAG }, // QUEST_QUIVER
+ { QUEST_SHIELD, CURSOR_NONE, QUEST_QUIVER, CURSOR_TO_RIGHT }, // QUEST_BOMB_BAG
+ { QUEST_QUIVER, QUEST_SONG_TIME, CURSOR_TO_LEFT, QUEST_HEART_PIECE }, // QUEST_SKULL_TOKEN
+ { CURSOR_NONE, QUEST_SONG_STORMS, QUEST_BOMBERS_NOTEBOOK, QUEST_REMAINS_GYORG }, // QUEST_HEART_PIECE
+ };
+ PauseContext* pauseCtx = &play->pauseCtx;
+ MessageContext* msgCtx = &play->msgCtx;
+ InterfaceContext* interfaceCtx = &play->interfaceCtx;
+ s32 pad;
+ s16 nextCursorPoint;
+ s16 oldCursorPoint;
+ s16 i;
+ u16 cursor;
+ u16 cursorItem;
-s16 D_8082B028 = 0;
+ pauseCtx->nameColorSet = PAUSE_NAME_COLOR_SET_WHITE;
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_WHITE;
-s16 D_8082B02C[] = {
- 0xFFFF, 0x0003, 0x0002, 0x0001, 0x0000, 0x0004, 0x0003, 0xFFFE, 0x0000, 0x0005, 0x0016, 0x0003, 0x0000, 0x0004,
- 0x0002, 0x0001, 0x0001, 0x0014, 0x0005, 0xFFFE, 0x0002, 0x0013, 0x0010, 0x0004, 0x000C, 0xFFFF, 0xFFFD, 0x0007,
- 0x000D, 0xFFFF, 0x0006, 0x0008, 0x000E, 0xFFFF, 0x0007, 0x0009, 0x000F, 0xFFFF, 0x0008, 0x000A, 0x0010, 0xFFFF,
- 0x0009, 0x0013, 0x0011, 0xFFFF, 0x000A, 0x0005, 0x0012, 0x0006, 0xFFFD, 0x000D, 0x0012, 0x0007, 0x000C, 0x000E,
- 0x0016, 0x0008, 0x000D, 0x000F, 0x0016, 0x0009, 0x000E, 0x0010, 0x0016, 0x000A, 0x000F, 0x0005, 0x0016, 0x000B,
- 0x0010, 0x0005, 0xFFFF, 0x000C, 0xFFFD, 0x0016, 0x0005, 0xFFFF, 0x000A, 0x0014, 0x0004, 0xFFFF, 0x0013, 0xFFFE,
- 0x0013, 0x000C, 0xFFFD, 0x0016, 0xFFFF, 0x0010, 0x0012, 0x0002, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-};
+ // != 0
+ if ((pauseCtx->state == 6) && (!pauseCtx->unk_200 || (pauseCtx->unk_200 == 5) || (pauseCtx->unk_200 == 8)) &&
+ (pauseCtx->pageIndex == PAUSE_QUEST) && !pauseCtx->itemDescriptionOn) {
+ if (pauseCtx->cursorSpecialPos == 0) {
+ oldCursorPoint = pauseCtx->cursorPoint[PAUSE_QUEST];
+
+ if (pauseCtx->stickAdjX < -30) {
+ // Move cursor left
+ if (pauseCtx->unk_200 == 5) {
+ AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
+ }
+ pauseCtx->unk_298 = 4.0f;
+
+ nextCursorPoint = sCursorPointLinks[oldCursorPoint].left;
+ if (nextCursorPoint == CURSOR_TO_LEFT) {
+ KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_LEFT);
+ pauseCtx->unk_200 = 0;
+ if (interfaceCtx->unk_212 == 6) {
+ func_8011552C(play, 0x15);
+ }
+ return;
+ } else {
+ while (nextCursorPoint > CURSOR_NONE) {
+ if (KaleidoScope_UpdateQuestStatusPoint(pauseCtx, nextCursorPoint)) {
+ break;
+ }
+ nextCursorPoint = sCursorPointLinks[nextCursorPoint].left;
+ }
+ }
+ } else if (pauseCtx->stickAdjX > 30) {
+ // Move cursor right
+ if (pauseCtx->unk_200 == 5) {
+ AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
+ }
+ pauseCtx->unk_298 = 4.0f;
+ nextCursorPoint = sCursorPointLinks[oldCursorPoint].right;
+
+ if (nextCursorPoint == CURSOR_TO_RIGHT) {
+ KaleidoScope_MoveCursorToSpecialPos(play, PAUSE_CURSOR_PAGE_RIGHT);
+ pauseCtx->unk_200 = 0;
+ return;
+ }
+
+ while (nextCursorPoint > CURSOR_NONE) {
+ if (KaleidoScope_UpdateQuestStatusPoint(pauseCtx, nextCursorPoint)) {
+ break;
+ }
+ nextCursorPoint = sCursorPointLinks[nextCursorPoint].right;
+ }
+ }
+
+ if (pauseCtx->stickAdjY < -30) {
+ // Move cursor down
+ if (pauseCtx->unk_200 == 5) {
+ AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
+ }
+ nextCursorPoint = sCursorPointLinks[oldCursorPoint].down;
+
+ while (nextCursorPoint > CURSOR_NONE) {
+ pauseCtx->unk_298 = 4.0f;
+ if (KaleidoScope_UpdateQuestStatusPoint(pauseCtx, nextCursorPoint)) {
+ break;
+ }
+ nextCursorPoint = sCursorPointLinks[nextCursorPoint].down;
+ }
+ } else if (pauseCtx->stickAdjY > 30) {
+ // Move cursor up
+ if (pauseCtx->unk_200 == 5) {
+ AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
+ }
+ nextCursorPoint = sCursorPointLinks[oldCursorPoint].up;
+ while (nextCursorPoint > CURSOR_NONE) {
+ pauseCtx->unk_298 = 4.0f;
+ if (KaleidoScope_UpdateQuestStatusPoint(pauseCtx, nextCursorPoint)) {
+ break;
+ }
+ nextCursorPoint = sCursorPointLinks[nextCursorPoint].up;
+ }
+ }
+
+ // if the cursor point changed
+ if (oldCursorPoint != pauseCtx->cursorPoint[PAUSE_QUEST]) {
+ pauseCtx->unk_200 = 0;
+ play_sound(NA_SE_SY_CURSOR);
+ }
+
+ // Update cursor item and slot
+ if (pauseCtx->cursorPoint[PAUSE_QUEST] != QUEST_HEART_PIECE) {
+ if (pauseCtx->cursorPoint[PAUSE_QUEST] <= QUEST_REMAINS_TWINMOLD) {
+ // Boss Remains
+ if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
+ cursorItem = ITEM_REMAINS_ODOLWA + pauseCtx->cursorPoint[PAUSE_QUEST];
+ } else {
+ cursorItem = PAUSE_ITEM_NONE;
+ }
+ } else if (pauseCtx->cursorPoint[PAUSE_QUEST] == QUEST_BOMBERS_NOTEBOOK) {
+ // Bombers Notebook
+ if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
+ cursorItem = ITEM_BOMBERS_NOTEBOOK;
+ } else {
+ cursorItem = PAUSE_ITEM_NONE;
+ }
+ } else if (pauseCtx->cursorPoint[PAUSE_QUEST] == QUEST_SHIELD) {
+ // Shield
+ if (GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) != EQUIP_VALUE_SHIELD_NONE) {
+ cursorItem = (ITEM_SHIELD_HERO - EQUIP_TYPE_SHIELD) + GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD);
+ } else {
+ cursorItem = PAUSE_ITEM_NONE;
+ }
+ } else if (pauseCtx->cursorPoint[PAUSE_QUEST] == QUEST_SWORD) {
+ // Sword
+ if (GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) != EQUIP_VALUE_SWORD_NONE) {
+ cursorItem =
+ (ITEM_SWORD_KOKIRI - EQUIP_VALUE_SWORD_KOKIRI) + GET_CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD);
+ } else {
+ cursorItem = PAUSE_ITEM_NONE;
+ }
+ } else if (pauseCtx->cursorPoint[PAUSE_QUEST] <= QUEST_SONG_SUN) {
+ // Songs
+ if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
+ cursorItem = ITEM_WALLET_GIANT + pauseCtx->cursorPoint[PAUSE_QUEST];
+ } else if ((pauseCtx->cursorPoint[PAUSE_QUEST] == QUEST_SONG_LULLABY) &&
+ CHECK_QUEST_ITEM(QUEST_SONG_LULLABY_INTRO)) {
+ cursorItem = ITEM_SONG_LULLABY_INTRO;
+ } else {
+ cursorItem = PAUSE_ITEM_NONE;
+ }
+ } else if (pauseCtx->cursorPoint[PAUSE_QUEST] == QUEST_QUIVER) {
+ // Quiver Upgrade
+ if (GET_CUR_UPG_VALUE(UPG_QUIVER) != 0) {
+ cursorItem = (ITEM_QUIVER_30 - 1) + GET_CUR_UPG_VALUE(UPG_QUIVER);
+ } else {
+ cursorItem = PAUSE_ITEM_NONE;
+ }
+ } else if (pauseCtx->cursorPoint[PAUSE_QUEST] == QUEST_BOMB_BAG) {
+ // Bomb Bag Upgrade
+ if (GET_CUR_UPG_VALUE(UPG_BOMB_BAG) != 0) {
+ cursorItem = (ITEM_BOMB_BAG_20 - 1) + GET_CUR_UPG_VALUE(UPG_BOMB_BAG);
+ } else {
+ cursorItem = PAUSE_ITEM_NONE;
+ }
+ } else {
+ cursorItem = PAUSE_ITEM_NONE;
+ }
+ } else {
+ // Heart Piece Count
+ if ((GET_SAVE_INVENTORY_QUEST_ITEMS >> QUEST_HEART_PIECE_COUNT) != 0) {
+ cursorItem = ITEM_HEART_CONTAINER;
+ } else {
+ cursorItem = PAUSE_ITEM_NONE;
+ }
+ }
+
+ cursor = pauseCtx->cursorPoint[PAUSE_QUEST];
+ pauseCtx->cursorItem[pauseCtx->pageIndex] = cursorItem;
+ pauseCtx->cursorSlot[pauseCtx->pageIndex] = cursor;
+
+ if ((pauseCtx->debugEditor == DEBUG_EDITOR_NONE) && (pauseCtx->state == 6) && (pauseCtx->unk_200 == 0) &&
+ (pauseCtx->cursorSpecialPos == 0)) {
+ if ((cursor >= QUEST_SONG_SONATA) && (cursor <= QUEST_SONG_SUN)) {
+ // Handle part of the ocarina songs playback
+ if ((CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST]) ||
+ ((cursor == QUEST_SONG_LULLABY) && !CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST]) &&
+ CHECK_QUEST_ITEM(QUEST_SONG_LULLABY_INTRO))) &&
+ (msgCtx->msgLength == 0)) {
+ // The cursor is on a learned song
+ // Set some things up for song playback
+
+ if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
+ cursor = pauseCtx->cursorSlot[PAUSE_QUEST];
+ } else {
+ cursor = QUEST_BOMB_BAG;
+ }
+
+ pauseCtx->ocarinaSongIndex = gOcarinaSongItemMap[cursor - QUEST_SONG_SONATA];
+ sQuestSongPlaybackDelayTimer = 10;
+
+ for (i = 0; i < 8; i++) {
+ sQuestSongPlayedOcarinaButtons[i] = OCARINA_BTN_INVALID;
+ sQuestSongPlayedOcarinaButtonsAlpha[i] = 0;
+ }
+
+ sQuestSongPlayedOcarinaButtonsNum = 0;
+
+ // Setup the song to receive user input, immediately cancelled below
+ AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
+ AudioOcarina_StartDefault((1 << pauseCtx->ocarinaSongIndex) | 0x80000000);
+
+ // Clear the playback staff
+ pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
+ pauseCtx->ocarinaStaff->pos = 0;
+ pauseCtx->ocarinaStaff->state = 0xFF;
+
+ pauseCtx->ocarinaButtonsY[OCARINA_BTN_A] = -62;
+ pauseCtx->ocarinaButtonsY[OCARINA_BTN_C_DOWN] = -56;
+ pauseCtx->ocarinaButtonsY[OCARINA_BTN_C_RIGHT] = -49;
+ pauseCtx->ocarinaButtonsY[OCARINA_BTN_C_LEFT] = -46;
+ pauseCtx->ocarinaButtonsY[OCARINA_BTN_C_UP] = -41;
+
+ pauseCtx->unk_200 = 8;
+
+ if (interfaceCtx->unk_212 != 6) {
+ func_8011552C(play, 6);
+ }
+
+ // Stop receiving input to play a song as mentioned above
+ AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
+
+ if (gSaveContext.buttonStatus[EQUIP_SLOT_A] == BTN_DISABLED) {
+ gSaveContext.buttonStatus[EQUIP_SLOT_A] = BTN_ENABLED;
+ gSaveContext.hudVisibility = HUD_VISIBILITY_IDLE;
+ Interface_SetHudVisibility(HUD_VISIBILITY_ALL);
+ }
+ } else {
+ if (interfaceCtx->unk_212 != 6) {
+ func_8011552C(play, 6);
+ }
+ if (gSaveContext.buttonStatus[EQUIP_SLOT_A] != BTN_DISABLED) {
+ gSaveContext.buttonStatus[EQUIP_SLOT_A] = BTN_DISABLED;
+ gSaveContext.hudVisibility = HUD_VISIBILITY_IDLE;
+ Interface_SetHudVisibility(HUD_VISIBILITY_ALL);
+ }
+ }
+ } else {
+ if ((cursor == QUEST_BOMBERS_NOTEBOOK) && (pauseCtx->cursorItem[PAUSE_QUEST] != PAUSE_ITEM_NONE)) {
+ if (interfaceCtx->unk_212 != 6) {
+ func_8011552C(play, 6);
+ }
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_BLUE;
+ } else if (interfaceCtx->unk_212 == 6) {
+ func_8011552C(play, 0x15);
+ }
+
+ if ((pauseCtx->cursorItem[PAUSE_QUEST] != PAUSE_ITEM_NONE) && (msgCtx->msgLength == 0)) {
+ if (gSaveContext.buttonStatus[EQUIP_SLOT_A] == BTN_DISABLED) {
+ gSaveContext.buttonStatus[EQUIP_SLOT_A] = BTN_ENABLED;
+ gSaveContext.hudVisibility = HUD_VISIBILITY_IDLE;
+ Interface_SetHudVisibility(HUD_VISIBILITY_ALL);
+ }
+
+ if (CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A) && (msgCtx->msgLength == 0)) {
+ if (pauseCtx->cursorPoint[PAUSE_QUEST] == QUEST_BOMBERS_NOTEBOOK) {
+ play->pauseCtx.bombersNotebookOpen = true;
+ pauseCtx->unk_200 = 0x10;
+ play_sound(NA_SE_SY_DECIDE);
+ } else {
+ pauseCtx->itemDescriptionOn = true;
+ if (pauseCtx->cursorYIndex[PAUSE_QUEST] < 2) {
+ if (pauseCtx->cursorItem[PAUSE_QUEST] < ITEM_REMAINS_ODOLWA) {
+ func_801514B0(play, 0x1737 + pauseCtx->cursorItem[PAUSE_QUEST], 1);
+ } else {
+ func_801514B0(play, 0x173B + pauseCtx->cursorItem[PAUSE_QUEST], 3);
+ }
+ } else {
+ if (pauseCtx->cursorItem[PAUSE_QUEST] < ITEM_REMAINS_ODOLWA) {
+ func_801514B0(play, 0x1737 + pauseCtx->cursorItem[PAUSE_QUEST], 1);
+ } else {
+ func_801514B0(play, 0x173B + pauseCtx->cursorItem[PAUSE_QUEST], 1);
+ }
+ }
+ }
+ }
+ } else if (gSaveContext.buttonStatus[EQUIP_SLOT_A] != BTN_DISABLED) {
+ gSaveContext.buttonStatus[EQUIP_SLOT_A] = BTN_DISABLED;
+ gSaveContext.hudVisibility = HUD_VISIBILITY_IDLE;
+ Interface_SetHudVisibility(HUD_VISIBILITY_ALL);
+ }
+ }
+ } else if (pauseCtx->unk_200 == 5) {
+ // Abort reading ocarina song input if the stick is moved
+ if ((pauseCtx->stickAdjX != 0) || (pauseCtx->stickAdjY != 0)) {
+ pauseCtx->unk_200 = 0;
+ AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
+ }
+ } else if ((pauseCtx->unk_200 == 8) && CHECK_BTN_ALL(CONTROLLER1(&play->state)->press.button, BTN_A) &&
+ (msgCtx->msgLength == 0) && (cursor >= QUEST_SONG_SONATA) && (cursor <= QUEST_SONG_SUN)) {
+ pauseCtx->unk_200 = 9;
+ sQuestSongPlaybackDelayTimer = 10;
+ }
+
+ if (pauseCtx->cursorSpecialPos == 0) {
+ if ((pauseCtx->cursorSlot[PAUSE_QUEST] >= 6) && (pauseCtx->cursorSlot[PAUSE_QUEST] < 0x12) &&
+ ((pauseCtx->unk_200 <= 2) || (pauseCtx->unk_200 == 5) || (pauseCtx->unk_200 == 8)) &&
+ (pauseCtx->cursorItem[pauseCtx->pageIndex] != PAUSE_ITEM_NONE)) {
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_BLUE;
+ if ((pauseCtx->unk_200 >= 2) && (pauseCtx->unk_200 <= 6)) {
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_WHITE;
+ }
+ }
+ }
+ } else if (pauseCtx->cursorSpecialPos == PAUSE_CURSOR_PAGE_LEFT) {
+ if (pauseCtx->stickAdjX > 30) {
+ if (pauseCtx->unk_200 == 5) {
+ AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
+ }
+
+ func_80821A04(play);
+
+ pauseCtx->cursorPoint[PAUSE_QUEST] = QUEST_BOMBERS_NOTEBOOK;
+ if (CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) {
+ cursorItem = ITEM_BOMBERS_NOTEBOOK;
+ } else {
+ cursorItem = PAUSE_ITEM_NONE;
+ }
+
+ cursor = pauseCtx->cursorPoint[PAUSE_QUEST];
+ pauseCtx->cursorItem[pauseCtx->pageIndex] = cursorItem;
+ pauseCtx->cursorSlot[pauseCtx->pageIndex] = cursor;
+ }
+ } else if (pauseCtx->stickAdjX < -30) {
+ if (pauseCtx->unk_200 == 5) {
+ AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
+ }
+
+ func_80821A04(play);
+
+ pauseCtx->cursorPoint[PAUSE_QUEST] = QUEST_REMAINS_GOHT;
+ if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
+ cursorItem = (ITEM_REMAINS_GOHT - 1) + pauseCtx->cursorPoint[PAUSE_QUEST];
+ if (pauseCtx->cursorPoint[PAUSE_QUEST] != QUEST_REMAINS_ODOLWA) {
+ // This condition is always true as `cursorPoint` is set three lines above
+ cursorItem = ITEM_MASK_GIANT;
+ }
+ } else {
+ cursorItem = PAUSE_ITEM_NONE;
+ }
+
+ cursor = pauseCtx->cursorPoint[PAUSE_QUEST];
+ pauseCtx->cursorItem[pauseCtx->pageIndex] = cursorItem;
+ pauseCtx->cursorSlot[pauseCtx->pageIndex] = cursor;
+ }
+ } else if (pauseCtx->unk_200 == 9) {
+ // After a short delay, start the playback of the selected song
+
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_BLUE;
+ sQuestSongPlaybackDelayTimer--;
+ if (sQuestSongPlaybackDelayTimer == 0) {
+ for (i = 0; i < 8; i++) {
+ sQuestSongPlayedOcarinaButtons[i] = OCARINA_BTN_INVALID;
+ sQuestSongPlayedOcarinaButtonsAlpha[i] = 0;
+ }
+ sQuestSongPlayedOcarinaButtonsNum = 0;
+
+ pauseCtx->ocarinaButtonsY[OCARINA_BTN_A] = -62;
+ pauseCtx->ocarinaButtonsY[OCARINA_BTN_C_DOWN] = -56;
+ pauseCtx->ocarinaButtonsY[OCARINA_BTN_C_RIGHT] = -49;
+ pauseCtx->ocarinaButtonsY[OCARINA_BTN_C_LEFT] = -46;
+ pauseCtx->ocarinaButtonsY[OCARINA_BTN_C_UP] = -41;
+
+ if (CHECK_QUEST_ITEM(pauseCtx->cursorPoint[PAUSE_QUEST])) {
+ cursor = pauseCtx->cursorSlot[PAUSE_QUEST];
+ } else {
+ cursor = QUEST_BOMB_BAG;
+ }
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_kaleido_scope/func_808160A0.s")
+ AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
+ AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_DEFAULT);
+ pauseCtx->ocarinaSongIndex = gOcarinaSongItemMap[cursor - QUEST_SONG_SONATA];
+ AudioOcarina_SetPlaybackSong(pauseCtx->ocarinaSongIndex + 1, 1);
+ pauseCtx->unk_200 = 2;
+ pauseCtx->ocarinaStaff = AudioOcarina_GetPlaybackStaff();
+ pauseCtx->ocarinaStaff->pos = 0;
+ }
+ }
+}
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_kaleido_scope/func_80817B5C.s")
+s32 KaleidoScope_UpdateQuestStatusPoint(PauseContext* pauseCtx, s16 point) {
+ pauseCtx->cursorPoint[PAUSE_QUEST] = point;
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_kaleido_scope/func_80818904.s")
+ return true;
+}
diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_debug.c b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_debug.c
index c1f67b079..1152db202 100644
--- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_debug.c
+++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_debug.c
@@ -472,7 +472,7 @@ void KaleidoScope_DrawInventoryEditor(PlayState* play) {
// Loop over columns (i), (counterDigits[1] stores rectLeft)
for (counterDigits[1] = 44, i = 0; i < 4; i++) {
counterDigits[2] = 0;
- if (CHECK_QUEST_ITEM(QUEST_REMAINS_ODOWLA + i)) {
+ if (CHECK_QUEST_ITEM(QUEST_REMAINS_ODOLWA + i)) {
counterDigits[2] = 1;
}
KaleidoScope_DrawDigit(play, counterDigits[2], counterDigits[1], 112);
diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c
index be23b56de..120a07c0a 100644
--- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c
+++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_item.c
@@ -306,8 +306,8 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
}
gSPVertex(POLY_OPA_DISP++, &pauseCtx->itemVtx[j + 0], 4, 0);
- KaleidoScope_DrawQuadTextureRGBA32(play->state.gfxCtx,
- gItemIcons[((void)0, gSaveContext.save.inventory.items[i])], 32, 32, 0);
+ KaleidoScope_DrawTexQuadRGBA32(play->state.gfxCtx,
+ gItemIcons[((void)0, gSaveContext.save.inventory.items[i])], 32, 32, 0);
}
}
@@ -354,8 +354,8 @@ void KaleidoScope_UpdateItemCursor(PlayState* play) {
s16 moveCursorResult;
s16 pad2;
- pauseCtx->cursorColorSet = 0;
- pauseCtx->nameColorSet = 0;
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_WHITE;
+ pauseCtx->nameColorSet = PAUSE_NAME_COLOR_SET_WHITE;
if ((pauseCtx->state == 6) && (pauseCtx->unk_200 == 0) && (pauseCtx->pageIndex == PAUSE_ITEM) &&
!pauseCtx->itemDescriptionOn) {
@@ -367,7 +367,7 @@ void KaleidoScope_UpdateItemCursor(PlayState* play) {
// Move cursor left/right
if (pauseCtx->cursorSpecialPos == 0) {
// cursor is currently on a slot
- pauseCtx->cursorColorSet = 2;
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_YELLOW;
if (ABS_ALT(pauseCtx->stickAdjX) > 30) {
cursorPoint = pauseCtx->cursorPoint[PAUSE_ITEM];
@@ -561,7 +561,7 @@ void KaleidoScope_UpdateItemCursor(PlayState* play) {
}
cursorSlot = pauseCtx->cursorPoint[PAUSE_ITEM];
- pauseCtx->cursorColorSet = 2;
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_YELLOW;
if (moveCursorResult == PAUSE_CURSOR_RESULT_SLOT) {
cursorItem = gSaveContext.save.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]];
@@ -571,7 +571,7 @@ void KaleidoScope_UpdateItemCursor(PlayState* play) {
if (cursorItem == ITEM_NONE) {
cursorItem = PAUSE_ITEM_NONE;
- pauseCtx->cursorColorSet = 0;
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_WHITE;
}
if ((cursorItem != (u32)PAUSE_ITEM_NONE) && (msgCtx->msgLength == 0)) {
@@ -691,7 +691,7 @@ void KaleidoScope_UpdateItemCursor(PlayState* play) {
play_sound(NA_SE_SY_CURSOR);
}
} else if ((pauseCtx->unk_200 == 3) && (pauseCtx->pageIndex == PAUSE_ITEM)) {
- pauseCtx->cursorColorSet = 2;
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_YELLOW;
}
}
diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_map.c b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_map.c
index 5f4c136e0..823a3d63f 100644
--- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_map.c
+++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_map.c
@@ -306,7 +306,7 @@ void KaleidoScope_UpdateDungeonCursor(PlayState* play) {
if (pauseCtx->state == 6) {
if ((pauseCtx->unk_200 == 0) && (pauseCtx->pageIndex == PAUSE_MAP)) {
- pauseCtx->cursorColorSet = 0;
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_WHITE;
oldCursorPoint = pauseCtx->cursorPoint[PAUSE_MAP];
if (pauseCtx->stickAdjX > 30) {
pauseCtx->unk_298 = 4.0f;
@@ -826,7 +826,7 @@ void KaleidoScope_UpdateWorldMapCursor(PlayState* play) {
s16 oldCursorPoint;
if ((pauseCtx->state == 6) && (pauseCtx->unk_200 == 0) && (pauseCtx->pageIndex == PAUSE_MAP)) {
- pauseCtx->cursorColorSet = 0;
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_WHITE;
oldCursorPoint = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
if (gSaveContext.buttonStatus[EQUIP_SLOT_A] != BTN_DISABLED) {
@@ -937,7 +937,7 @@ void KaleidoScope_UpdateWorldMapCursor(PlayState* play) {
play_sound(NA_SE_SY_CURSOR);
}
} else if (pauseCtx->state == 0x17) {
- pauseCtx->cursorColorSet = 4;
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_BLUE;
oldCursorPoint = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
if (pauseCtx->stickAdjX > 30) {
diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c
index cedcbf8f3..77835026f 100644
--- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c
+++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_mask.c
@@ -257,7 +257,7 @@ void KaleidoScope_DrawMaskSelect(PlayState* play) {
}
gSPVertex(POLY_OPA_DISP++, &pauseCtx->maskVtx[j + 0], 4, 0);
- KaleidoScope_DrawQuadTextureRGBA32(
+ KaleidoScope_DrawTexQuadRGBA32(
play->state.gfxCtx, gItemIcons[((void)0, gSaveContext.save.inventory.items[i + NUM_ITEM_SLOTS])],
32, 32, 0);
}
@@ -285,8 +285,8 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) {
s16 moveCursorResult;
s16 pad2;
- pauseCtx->cursorColorSet = 0;
- pauseCtx->nameColorSet = 0;
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_WHITE;
+ pauseCtx->nameColorSet = PAUSE_NAME_COLOR_SET_WHITE;
if ((pauseCtx->state == 6) && (pauseCtx->unk_200 == 0) && (pauseCtx->pageIndex == PAUSE_MASK) &&
!pauseCtx->itemDescriptionOn) {
@@ -298,7 +298,7 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) {
// Move cursor left/right
if (pauseCtx->cursorSpecialPos == 0) {
// cursor is currently on a slot
- pauseCtx->cursorColorSet = 2;
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_YELLOW;
if (ABS_ALT(pauseCtx->stickAdjX) > 30) {
cursorPoint = pauseCtx->cursorPoint[PAUSE_MASK];
@@ -497,7 +497,7 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) {
}
cursorSlot = pauseCtx->cursorPoint[PAUSE_MASK];
- pauseCtx->cursorColorSet = 2;
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_YELLOW;
if (moveCursorResult == PAUSE_CURSOR_RESULT_SLOT) {
cursorItem = gSaveContext.save.inventory.items[pauseCtx->cursorPoint[PAUSE_MASK] + NUM_ITEM_SLOTS];
@@ -513,7 +513,7 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) {
if (cursorItem == ITEM_NONE) {
cursorItem = PAUSE_ITEM_NONE;
- pauseCtx->cursorColorSet = 0;
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_WHITE;
}
if ((cursorItem != PAUSE_ITEM_NONE) && (msgCtx->msgLength == 0)) {
@@ -614,7 +614,7 @@ void KaleidoScope_UpdateMaskCursor(PlayState* play) {
play_sound(NA_SE_SY_CURSOR);
}
} else if ((pauseCtx->unk_200 == 0xF) && (pauseCtx->pageIndex == PAUSE_MASK)) {
- pauseCtx->cursorColorSet = 2;
+ pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_YELLOW;
}
}
diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h
index 72392390b..14c16ddcd 100644
--- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h
+++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h
@@ -30,12 +30,19 @@ typedef enum {
} EquipState;
typedef enum {
- /* 0 */ DEBUG_EDITOR_NONE,
- /* 1 */ DEBUG_EDITOR_INVENTORY_INIT,
- /* 2 */ DEBUG_EDITOR_INVENTORY,
- /* 3 */ DEBUG_EDITOR_EVENTS
+ /* 0 */ DEBUG_EDITOR_NONE,
+ /* 1 */ DEBUG_EDITOR_INVENTORY_INIT,
+ /* 2 */ DEBUG_EDITOR_INVENTORY,
+ /* 3 */ DEBUG_EDITOR_EVENTS
} DebugEditor;
+#define PAUSE_NAME_COLOR_SET_WHITE 0
+#define PAUSE_NAME_COLOR_SET_GREY 1
+
+#define PAUSE_CURSOR_COLOR_SET_WHITE 0
+#define PAUSE_CURSOR_COLOR_SET_YELLOW 2
+#define PAUSE_CURSOR_COLOR_SET_BLUE 4
+
// To be used for Item-Page cursor and Mask-Page cursor
typedef enum {
/* 0 */ PAUSE_CURSOR_RESULT_NONE,
@@ -51,8 +58,8 @@ typedef enum {
// NES
void KaleidoScope_MoveCursorToSpecialPos(PlayState* play, s16 cursorSpecialPos);
-void KaleidoScope_DrawQuadTextureRGBA32(GraphicsContext* gfxCtx, TexturePtr texture, u16 width, u16 height, u16 point);
-void KaleidoScope_SetView(PauseContext* pauseCtx, f32 x, f32 y, f32 z);
+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);
// Map
@@ -61,6 +68,10 @@ void KaleidoScope_UpdateDungeonCursor(PlayState* play);
void KaleidoScope_DrawWorldMap(PlayState* play);
void KaleidoScope_UpdateWorldMapCursor(PlayState* play);
+// Collect
+void KaleidoScope_DrawQuestStatus(PlayState* play);
+void KaleidoScope_UpdateQuestCursor(PlayState* play);
+
// Item
void KaleidoScope_SetCursorVtx(PauseContext* pauseCtx, u16 index, Vtx* vtx);
void KaleidoScope_DrawItemSelect(PlayState* play);
@@ -72,6 +83,9 @@ void KaleidoScope_DrawMaskSelect(PlayState* play);
void KaleidoScope_UpdateMaskCursor(PlayState* play);
void KaleidoScope_UpdateMaskEquip(PlayState* play);
+// Prompt
+void KaleidoScope_UpdatePrompt(PlayState* play);
+
// Debug
void KaleidoScope_DrawInventoryEditor(PlayState* play);
void KaleidoScope_UpdateInventoryEditor(PlayState* play);
diff --git a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c
index 6c6754b3d..a322fda1f 100644
--- a/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c
+++ b/src/overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope_NES.c
@@ -222,30 +222,173 @@ s16 D_8082BB68[] = {
0x000E, 0xFFFE, 0xFFFE, 0xFFEE, 0xFFEE, 0x0000,
};
-s16 D_8082BB74[] = {
- 0x002D, 0x004E, 0x000A, 0x002D, 0x0050, 0x000B, 0xFF93, 0xFFA9, 0xFFBF, 0xFFD7, 0xFFED, 0xFFEE, 0xFF93, 0xFFA9,
- 0xFFBF, 0xFFD7, 0xFFED, 0xFFEE, 0xFF99, 0x0007, 0x0052, 0xFF92, 0xFFCA, 0xFF9E, 0xFFAA, 0xFFB6, 0xFFC2, 0xFFCE,
- 0xFFDA, 0xFFE6, 0xFFF2, 0xFF9E, 0xFFAA, 0xFFB6, 0xFFC2, 0xFFCE, 0xFFDA, 0xFFE6, 0xFFF2, 0x0000,
+s16 sQuestVtxRectLeft[] = {
+ 45, // QUEST_REMAINS_ODOLWA
+ 78, // QUEST_REMAINS_GOHT
+ 10, // QUEST_REMAINS_GYORG
+ 45, // QUEST_REMAINS_TWINMOLD
+ 80, // QUEST_SHIELD
+ 11, // QUEST_SWORD
+ -109, // QUEST_SONG_SONATA
+ -87, // QUEST_SONG_LULLABY
+ -65, // QUEST_SONG_BOSSA_NOVA
+ -41, // QUEST_SONG_ELEGY
+ -19, // QUEST_SONG_OATH
+ -18, // QUEST_SONG_SARIA
+ -109, // QUEST_SONG_TIME
+ -87, // QUEST_SONG_HEALING
+ -65, // QUEST_SONG_EPONA
+ -41, // QUEST_SONG_SOARING
+ -19, // QUEST_SONG_STORMS
+ -18, // QUEST_SONG_SUN
+ -103, // QUEST_BOMBERS_NOTEBOOK
+ 7, // QUEST_QUIVER
+ 82, // QUEST_BOMB_BAG
+ -110, // QUEST_SKULL_TOKEN (unused)
+ -54, // QUEST_HEART_PIECE
+ -98, // ocarina song button index 0
+ -86, // ocarina song button index 1
+ -74, // ocarina song button index 2
+ -62, // ocarina song button index 3
+ -50, // ocarina song button index 4
+ -38, // ocarina song button index 5
+ -26, // ocarina song button index 6
+ -14, // ocarina song button index 7
+ -98, // ocarina input button index 0
+ -86, // ocarina input button index 1
+ -74, // ocarina input button index 2
+ -62, // ocarina input button index 3
+ -50, // ocarina input button index 4
+ -38, // ocarina input button index 5
+ -26, // ocarina input button index 6
+ -14, // ocarina input button index 7
+};
+
+s16 sQuestVtxRectTop[] = {
+ 62, // QUEST_REMAINS_ODOLWA
+ 42, // QUEST_REMAINS_GOHT
+ 42, // QUEST_REMAINS_GYORG
+ 20, // QUEST_REMAINS_TWINMOLD
+ -9, // QUEST_SHIELD
+ -9, // QUEST_SWORD
+ -20, // QUEST_SONG_SONATA
+ -20, // QUEST_SONG_LULLABY
+ -20, // QUEST_SONG_BOSSA_NOVA
+ -20, // QUEST_SONG_ELEGY
+ -20, // QUEST_SONG_OATH
+ -20, // QUEST_SONG_SARIA
+ 2, // QUEST_SONG_TIME
+ 2, // QUEST_SONG_HEALING
+ 2, // QUEST_SONG_EPONA
+ 2, // QUEST_SONG_SOARING
+ 2, // QUEST_SONG_STORMS
+ 2, // QUEST_SONG_SUN
+ 54, // QUEST_BOMBERS_NOTEBOOK
+ -44, // QUEST_QUIVER
+ -44, // QUEST_BOMB_BAG
+ 34, // QUEST_SKULL_TOKEN (unused)
+ 58, // QUEST_HEART_PIECE
+ -52, // ocarina song button index 0
+ -52, // ocarina song button index 1
+ -52, // ocarina song button index 2
+ -52, // ocarina song button index 3
+ -52, // ocarina song button index 4
+ -52, // ocarina song button index 5
+ -52, // ocarina song button index 6
+ -52, // ocarina song button index 7
+ -52, // ocarina input button index 0
+ -52, // ocarina input button index 1
+ -52, // ocarina input button index 2
+ -52, // ocarina input button index 3
+ -52, // ocarina input button index 4
+ -52, // ocarina input button index 5
+ -52, // ocarina input button index 6
+ -52, // ocarina input button index 7
+};
+
+s16 sQuestVtxWidths[] = {
+ 32, // QUEST_REMAINS_ODOLWA
+ 32, // QUEST_REMAINS_GOHT
+ 32, // QUEST_REMAINS_GYORG
+ 32, // QUEST_REMAINS_TWINMOLD
+ 32, // QUEST_SHIELD
+ 32, // QUEST_SWORD
+ 16, // QUEST_SONG_SONATA
+ 16, // QUEST_SONG_LULLABY
+ 16, // QUEST_SONG_BOSSA_NOVA
+ 16, // QUEST_SONG_ELEGY
+ 16, // QUEST_SONG_OATH
+ 16, // QUEST_SONG_SARIA
+ 16, // QUEST_SONG_TIME
+ 16, // QUEST_SONG_HEALING
+ 16, // QUEST_SONG_EPONA
+ 16, // QUEST_SONG_SOARING
+ 16, // QUEST_SONG_STORMS
+ 16, // QUEST_SONG_SUN
+ 32, // QUEST_BOMBERS_NOTEBOOK
+ 32, // QUEST_QUIVER
+ 32, // QUEST_BOMB_BAG
+ 24, // QUEST_SKULL_TOKEN (unused)
+ 48, // QUEST_HEART_PIECE
+ 16, // ocarina song button index 0
+ 16, // ocarina song button index 1
+ 16, // ocarina song button index 2
+ 16, // ocarina song button index 3
+ 16, // ocarina song button index 4
+ 16, // ocarina song button index 5
+ 16, // ocarina song button index 6
+ 16, // ocarina song button index 7
+ 16, // ocarina input button index 0
+ 16, // ocarina input button index 1
+ 16, // ocarina input button index 2
+ 16, // ocarina input button index 3
+ 16, // ocarina input button index 4
+ 16, // ocarina input button index 5
+ 16, // ocarina input button index 6
+ 16, // ocarina input button index 7
+};
+
+s16 sQuestVtxHeights[] = {
+ 32, // QUEST_REMAINS_ODOLWA
+ 32, // QUEST_REMAINS_GOHT
+ 32, // QUEST_REMAINS_GYORG
+ 32, // QUEST_REMAINS_TWINMOLD
+ 32, // QUEST_SHIELD
+ 32, // QUEST_SWORD
+ 24, // QUEST_SONG_SONATA
+ 24, // QUEST_SONG_LULLABY
+ 24, // QUEST_SONG_BOSSA_NOVA
+ 24, // QUEST_SONG_ELEGY
+ 24, // QUEST_SONG_OATH
+ 24, // QUEST_SONG_SARIA
+ 24, // QUEST_SONG_TIME
+ 24, // QUEST_SONG_HEALING
+ 24, // QUEST_SONG_EPONA
+ 24, // QUEST_SONG_SOARING
+ 24, // QUEST_SONG_STORMS
+ 24, // QUEST_SONG_SUN
+ 32, // QUEST_BOMBERS_NOTEBOOK
+ 32, // QUEST_QUIVER
+ 32, // QUEST_BOMB_BAG
+ 24, // QUEST_SKULL_TOKEN (unused)
+ 48, // QUEST_HEART_PIECE
+ 16, // ocarina song button index 0
+ 16, // ocarina song button index 1
+ 16, // ocarina song button index 2
+ 16, // ocarina song button index 3
+ 16, // ocarina song button index 4
+ 16, // ocarina song button index 5
+ 16, // ocarina song button index 6
+ 16, // ocarina song button index 7
+ 16, // ocarina input button index 0
+ 16, // ocarina input button index 1
+ 16, // ocarina input button index 2
+ 16, // ocarina input button index 3
+ 16, // ocarina input button index 4
+ 16, // ocarina input button index 5
+ 16, // ocarina input button index 6
+ 16, // ocarina input button index 7
};
-
-s16 D_8082BBC4[] = {
- 0x003E, 0x002A, 0x002A, 0x0014, 0xFFF7, 0xFFF7, 0xFFEC, 0xFFEC, 0xFFEC, 0xFFEC, 0xFFEC, 0xFFEC, 0x0002, 0x0002,
- 0x0002, 0x0002, 0x0002, 0x0002, 0x0036, 0xFFD4, 0xFFD4, 0x0022, 0x003A, 0xFFCC, 0xFFCC, 0xFFCC, 0xFFCC, 0xFFCC,
- 0xFFCC, 0xFFCC, 0xFFCC, 0xFFCC, 0xFFCC, 0xFFCC, 0xFFCC, 0xFFCC, 0xFFCC, 0xFFCC, 0xFFCC, 0x0000,
-};
-
-s16 D_8082BC14[] = {
- 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010,
- 0x0010, 0x0010, 0x0010, 0x0010, 0x0020, 0x0020, 0x0020, 0x0018, 0x0030, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010,
- 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0000,
-};
-
-s16 D_8082BC64[] = {
- 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018,
- 0x0018, 0x0018, 0x0018, 0x0018, 0x0020, 0x0020, 0x0020, 0x0018, 0x0030, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010,
- 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0000,
-};
-
f32 D_8082BCB4[] = {
-62.0f, -36.0f, -10.0f, 16.0f, 42.0f, 68.0f,
};
@@ -323,7 +466,7 @@ s32 D_8082BEB8[] = { 0, 0 };
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_kaleido_scope/func_80821A04.s")
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_kaleido_scope/KaleidoScope_DrawQuadTextureRGBA32.s")
+#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_kaleido_scope/KaleidoScope_DrawTexQuadRGBA32.s")
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_kaleido_scope/func_80821CC4.s")