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
This commit is contained in:
engineer124 2022-10-12 23:39:39 -04:00 committed by GitHub
parent 868029b213
commit f3db029936
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 1262 additions and 192 deletions

View File

@ -2929,7 +2929,7 @@ void AudioOcarina_StartDefault(u32 ocarinaFlags);
u8 func_8019B5AC(void);
void AudioOcarina_ResetAndReadInput(void);
void AudioOcarina_SetOcarinaDisableTimer(u8 unused, u8 timer);
u32 AudioOcarina_SetInstrument(u8 ocarinaInstrumentId);
void AudioOcarina_SetInstrument(u8 ocarinaInstrumentId);
void AudioOcarina_SetPlaybackSong(s8 songIndexPlusOne, u8 playbackState);
void AudioOcarina_SetRecordingState(u8 recordingState);
OcarinaStaff* AudioOcarina_GetRecordingStaff(void);

View File

@ -50,6 +50,9 @@
#define R_PAUSE_WORLD_MAP_YAW YREG(24)
#define R_PAUSE_WORLD_MAP_Y_OFFSET YREG(25)
#define R_PAUSE_WORLD_MAP_DEPTH YREG(26)
#define R_PAUSE_DBG_QUEST_CURSOR_ON YREG(69)
#define R_PAUSE_DBG_QUEST_CURSOR_X YREG(70)
#define R_PAUSE_DBG_QUEST_CURSOR_Y YREG(71)
#define R_MAGIC_FILL_COLOR(i) ZREG(0 + i)
#define R_C_BTN_COLOR(i) ZREG(39 + i)
#define R_B_BTN_COLOR(i) ZREG(43 + i)

View File

@ -924,7 +924,7 @@ extern u8 gUpgradeShifts[8];
extern u16 gUpgradeCapacities[][4];
extern u32 gGsFlagsMask[];
extern u32 gGsFlagsShift[];
extern void* gItemIcons[];
extern TexturePtr gItemIcons[];
extern u8 gItemSlots[];
extern s16 gItemPrices[];
extern u16 gSceneIdsPerRegion[11][27];
@ -973,7 +973,7 @@ extern struct_801C5F44 D_801C5F44[]; // D_801C5F44
extern u8 D_801CFC98;
extern s16 D_801CFCA4[9];
// extern UNK_TYPE2 D_801CFCAC;
// extern UNK_TYPE1 D_801CFCB8;
extern s16 gOcarinaSongItemMap[];
// extern UNK_TYPE2 D_801CFCD8;
// extern UNK_TYPE2 D_801CFCE4;
// extern UNK_TYPE2 D_801CFCF0;

View File

@ -407,7 +407,7 @@ typedef struct {
/* 0x1E8 */ OSMesg loadMsg;
/* 0x1EC */ u16 state;
/* 0x1EE */ u16 debugEditor;
/* 0x1F0 */ u8 unk_1F0;
/* 0x1F0 */ u8 bombersNotebookOpen;
/* 0x1F4 */ Vec3f eye;
/* 0x200 */ u16 unk_200;
/* 0x202 */ u16 mode;
@ -452,7 +452,7 @@ typedef struct {
/* 0x298 */ f32 unk_298;
/* 0x29C */ s16 promptChoice; // save/continue choice: 0 = yes; 4 = no
/* 0x29E */ s16 promptAlpha;
/* 0x2A0 */ s16 unk_2A0;
/* 0x2A0 */ s16 ocarinaSongIndex;
/* 0x2A2 */ u8 worldMapPoints[20];
/* 0x2B6 */ u8 unk_2B6;
/* 0x2B7 */ u8 unk_2B7;
@ -460,9 +460,9 @@ typedef struct {
/* 0x2B9 */ u8 itemDescriptionOn; // helpful description of item given through a message box
/* 0x2BA */ s16 equipAnimScale; // scale of item icon while moving being equipped to c-button
/* 0x2BC */ s16 equipAnimShrinkRate; // rate the scale is shrinking for the item icon while moving being equipped to c-button
/* 0x2BE */ s16 unk_2BE[5];
/* 0x2BE */ s16 ocarinaButtonsY[5];
/* 0x2C8 */ u16 unk_2C8; // Uses PauseMenuPage enum for Owl Warp. Never set.
/* 0x2CA */ s16 unk_2CA; // Uses OwlStatueId enum for Owl Warp. Never set.
/* 0x2CA */ s16 unk_2CA; // Uses OwlWarpId enum for Owl Warp. Never set.
} PauseContext; // size = 0x2D0
typedef struct {

View File

@ -40,7 +40,7 @@ typedef enum {
} UpgradeType;
typedef enum {
/* 0x00 */ QUEST_REMAINS_ODOWLA,
/* 0x00 */ QUEST_REMAINS_ODOLWA,
/* 0x01 */ QUEST_REMAINS_GOHT,
/* 0x02 */ QUEST_REMAINS_GYORG,
/* 0x03 */ QUEST_REMAINS_TWINMOLD,
@ -59,8 +59,12 @@ typedef enum {
/* 0x10 */ QUEST_SONG_STORMS,
/* 0x11 */ QUEST_SONG_SUN,
/* 0x12 */ QUEST_BOMBERS_NOTEBOOK, // Obtained Bombers Notebook
/* 0x13 */ QUEST_SKULL_TOKEN,
/* 0x18 */ QUEST_SONG_LULLABY_INTRO = 0x18,
/* 0x13 */ QUEST_QUIVER,
/* 0x14 */ QUEST_BOMB_BAG,
/* 0x15 */ QUEST_SKULL_TOKEN,
/* 0x16 */ QUEST_HEART_PIECE, // for `pauseCtx->cursorPoint[PAUSE_QUEST]`
/* 0x17 */ QUEST_17, // Used in a conditional for quest cursors
/* 0x18 */ QUEST_SONG_LULLABY_INTRO,
/* 0x19 */ QUEST_PICTOGRAPH, // A photo from the pictograph box is saved
/* 0x1C */ QUEST_HEART_PIECE_COUNT = 0x1C
} QuestItem;

View File

@ -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));

View File

@ -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;
}
}

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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) {

View File

@ -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))) {

View File

@ -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;
}

View File

@ -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)) {

View File

@ -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];
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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);

View File

@ -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;
}
}

View File

@ -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) {

View File

@ -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;
}
}

View File

@ -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);

View File

@ -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 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 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 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 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 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,
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
};
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")

View File

@ -4197,9 +4197,9 @@
0x80815770:("DayTelop_Noop",),
0x8081577C:("DayTelop_LoadGraphics",),
0x80815820:("DayTelop_Init",),
0x808160A0:("func_808160A0",),
0x80817B5C:("func_80817B5C",),
0x80818904:("func_80818904",),
0x808160A0:("KaleidoScope_DrawQuestStatus",),
0x80817B5C:("KaleidoScope_UpdateQuestCursor",),
0x80818904:("KaleidoScope_UpdateQuestStatusPoint",),
0x80818920:("KaleidoScope_DrawInventoryEditorText",),
0x808190C4:("KaleidoScope_DrawDigit",),
0x80819238:("KaleidoScope_DrawInventoryEditor",),
@ -4223,7 +4223,7 @@
0x80821958:("func_80821958",),
0x80821984:("KaleidoScope_MoveCursorToSpecialPos",),
0x80821A04:("func_80821A04",),
0x80821AD4:("KaleidoScope_DrawQuadTextureRGBA32",),
0x80821AD4:("KaleidoScope_DrawTexQuadRGBA32",),
0x80821CC4:("func_80821CC4",),
0x80821D84:("func_80821D84",),
0x80821F30:("func_80821F30",),

View File

@ -2003,7 +2003,7 @@
0x801CFC98:("D_801CFC98","UNK_TYPE1","",0x1),
0x801CFCA4:("D_801CFCA4","UNK_TYPE2","",0x2),
0x801CFCAC:("D_801CFCAC","UNK_TYPE2","",0x2),
0x801CFCB8:("D_801CFCB8","UNK_TYPE1","",0x1),
0x801CFCB8:("gOcarinaSongItemMap","UNK_TYPE1","",0x1),
0x801CFCD8:("D_801CFCD8","UNK_TYPE2","",0x2),
0x801CFCE4:("D_801CFCE4","UNK_TYPE2","",0x2),
0x801CFCF0:("D_801CFCF0","UNK_TYPE2","",0x2),
@ -4660,32 +4660,32 @@
0x80815FF4:("sDayLeftTextures","TexturePtr","[4]",0x10),
0x80816004:("sDayRightTextures","TexturePtr","[4]",0x10),
0x80816014:("sHoursLeftTextures","TexturePtr","[3]",0xC),
0x8082AED0:("D_8082AED0","UNK_TYPE1","",0x1),
0x8082AED8:("D_8082AED8","UNK_TYPE1","",0x1),
0x8082AEE0:("D_8082AEE0","UNK_TYPE2","",0x2),
0x8082AEE4:("D_8082AEE4","UNK_TYPE1","",0x1),
0x8082AEF0:("D_8082AEF0","UNK_TYPE2","",0x2),
0x8082AF04:("D_8082AF04","UNK_TYPE2","",0x2),
0x8082AF24:("D_8082AF24","UNK_TYPE1","",0x1),
0x8082AF6C:("D_8082AF6C","UNK_TYPE2","",0x2),
0x8082AF78:("D_8082AF78","UNK_TYPE2","",0x2),
0x8082AF84:("D_8082AF84","UNK_TYPE2","",0x2),
0x8082AF90:("D_8082AF90","UNK_TYPE2","",0x2),
0x8082AF94:("D_8082AF94","UNK_TYPE2","",0x2),
0x8082AF98:("D_8082AF98","UNK_TYPE2","",0x2),
0x8082AF9C:("D_8082AF9C","UNK_TYPE2","",0x2),
0x8082AFA0:("D_8082AFA0","UNK_TYPE2","",0x2),
0x8082AFA4:("D_8082AFA4","UNK_TYPE2","",0x2),
0x8082AFA8:("D_8082AFA8","UNK_TYPE2","",0x2),
0x8082AFAC:("D_8082AFAC","UNK_TYPE2","",0x2),
0x8082AFB0:("D_8082AFB0","UNK_TYPE1","",0x1),
0x8082AFC4:("D_8082AFC4","UNK_TYPE2","",0x2),
0x8082AFDC:("D_8082AFDC","UNK_TYPE2","",0x2),
0x8082AFF4:("D_8082AFF4","s16","[12]",0x18),
0x8082B00C:("D_8082B00C","void*","[6]",0x18),
0x8082B024:("D_8082B024","UNK_TYPE1","",0x1),
0x8082B028:("D_8082B028","UNK_TYPE2","",0x2),
0x8082B02C:("D_8082B02C","s16","[98]",0xC4),
0x8082AED0:("sQuestRemainsColorTimerInit","UNK_TYPE1","",0x1),
0x8082AED8:("sQuestHpColorTimerInit","UNK_TYPE1","",0x1),
0x8082AEE0:("sQuestSongPlayedOcarinaButtonsNum","UNK_TYPE2","",0x2),
0x8082AEE4:("sQuestSongPlayedOcarinaButtons","UNK_TYPE1","",0x1),
0x8082AEF0:("sQuestSongPlayedOcarinaButtonsAlpha","UNK_TYPE2","",0x2),
0x8082AF04:("sQuestHpPrimColorTargets","UNK_TYPE2","",0x2),
0x8082AF24:("sQuestRemainsEnvTargets","UNK_TYPE1","",0x1),
0x8082AF6C:("sQuestRemainsEnvRed","UNK_TYPE2","",0x2),
0x8082AF78:("sQuestRemainsEnvGreen","UNK_TYPE2","",0x2),
0x8082AF84:("sQuestRemainsEnvBlue","UNK_TYPE2","",0x2),
0x8082AF90:("sQuestRemainsColorTimer","UNK_TYPE2","",0x2),
0x8082AF94:("sQuestRemainsColorTimerIndex","UNK_TYPE2","",0x2),
0x8082AF98:("sQuestHpPrimRed","UNK_TYPE2","",0x2),
0x8082AF9C:("sQuestHpPrimGreen","UNK_TYPE2","",0x2),
0x8082AFA0:("sQuestHpPrimBlue","UNK_TYPE2","",0x2),
0x8082AFA4:("sQuestHpPrimAlpha","UNK_TYPE2","",0x2),
0x8082AFA8:("sQuestHpColorTimer","UNK_TYPE2","",0x2),
0x8082AFAC:("sQuestHpPrimColorTargetIndex","UNK_TYPE2","",0x2),
0x8082AFB0:("sOcarinaButtonTextures","UNK_TYPE1","",0x1),
0x8082AFC4:("sQuestSongsPrimRed","UNK_TYPE2","",0x2),
0x8082AFDC:("sQuestSongsPrimGreen","UNK_TYPE2","",0x2),
0x8082AFF4:("sQuestSongsPrimBlue","s16","[12]",0x18),
0x8082B00C:("sQuestUpgradeTextures","void*","[6]",0x18),
0x8082B024:("sQuestUpgrades","UNK_TYPE1","",0x1),
0x8082B028:("sQuestSongPlaybackDelayTimer","UNK_TYPE2","",0x2),
0x8082B02C:("sCursorPointLinks","s16","[98]",0xC4),
0x8082B0F0:("sCurSection","UNK_TYPE2","",0x2),
0x8082B0F4:("sCurRow","UNK_TYPE2","",0x2),
0x8082B0F8:("sSectionPositions","s16","[280]",0x230),
@ -4808,10 +4808,10 @@
0x8082BB38:("D_8082BB38","UNK_PTR","",0x4),
0x8082BB50:("D_8082BB50","UNK_PTR","",0x4),
0x8082BB68:("D_8082BB68","UNK_TYPE2","",0x2),
0x8082BB74:("D_8082BB74","UNK_TYPE2","",0x2),
0x8082BBC4:("D_8082BBC4","UNK_TYPE2","",0x2),
0x8082BC14:("D_8082BC14","UNK_TYPE2","",0x2),
0x8082BC64:("D_8082BC64","UNK_TYPE2","",0x2),
0x8082BB74:("sQuestVtxRectLeft","UNK_TYPE2","",0x2),
0x8082BBC4:("sQuestVtxRectTop","UNK_TYPE2","",0x2),
0x8082BC14:("sQuestVtxWidths","UNK_TYPE2","",0x2),
0x8082BC64:("sQuestVtxHeights","UNK_TYPE2","",0x2),
0x8082BCB4:("D_8082BCB4","UNK_TYPE1","",0x1),
0x8082BCCC:("D_8082BCCC","UNK_TYPE1","",0x1),
0x8082BCDC:("D_8082BCDC","UNK_TYPE1","",0x1),

View File

@ -748,6 +748,7 @@ wordReplace = {
"play->actorCtx.unk4": "play->actorCtx.lensMaskSize",
"play->nextEntranceIndex": "play->nextEntrance",
"play->sceneNum": "play->sceneId",
"play->pauseCtx.unk_1F0": "play->pauseCtx.bombersNotebookOpen",
"gSaveContext.unk_3DC8": "gSaveContext.timerOsTime",
"gSaveContext.unk_3DD0": "gSaveContext.timerStates",