From 4cfb5f05a08d0747f993ef914d4d78872ca02b2f Mon Sep 17 00:00:00 2001 From: fig02 Date: Wed, 19 Feb 2025 19:59:21 -0500 Subject: [PATCH 1/2] Use "entry" terminology in map select (#2479) * use entry terminology in map select * missed one --- include/z64.h | 10 +-- src/overlays/gamestates/ovl_select/z_select.c | 64 +++++++++---------- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/include/z64.h b/include/z64.h index d572fcfdbd..50d801603e 100644 --- a/include/z64.h +++ b/include/z64.h @@ -80,23 +80,23 @@ typedef struct ConsoleLogoState { struct MapSelectState; -typedef struct SceneSelectEntry { +typedef struct MapSelectEntry { /* 0x00 */ char* name; /* 0x04 */ void (*loadFunc)(struct MapSelectState*, s32); /* 0x08 */ s32 entranceIndex; -} SceneSelectEntry; // size = 0xC +} MapSelectEntry; // size = 0xC typedef struct MapSelectState { /* 0x0000 */ GameState state; /* 0x00A8 */ View view; /* 0x01D0 */ s32 count; - /* 0x01D4 */ SceneSelectEntry* scenes; - /* 0x01D8 */ s32 currentScene; + /* 0x01D4 */ MapSelectEntry* entries; + /* 0x01D8 */ s32 currentEntry; /* 0x01DC */ s32 pageDownIndex; // Index of pageDownStops /* 0x01E0 */ s32 pageDownStops[7]; /* 0x01FC */ char unk_1FC[0x0C]; /* 0x0208 */ s32 opt; - /* 0x020C */ s32 topDisplayedScene; // The scene which is currently at the top of the screen + /* 0x020C */ s32 topDisplayedEntry; // The entry which is currently at the top of the screen /* 0x0210 */ char unk_210[0x0C]; /* 0x021C */ s32 verticalInputAccumulator; /* 0x0220 */ s32 verticalInput; diff --git a/src/overlays/gamestates/ovl_select/z_select.c b/src/overlays/gamestates/ovl_select/z_select.c index 6048a614fb..016c44ad16 100644 --- a/src/overlays/gamestates/ovl_select/z_select.c +++ b/src/overlays/gamestates/ovl_select/z_select.c @@ -66,7 +66,7 @@ void func_80800B08_unknown(MapSelectState* this, s32 arg1) { } #endif -static SceneSelectEntry sScenes[] = { +static MapSelectEntry sMapSelectEntries[] = { { " 1:SPOT00", MapSelect_LoadGame, ENTR_HYRULE_FIELD_0 }, { " 2:SPOT01", MapSelect_LoadGame, ENTR_KAKARIKO_VILLAGE_0 }, { " 3:SPOT02", MapSelect_LoadGame, ENTR_GRAVEYARD_0 }, @@ -279,13 +279,13 @@ static SceneSelectEntry sScenes[] = { void MapSelect_UpdateMenu(MapSelectState* this) { Input* input = &this->state.input[0]; s32 pad; - SceneSelectEntry* selectedScene; + MapSelectEntry* selectedEntry; if (this->verticalInputAccumulator == 0) { if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_START)) { - selectedScene = &this->scenes[this->currentScene]; - if (selectedScene->loadFunc != NULL) { - selectedScene->loadFunc(this, selectedScene->entranceIndex); + selectedEntry = &this->entries[this->currentEntry]; + if (selectedEntry->loadFunc != NULL) { + selectedEntry->loadFunc(this, selectedEntry->entranceIndex); } } @@ -423,7 +423,7 @@ void MapSelect_UpdateMenu(MapSelectState* this) { this->pageDownIndex++; this->pageDownIndex = (this->pageDownIndex + ARRAY_COUNT(this->pageDownStops)) % ARRAY_COUNT(this->pageDownStops); - this->currentScene = this->topDisplayedScene = this->pageDownStops[this->pageDownIndex]; + this->currentEntry = this->topDisplayedEntry = this->pageDownStops[this->pageDownIndex]; } this->verticalInputAccumulator += this->verticalInput; @@ -432,12 +432,12 @@ void MapSelect_UpdateMenu(MapSelectState* this) { this->verticalInput = 0; this->verticalInputAccumulator = 0; - this->currentScene++; - this->currentScene = (this->currentScene + this->count) % this->count; + this->currentEntry++; + this->currentEntry = (this->currentEntry + this->count) % this->count; - if (this->currentScene == ((this->topDisplayedScene + this->count + 19) % this->count)) { - this->topDisplayedScene++; - this->topDisplayedScene = (this->topDisplayedScene + this->count) % this->count; + if (this->currentEntry == ((this->topDisplayedEntry + this->count + 19) % this->count)) { + this->topDisplayedEntry++; + this->topDisplayedEntry = (this->topDisplayedEntry + this->count) % this->count; } } @@ -445,25 +445,25 @@ void MapSelect_UpdateMenu(MapSelectState* this) { this->verticalInput = 0; this->verticalInputAccumulator = 0; - if (this->currentScene == this->topDisplayedScene) { - this->topDisplayedScene -= 2; - this->topDisplayedScene = (this->topDisplayedScene + this->count) % this->count; + if (this->currentEntry == this->topDisplayedEntry) { + this->topDisplayedEntry -= 2; + this->topDisplayedEntry = (this->topDisplayedEntry + this->count) % this->count; } - this->currentScene--; - this->currentScene = (this->currentScene + this->count) % this->count; + this->currentEntry--; + this->currentEntry = (this->currentEntry + this->count) % this->count; - if (this->currentScene == ((this->topDisplayedScene + this->count) % this->count)) { - this->topDisplayedScene--; - this->topDisplayedScene = (this->topDisplayedScene + this->count) % this->count; + if (this->currentEntry == ((this->topDisplayedEntry + this->count) % this->count)) { + this->topDisplayedEntry--; + this->topDisplayedEntry = (this->topDisplayedEntry + this->count) % this->count; } } - this->currentScene = (this->currentScene + this->count) % this->count; - this->topDisplayedScene = (this->topDisplayedScene + this->count) % this->count; + this->currentEntry = (this->currentEntry + this->count) % this->count; + this->topDisplayedEntry = (this->topDisplayedEntry + this->count) % this->count; - dREG(80) = this->currentScene; - dREG(81) = this->topDisplayedScene; + dREG(80) = this->currentEntry; + dREG(81) = this->topDisplayedEntry; dREG(82) = this->pageDownIndex; if (this->timerUp != 0) { @@ -496,14 +496,14 @@ void MapSelect_PrintMenu(MapSelectState* this, GfxPrint* printer) { for (i = 0; i < 20; i++) { GfxPrint_SetPos(printer, 9, i + 4); - scene = (this->topDisplayedScene + i + this->count) % this->count; - if (scene == this->currentScene) { + scene = (this->topDisplayedEntry + i + this->count) % this->count; + if (scene == this->currentEntry) { GfxPrint_SetColor(printer, 255, 20, 20, 255); } else { GfxPrint_SetColor(printer, 200, 200, 55, 255); } - name = this->scenes[scene].name; + name = this->entries[scene].name; if (name == NULL) { name = "**Null**"; } @@ -692,9 +692,9 @@ void MapSelect_Init(GameState* thisx) { this->state.main = MapSelect_Main; this->state.destroy = MapSelect_Destroy; - this->scenes = sScenes; - this->topDisplayedScene = 0; - this->currentScene = 0; + this->entries = sMapSelectEntries; + this->topDisplayedEntry = 0; + this->currentEntry = 0; this->pageDownStops[0] = 0; // Hyrule Field this->pageDownStops[1] = 19; // Temple Of Time this->pageDownStops[2] = 37; // Treasure Chest Game @@ -704,7 +704,7 @@ void MapSelect_Init(GameState* thisx) { this->pageDownStops[6] = 91; // Escaping Ganon's Tower 3 this->pageDownIndex = 0; this->opt = 0; - this->count = ARRAY_COUNT(sScenes); + this->count = ARRAY_COUNT(sMapSelectEntries); View_Init(&this->view, this->state.gfxCtx); this->view.flags = (VIEW_PROJECTION_ORTHO | VIEW_VIEWPORT); this->verticalInputAccumulator = 0; @@ -716,8 +716,8 @@ void MapSelect_Init(GameState* thisx) { this->unk_234 = 0; if ((dREG(80) >= 0) && (dREG(80) < this->count)) { - this->currentScene = dREG(80); - this->topDisplayedScene = dREG(81); + this->currentEntry = dREG(80); + this->topDisplayedEntry = dREG(81); this->pageDownIndex = dREG(82); } From 2e4d7a11012bf90ac21086ec1a9cd23f54413e86 Mon Sep 17 00:00:00 2001 From: fig02 Date: Thu, 20 Feb 2025 07:50:13 -0500 Subject: [PATCH 2/2] Create headers for Game States (#2482) * make headers for gamestates * fixes * fixes 2 * bss --- include/console_logo_state.h | 28 +++ include/file_select_state.h | 97 +++++++++++ include/functions.h | 16 -- include/map_select_state.h | 41 +++++ include/prenmi_state.h | 16 ++ include/sample_state.h | 17 ++ include/setup_state.h | 13 ++ include/title_setup_state.h | 15 ++ include/z64.h | 164 ------------------ include/z64play.h | 20 ++- src/boot/z_std_dma.c | 2 +- src/code/fault_gc.c | 4 +- src/code/fault_n64.c | 2 +- src/code/graph.c | 8 + src/code/main.c | 4 +- src/code/title_setup.c | 3 + src/code/z_bgcheck.c | 2 +- src/code/z_camera.c | 6 +- src/code/z_collision_check.c | 2 +- src/code/z_common_data.c | 4 +- src/code/z_game_dlftbls.c | 7 + src/code/z_kaleido_scope_call.c | 2 +- src/code/z_message.c | 2 +- src/code/z_play.c | 4 +- src/code/z_prenmi.c | 2 + src/code/z_sample.c | 2 + src/code/z_sram.c | 1 + .../actors/ovl_Boss_Ganon2/z_boss_ganon2.c | 2 +- .../ovl_file_choose/z_file_choose.c | 2 + .../ovl_file_choose/z_file_copy_erase.c | 1 + .../ovl_file_choose/z_file_nameset.c | 1 + .../gamestates/ovl_opening/z_opening.c | 2 + src/overlays/gamestates/ovl_select/z_select.c | 3 + src/overlays/gamestates/ovl_title/z_title.c | 3 + .../misc/ovl_kaleido_scope/z_kaleido_scope.c | 1 + 35 files changed, 300 insertions(+), 199 deletions(-) create mode 100644 include/console_logo_state.h create mode 100644 include/file_select_state.h create mode 100644 include/map_select_state.h create mode 100644 include/prenmi_state.h create mode 100644 include/sample_state.h create mode 100644 include/setup_state.h create mode 100644 include/title_setup_state.h diff --git a/include/console_logo_state.h b/include/console_logo_state.h new file mode 100644 index 0000000000..56e8ece646 --- /dev/null +++ b/include/console_logo_state.h @@ -0,0 +1,28 @@ +#ifndef CONSOLE_LOGO_STATE_H +#define CONSOLE_LOGO_STATE_H + +#include "ultra64.h" +#include "z64game.h" +#include "z64view.h" +#include "z64sram.h" + +typedef struct ConsoleLogoState { + /* 0x0000 */ GameState state; + /* 0x00A4 */ u8* staticSegment; + /* 0x00A8 */ View view; + /* 0x01D0 */ SramContext sramCtx; + /* 0x01D4 */ s16 unk_1D4; + /* 0x01D6 */ s16 coverAlpha; + /* 0x01D8 */ s16 addAlpha; + /* 0x01DA */ s16 visibleDuration; + /* 0x01DC */ s16 ult; + /* 0x01DE */ s16 uls; + /* 0x01E0 */ u8 unk_1E0; + /* 0x01E1 */ u8 exit; + /* 0x01E2 */ char unk_1E2[0x06]; +} ConsoleLogoState; // size = 0x1E8 + +void ConsoleLogo_Init(GameState* thisx); +void ConsoleLogo_Destroy(GameState* thisx); + +#endif diff --git a/include/file_select_state.h b/include/file_select_state.h new file mode 100644 index 0000000000..9a2df3f08e --- /dev/null +++ b/include/file_select_state.h @@ -0,0 +1,97 @@ +#ifndef FILE_SELECT_STATE_H +#define FILE_SELECT_STATE_H + +#include "ultra64.h" +#include "z64game.h" +#include "z64view.h" +#include "z64sram.h" +#include "z64skybox.h" +#include "z64message.h" +#include "z64environment.h" + +typedef struct FileSelectState { + /* 0x00000 */ GameState state; + /* 0x000A4 */ Vtx* windowVtx; + /* 0x000A8 */ u8* staticSegment; + /* 0x000AC */ u8* parameterSegment; +#if OOT_PAL + /* 0x000B0 */ u8* objectMagSegment; +#endif + /* 0x000B8 */ View view; + /* 0x001E0 */ SramContext sramCtx; + /* 0x001E4 */ char unk_1E4[0x4]; + /* 0x001E8 */ SkyboxContext skyboxCtx; + /* 0x00348 */ MessageContext msgCtx; + /* 0x0E760 */ Font font; + /* 0x1C8E8 */ EnvironmentContext envCtx; + /* 0x1C9E4 */ char unk_1C9E4[0x4]; + /* 0x1C9E8 */ Vtx* windowContentVtx; + /* 0x1C9EC */ Vtx* keyboardVtx; + /* 0x1C9F0 */ Vtx* nameEntryVtx; + /* 0x1C9F4 */ u8 n64ddFlag; + /* 0x1C9F6 */ u16 deaths[3]; + /* 0x1C9FC */ u8 fileNames[3][8]; + /* 0x1CA14 */ u16 healthCapacities[3]; + /* 0x1CA1C */ u32 questItems[3]; + /* 0x1CA28 */ s16 n64ddFlags[3]; + /* 0x1CA2E */ s8 defense[3]; +#if OOT_PAL + /* 0x1CA32 */ u16 health[3]; +#endif + /* 0x1CA38 */ s16 buttonIndex; + /* 0x1CA3A */ s16 confirmButtonIndex; // 0: yes, 1: quit + /* 0x1CA3C */ s16 menuMode; + /* 0x1CA3E */ s16 configMode; + /* 0x1CA40 */ s16 prevConfigMode; + /* 0x1CA42 */ s16 nextConfigMode; + /* 0x1CA44 */ s16 selectMode; + /* 0x1CA46 */ s16 selectedFileIndex; + /* 0x1CA48 */ char unk_1CA48[0x2]; + /* 0x1CA4A */ s16 fileNamesY[3]; + /* 0x1CA50 */ s16 actionTimer; + /* 0x1CA52 */ s16 buttonYOffsets[6]; + /* 0x1CA5E */ s16 copyDestFileIndex; + /* 0x1CA60 */ s16 warningLabel; + /* 0x1CA62 */ s16 warningButtonIndex; + /* 0x1CA64 */ s16 titleLabel; + /* 0x1CA66 */ s16 nextTitleLabel; + /* 0x1CA68 */ s16 windowColor[3]; + /* 0x1CA6E */ s16 titleAlpha[2]; + /* 0x1CA72 */ s16 windowAlpha; + /* 0x1CA74 */ s16 fileButtonAlpha[3]; + /* 0x1CA7A */ s16 nameBoxAlpha[3]; + /* 0x1CA80 */ s16 nameAlpha[3]; + /* 0x1CA86 */ s16 connectorAlpha[3]; + /* 0x1CA8C */ s16 fileInfoAlpha[3]; + /* 0x1CA92 */ s16 actionButtonAlpha[4]; // also contains the alphas for the confirm buttons + /* 0x1CA9A */ s16 optionButtonAlpha; + /* 0x1CA9C */ s16 nameEntryBoxAlpha; + /* 0x1CA9E */ s16 controlsAlpha; + /* 0x1CAA0 */ s16 emptyFileTextAlpha; + /* 0x1CAA2 */ s16 highlightColor[4]; + /* 0x1CAAA */ s16 highlightPulseDir; // 0 fade out, 1 fade in + /* 0x1CAAC */ s16 unk_1CAAC; // initialized but never used + /* 0x1CAAE */ s16 confirmButtonTexIndices[2]; + /* 0x1CAB2 */ s16 inputTimerX; + /* 0x1CAB4 */ s16 inputTimerY; + /* 0x1CAB6 */ s16 stickXDir; + /* 0x1CAB8 */ s16 stickYDir; + /* 0x1CABA */ s16 stickAdjX; + /* 0x1CABC */ s16 stickAdjY; + /* 0x1CABE */ s16 nameEntryBoxPosX; + /* 0x1CAC0 */ s16 windowPosX; + /* 0x1CAC4 */ f32 windowRot; + /* 0x1CAC8 */ s16 kbdButton; // only for buttons, not characters + /* 0x1CACA */ s16 charPage; // 0: hiragana, 1: katakana, 2: alphabet + /* 0x1CACC */ s16 charBgAlpha; // square shape the letter sits in + /* 0x1CACE */ s16 charIndex; // 0 - 64, top left to bottom right + /* 0x1CAD0 */ s16 kbdX; // (0, 0) is top left character + /* 0x1CAD2 */ s16 kbdY; + /* 0x1CAD4 */ s16 newFileNameCharCount; + /* 0x1CAD6 */ s16 unk_1CAD6[5]; +} FileSelectState; // size = 0x1CAE0 + +void FileSelect_Init(GameState* thisx); +void FileSelect_Destroy(GameState* thisx); + +#endif diff --git a/include/functions.h b/include/functions.h index 71d747c7d7..45b60ca292 100644 --- a/include/functions.h +++ b/include/functions.h @@ -47,11 +47,6 @@ void PreNmiBuff_SetReset(PreNmiBuff* this); u32 PreNmiBuff_IsResetting(PreNmiBuff* this); void Sched_FlushTaskQueue(void); -void PreNMI_Init(GameState* thisx); - -void Sample_Destroy(GameState* thisx); -void Sample_Init(GameState* thisx); - void ViMode_LogPrint(OSViMode* osViMode); void ViMode_Configure(ViMode* viMode, s32 type, s32 tvType, s32 loRes, s32 antialiasOff, s32 modeN, s32 fb16Bit, s32 width, s32 height, s32 leftAdjust, s32 rightAdjust, s32 upperAdjust, s32 lowerAdjust); @@ -154,15 +149,4 @@ f32 absf(f32); void Regs_InitData(PlayState* play); -void Setup_Init(GameState* thisx); -void Setup_Destroy(GameState* thisx); -void ConsoleLogo_Init(GameState* thisx); -void ConsoleLogo_Destroy(GameState* thisx); -void MapSelect_Init(GameState* thisx); -void MapSelect_Destroy(GameState* thisx); -void TitleSetup_Init(GameState* thisx); -void TitleSetup_Destroy(GameState* thisx); -void FileSelect_Init(GameState* thisx); -void FileSelect_Destroy(GameState* thisx); - #endif diff --git a/include/map_select_state.h b/include/map_select_state.h new file mode 100644 index 0000000000..d2a6b43d19 --- /dev/null +++ b/include/map_select_state.h @@ -0,0 +1,41 @@ +#ifndef MAP_SELECT_STATE_H +#define MAP_SELECT_STATE_H + +#include "ultra64.h" +#include "z64game.h" +#include "z64view.h" + +struct MapSelectState; + +typedef struct MapSelectEntry { + /* 0x00 */ char* name; + /* 0x04 */ void (*loadFunc)(struct MapSelectState*, s32); + /* 0x08 */ s32 entranceIndex; +} MapSelectEntry; // size = 0xC + +typedef struct MapSelectState { + /* 0x0000 */ GameState state; + /* 0x00A8 */ View view; + /* 0x01D0 */ s32 count; + /* 0x01D4 */ MapSelectEntry* entries; + /* 0x01D8 */ s32 currentEntry; + /* 0x01DC */ s32 pageDownIndex; // Index of pageDownStops + /* 0x01E0 */ s32 pageDownStops[7]; + /* 0x01FC */ char unk_1FC[0x0C]; + /* 0x0208 */ s32 opt; + /* 0x020C */ s32 topDisplayedEntry; // The entry which is currently at the top of the screen + /* 0x0210 */ char unk_210[0x0C]; + /* 0x021C */ s32 verticalInputAccumulator; + /* 0x0220 */ s32 verticalInput; + /* 0x0224 */ s32 timerUp; + /* 0x0228 */ s32 timerDown; + /* 0x022C */ s32 lockUp; + /* 0x0230 */ s32 lockDown; + /* 0x0234 */ s32 unk_234; // unused + /* 0x0238 */ u8* staticSegment; +} MapSelectState; // size = 0x240 + +void MapSelect_Init(GameState* thisx); +void MapSelect_Destroy(GameState* thisx); + +#endif diff --git a/include/prenmi_state.h b/include/prenmi_state.h new file mode 100644 index 0000000000..3710425ca9 --- /dev/null +++ b/include/prenmi_state.h @@ -0,0 +1,16 @@ +#ifndef PRENMI_STATE_H +#define PRENMI_STATE_H + +#include "ultra64.h" +#include "z64game.h" + +typedef struct PreNMIState { + /* 0x00 */ GameState state; + /* 0xA4 */ u32 timer; + /* 0xA8 */ s32 unk_A8; +} PreNMIState; // size = 0xAC + +void PreNMI_Init(GameState* thisx); +void PreNMI_Destroy(GameState* thisx); + +#endif diff --git a/include/sample_state.h b/include/sample_state.h new file mode 100644 index 0000000000..b568a83f95 --- /dev/null +++ b/include/sample_state.h @@ -0,0 +1,17 @@ +#ifndef SAMPLE_STATE_H +#define SAMPLE_STATE_H + +#include "ultra64.h" +#include "z64game.h" +#include "z64view.h" + +typedef struct SampleState { + /* 0x0000 */ GameState state; + /* 0x00A4 */ u8* staticSegment; + /* 0x00A8 */ View view; +} SampleState; // size = 0x1D0 + +void Sample_Init(GameState* thisx); +void Sample_Destroy(GameState* thisx); + +#endif diff --git a/include/setup_state.h b/include/setup_state.h new file mode 100644 index 0000000000..863b71401e --- /dev/null +++ b/include/setup_state.h @@ -0,0 +1,13 @@ +#ifndef SETUP_STATE_H +#define SETUP_STATE_H + +#include "z64game.h" + +typedef struct SetupState { + /* 0x00 */ GameState state; +} SetupState; // size = 0xA4 + +void Setup_Init(GameState* thisx); +void Setup_Destroy(GameState* thisx); + +#endif diff --git a/include/title_setup_state.h b/include/title_setup_state.h new file mode 100644 index 0000000000..30219872a8 --- /dev/null +++ b/include/title_setup_state.h @@ -0,0 +1,15 @@ +#ifndef TITLE_SETUP_STATE_H +#define TITLE_SETUP_STATE_H + +#include "z64game.h" +#include "z64view.h" + +typedef struct TitleSetupState { + /* 0x0000 */ GameState state; + /* 0x00A8 */ View view; +} TitleSetupState; // size = 0x1D0 + +void TitleSetup_Init(GameState* thisx); +void TitleSetup_Destroy(GameState* thisx); + +#endif diff --git a/include/z64.h b/include/z64.h index 50d801603e..5963e7d240 100644 --- a/include/z64.h +++ b/include/z64.h @@ -58,164 +58,6 @@ #include "libc64/sprintf.h" #include "libu64/debug.h" -typedef struct SetupState { - /* 0x00 */ GameState state; -} SetupState; // size = 0xA4 - -typedef struct ConsoleLogoState { - /* 0x0000 */ GameState state; - /* 0x00A4 */ u8* staticSegment; - /* 0x00A8 */ View view; - /* 0x01D0 */ SramContext sramCtx; - /* 0x01D4 */ s16 unk_1D4; - /* 0x01D6 */ s16 coverAlpha; - /* 0x01D8 */ s16 addAlpha; - /* 0x01DA */ s16 visibleDuration; - /* 0x01DC */ s16 ult; - /* 0x01DE */ s16 uls; - /* 0x01E0 */ u8 unk_1E0; - /* 0x01E1 */ u8 exit; - /* 0x01E2 */ char unk_1E2[0x06]; -} ConsoleLogoState; // size = 0x1E8 - -struct MapSelectState; - -typedef struct MapSelectEntry { - /* 0x00 */ char* name; - /* 0x04 */ void (*loadFunc)(struct MapSelectState*, s32); - /* 0x08 */ s32 entranceIndex; -} MapSelectEntry; // size = 0xC - -typedef struct MapSelectState { - /* 0x0000 */ GameState state; - /* 0x00A8 */ View view; - /* 0x01D0 */ s32 count; - /* 0x01D4 */ MapSelectEntry* entries; - /* 0x01D8 */ s32 currentEntry; - /* 0x01DC */ s32 pageDownIndex; // Index of pageDownStops - /* 0x01E0 */ s32 pageDownStops[7]; - /* 0x01FC */ char unk_1FC[0x0C]; - /* 0x0208 */ s32 opt; - /* 0x020C */ s32 topDisplayedEntry; // The entry which is currently at the top of the screen - /* 0x0210 */ char unk_210[0x0C]; - /* 0x021C */ s32 verticalInputAccumulator; - /* 0x0220 */ s32 verticalInput; - /* 0x0224 */ s32 timerUp; - /* 0x0228 */ s32 timerDown; - /* 0x022C */ s32 lockUp; - /* 0x0230 */ s32 lockDown; - /* 0x0234 */ s32 unk_234; // unused - /* 0x0238 */ u8* staticSegment; -} MapSelectState; // size = 0x240 - -typedef struct SampleState { - /* 0x0000 */ GameState state; - /* 0x00A4 */ u8* staticSegment; - /* 0x00A8 */ View view; -} SampleState; // size = 0x1D0 - -typedef enum PauseBgPreRenderState { - /* 0 */ PAUSE_BG_PRERENDER_OFF, // Inactive, do nothing. - /* 1 */ PAUSE_BG_PRERENDER_SETUP, // The current frame is only drawn for the purpose of serving as the pause background. - /* 2 */ PAUSE_BG_PRERENDER_PROCESS, // The previous frame was PAUSE_BG_PRERENDER_SETUP, now apply prerender filters. - /* 3 */ PAUSE_BG_PRERENDER_READY, // The pause background is ready to be used. - /* 4 */ PAUSE_BG_PRERENDER_MAX -} PauseBgPreRenderState; - -typedef enum TransitionTileState { - /* 0 */ TRANS_TILE_OFF, // Inactive, do nothing - /* 1 */ TRANS_TILE_SETUP, // Save the necessary buffers - /* 2 */ TRANS_TILE_PROCESS, // Initialize the transition - /* 3 */ TRANS_TILE_READY // The transition is ready, so will update and draw each frame -} TransitionTileState; - -typedef struct TitleSetupState { - /* 0x0000 */ GameState state; - /* 0x00A8 */ View view; -} TitleSetupState; // size = 0x1D0 - -typedef struct FileSelectState { - /* 0x00000 */ GameState state; - /* 0x000A4 */ Vtx* windowVtx; - /* 0x000A8 */ u8* staticSegment; - /* 0x000AC */ u8* parameterSegment; -#if OOT_PAL - /* 0x000B0 */ u8* objectMagSegment; -#endif - /* 0x000B8 */ View view; - /* 0x001E0 */ SramContext sramCtx; - /* 0x001E4 */ char unk_1E4[0x4]; - /* 0x001E8 */ SkyboxContext skyboxCtx; - /* 0x00348 */ MessageContext msgCtx; - /* 0x0E760 */ Font font; - /* 0x1C8E8 */ EnvironmentContext envCtx; - /* 0x1C9E4 */ char unk_1C9E4[0x4]; - /* 0x1C9E8 */ Vtx* windowContentVtx; - /* 0x1C9EC */ Vtx* keyboardVtx; - /* 0x1C9F0 */ Vtx* nameEntryVtx; - /* 0x1C9F4 */ u8 n64ddFlag; - /* 0x1C9F6 */ u16 deaths[3]; - /* 0x1C9FC */ u8 fileNames[3][8]; - /* 0x1CA14 */ u16 healthCapacities[3]; - /* 0x1CA1C */ u32 questItems[3]; - /* 0x1CA28 */ s16 n64ddFlags[3]; - /* 0x1CA2E */ s8 defense[3]; -#if OOT_PAL - /* 0x1CA32 */ u16 health[3]; -#endif - /* 0x1CA38 */ s16 buttonIndex; - /* 0x1CA3A */ s16 confirmButtonIndex; // 0: yes, 1: quit - /* 0x1CA3C */ s16 menuMode; - /* 0x1CA3E */ s16 configMode; - /* 0x1CA40 */ s16 prevConfigMode; - /* 0x1CA42 */ s16 nextConfigMode; - /* 0x1CA44 */ s16 selectMode; - /* 0x1CA46 */ s16 selectedFileIndex; - /* 0x1CA48 */ char unk_1CA48[0x2]; - /* 0x1CA4A */ s16 fileNamesY[3]; - /* 0x1CA50 */ s16 actionTimer; - /* 0x1CA52 */ s16 buttonYOffsets[6]; - /* 0x1CA5E */ s16 copyDestFileIndex; - /* 0x1CA60 */ s16 warningLabel; - /* 0x1CA62 */ s16 warningButtonIndex; - /* 0x1CA64 */ s16 titleLabel; - /* 0x1CA66 */ s16 nextTitleLabel; - /* 0x1CA68 */ s16 windowColor[3]; - /* 0x1CA6E */ s16 titleAlpha[2]; - /* 0x1CA72 */ s16 windowAlpha; - /* 0x1CA74 */ s16 fileButtonAlpha[3]; - /* 0x1CA7A */ s16 nameBoxAlpha[3]; - /* 0x1CA80 */ s16 nameAlpha[3]; - /* 0x1CA86 */ s16 connectorAlpha[3]; - /* 0x1CA8C */ s16 fileInfoAlpha[3]; - /* 0x1CA92 */ s16 actionButtonAlpha[4]; // also contains the alphas for the confirm buttons - /* 0x1CA9A */ s16 optionButtonAlpha; - /* 0x1CA9C */ s16 nameEntryBoxAlpha; - /* 0x1CA9E */ s16 controlsAlpha; - /* 0x1CAA0 */ s16 emptyFileTextAlpha; - /* 0x1CAA2 */ s16 highlightColor[4]; - /* 0x1CAAA */ s16 highlightPulseDir; // 0 fade out, 1 fade in - /* 0x1CAAC */ s16 unk_1CAAC; // initialized but never used - /* 0x1CAAE */ s16 confirmButtonTexIndices[2]; - /* 0x1CAB2 */ s16 inputTimerX; - /* 0x1CAB4 */ s16 inputTimerY; - /* 0x1CAB6 */ s16 stickXDir; - /* 0x1CAB8 */ s16 stickYDir; - /* 0x1CABA */ s16 stickAdjX; - /* 0x1CABC */ s16 stickAdjY; - /* 0x1CABE */ s16 nameEntryBoxPosX; - /* 0x1CAC0 */ s16 windowPosX; - /* 0x1CAC4 */ f32 windowRot; - /* 0x1CAC8 */ s16 kbdButton; // only for buttons, not characters - /* 0x1CACA */ s16 charPage; // 0: hiragana, 1: katakana, 2: alphabet - /* 0x1CACC */ s16 charBgAlpha; // square shape the letter sits in - /* 0x1CACE */ s16 charIndex; // 0 - 64, top left to bottom right - /* 0x1CAD0 */ s16 kbdX; // (0, 0) is top left character - /* 0x1CAD2 */ s16 kbdY; - /* 0x1CAD4 */ s16 newFileNameCharCount; - /* 0x1CAD6 */ s16 unk_1CAD6[5]; -} FileSelectState; // size = 0x1CAE0 - typedef struct GameStateOverlay { /* 0x00 */ void* loadedRamAddr; /* 0x04 */ RomFile file; // if applicable @@ -230,12 +72,6 @@ typedef struct GameStateOverlay { /* 0x2C */ u32 instanceSize; } GameStateOverlay; // size = 0x30 -typedef struct PreNMIState { - /* 0x00 */ GameState state; - /* 0xA4 */ u32 timer; - /* 0xA8 */ UNK_TYPE4 unk_A8; -} PreNMIState; // size = 0xAC - typedef struct ISVDbg { /* 0x00 */ u32 magic; // IS64 /* 0x04 */ u32 get; diff --git a/include/z64play.h b/include/z64play.h index a0f5346e4b..4ca9e0b024 100644 --- a/include/z64play.h +++ b/include/z64play.h @@ -31,6 +31,21 @@ struct Player; struct QuestHintCmd; struct VisMono; +typedef enum PauseBgPreRenderState { + /* 0 */ PAUSE_BG_PRERENDER_OFF, // Inactive, do nothing. + /* 1 */ PAUSE_BG_PRERENDER_SETUP, // The current frame is only drawn for the purpose of serving as the pause background. + /* 2 */ PAUSE_BG_PRERENDER_PROCESS, // The previous frame was PAUSE_BG_PRERENDER_SETUP, now apply prerender filters. + /* 3 */ PAUSE_BG_PRERENDER_READY, // The pause background is ready to be used. + /* 4 */ PAUSE_BG_PRERENDER_MAX +} PauseBgPreRenderState; + +typedef enum TransitionTileState { + /* 0 */ TRANS_TILE_OFF, // Inactive, do nothing + /* 1 */ TRANS_TILE_SETUP, // Save the necessary buffers + /* 2 */ TRANS_TILE_PROCESS, // Initialize the transition + /* 3 */ TRANS_TILE_READY // The transition is ready, so will update and draw each frame +} TransitionTileState; + typedef struct SceneSequences { /* 0x00 */ u8 seqId; /* 0x01 */ u8 natureAmbienceId; @@ -125,8 +140,6 @@ void Play_SetViewpoint(PlayState* this, s16 viewpoint); s32 Play_CheckViewpoint(PlayState* this, s16 viewpoint); void Play_SetShopBrowsingViewpoint(PlayState* this); Gfx* Play_SetFog(PlayState* this, Gfx* gfx); -void Play_Destroy(GameState* thisx); -void Play_Init(GameState* thisx); void Play_Main(GameState* thisx); int Play_InCsMode(PlayState* this); f32 func_800BFCB8(PlayState* this, MtxF* mf, Vec3f* pos); @@ -154,6 +167,9 @@ int Play_CamIsNotFixed(PlayState* this); s32 func_800C0D34(PlayState* this, Actor* actor, s16* yaw); s32 func_800C0DB4(PlayState* this, Vec3f* pos); +void Play_Init(GameState* thisx); +void Play_Destroy(GameState* thisx); + #if DEBUG_FEATURES extern void* gDebugCutsceneScript; #endif diff --git a/src/boot/z_std_dma.c b/src/boot/z_std_dma.c index 2d611fb0a7..8a11c1baf4 100644 --- a/src/boot/z_std_dma.c +++ b/src/boot/z_std_dma.c @@ -33,7 +33,7 @@ #include "global.h" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ntsc-1.2:20 pal-1.0:18 pal-1.1:18" + "ntsc-1.2:46 pal-1.0:44 pal-1.1:44" StackEntry sDmaMgrStackInfo; OSMesgQueue sDmaMgrMsgQueue; diff --git a/src/code/fault_gc.c b/src/code/fault_gc.c index a8597a60be..45d2d01b82 100644 --- a/src/code/fault_gc.c +++ b/src/code/fault_gc.c @@ -40,8 +40,8 @@ * DPad-Up may be pressed to enable sending fault pages over osSyncPrintf as well as displaying them on-screen. * DPad-Down disables sending fault pages over osSyncPrintf. */ -#pragma increment_block_number "gc-eu:96 gc-eu-mq:96 gc-eu-mq-dbg:96 gc-jp:112 gc-jp-ce:112 gc-jp-mq:112 gc-us:112" \ - "gc-us-mq:112 ique-cn:112" +#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-eu-mq-dbg:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128" \ + "gc-us-mq:128 ique-cn:128" #include "global.h" #include "libc64/sleep.h" diff --git a/src/code/fault_n64.c b/src/code/fault_n64.c index ecfc87f10f..bb9559f128 100644 --- a/src/code/fault_n64.c +++ b/src/code/fault_n64.c @@ -13,7 +13,7 @@ #include "macros.h" #include "global.h" -#pragma increment_block_number "ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128" +#pragma increment_block_number "ntsc-1.0:160 ntsc-1.1:160 ntsc-1.2:160 pal-1.0:160 pal-1.1:160" typedef struct FaultMgr { OSThread thread; diff --git a/src/code/graph.c b/src/code/graph.c index 650b7dd2ef..36749697f2 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -1,16 +1,24 @@ #include "libc64/malloc.h" #include "libc64/sprintf.h" #include "libu64/debug.h" + +#include "console_logo_state.h" #include "buffers.h" #include "gfx.h" #include "fault.h" +#include "file_select_state.h" #include "line_numbers.h" +#include "map_select_state.h" +#include "prenmi_state.h" #include "regs.h" +#include "setup_state.h" #include "sys_ucode.h" +#include "title_setup_state.h" #include "terminal.h" #include "ucode_disas.h" #include "versions.h" #include "z64save.h" +#include "z64play.h" #include "macros.h" #include "global.h" diff --git a/src/code/main.c b/src/code/main.c index f930625013..cbc4677e7f 100644 --- a/src/code/main.c +++ b/src/code/main.c @@ -27,8 +27,8 @@ extern struct IrqMgr gIrqMgr; #include "global.h" -#pragma increment_block_number "gc-eu:96 gc-eu-mq:96 gc-jp:96 gc-jp-ce:96 gc-jp-mq:96 gc-us:96 gc-us-mq:96 ique-cn:96" \ - "ntsc-1.0:79 ntsc-1.1:79 ntsc-1.2:79 pal-1.0:77 pal-1.1:77" +#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ + "ique-cn:128 ntsc-1.0:104 ntsc-1.1:104 ntsc-1.2:104 pal-1.0:102 pal-1.1:102" extern u8 _buffersSegmentEnd[]; diff --git a/src/code/title_setup.c b/src/code/title_setup.c index fcc6eaa239..8234a562b7 100644 --- a/src/code/title_setup.c +++ b/src/code/title_setup.c @@ -1,4 +1,7 @@ +#include "setup_state.h" + #include "global.h" +#include "console_logo_state.h" void Setup_InitImpl(SetupState* this) { PRINTF(T("ゼルダ共通データ初期化\n", "Zelda common data initialization\n")); diff --git a/src/code/z_bgcheck.c b/src/code/z_bgcheck.c index c5d22fd6a2..e0f8454f79 100644 --- a/src/code/z_bgcheck.c +++ b/src/code/z_bgcheck.c @@ -11,7 +11,7 @@ #include "z64player.h" #include "z64skin_matrix.h" -#pragma increment_block_number "ntsc-1.0:184 ntsc-1.1:184 ntsc-1.2:184" +#pragma increment_block_number "ntsc-1.0:180 ntsc-1.1:180 ntsc-1.2:180" u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList* nodeList); void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* sector); diff --git a/src/code/z_camera.c b/src/code/z_camera.c index a5a18c29c4..8b4b32762f 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -7,8 +7,8 @@ #include "z64save.h" #include "overlays/actors/ovl_En_Horse/z_en_horse.h" -#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \ - "ique-cn:192 ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192" +#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ique-cn:0" \ + "ntsc-1.0:0 ntsc-1.1:0 ntsc-1.2:0 pal-1.0:0 pal-1.1:0" s16 Camera_RequestSettingImpl(Camera* camera, s16 requestedSetting, s16 flags); s32 Camera_RequestModeImpl(Camera* camera, s16 requestedMode, u8 forceModeChange); @@ -3642,7 +3642,7 @@ s32 Camera_KeepOn3(Camera* camera) { } #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ique-cn:128 ntsc-1.0:118 ntsc-1.1:118 ntsc-1.2:118 pal-1.0:116 pal-1.1:116" + "ique-cn:128 ntsc-1.0:79 ntsc-1.1:79 ntsc-1.2:79 pal-1.0:77 pal-1.1:77" s32 Camera_KeepOn4(Camera* camera) { static Vec3f D_8015BD50; diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index 5564b7ef36..c342ddf156 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -15,7 +15,7 @@ #include "overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h" #include "z_lib.h" -#pragma increment_block_number "ique-cn:0 ntsc-1.0:232 ntsc-1.1:232 ntsc-1.2:232 pal-1.0:232 pal-1.1:232" +#pragma increment_block_number "ique-cn:0 ntsc-1.0:224 ntsc-1.1:224 ntsc-1.2:224 pal-1.0:224 pal-1.1:224" typedef s32 (*ColChkResetFunc)(PlayState*, Collider*); typedef void (*ColChkApplyFunc)(PlayState*, CollisionCheckContext*, Collider*); diff --git a/src/code/z_common_data.c b/src/code/z_common_data.c index a8193c3af6..a7f1e7c793 100644 --- a/src/code/z_common_data.c +++ b/src/code/z_common_data.c @@ -7,8 +7,8 @@ #include "global.h" -#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.0:176" \ - "ntsc-1.1:176 ntsc-1.2:176 pal-1.0:192 pal-1.1:192" +#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64 gc-us-mq:64" \ + "ntsc-1.0:176 ntsc-1.1:176 ntsc-1.2:176 pal-1.0:192 pal-1.1:192" ALIGNED(16) SaveContext gSaveContext; #if PLATFORM_IQUE diff --git a/src/code/z_game_dlftbls.c b/src/code/z_game_dlftbls.c index 2cad84089d..95969c2914 100644 --- a/src/code/z_game_dlftbls.c +++ b/src/code/z_game_dlftbls.c @@ -1,3 +1,10 @@ +#include "setup_state.h" +#include "map_select_state.h" +#include "console_logo_state.h" +#include "z64play.h" +#include "title_setup_state.h" +#include "file_select_state.h" + #include "global.h" // Linker symbol declarations (used in the table below) diff --git a/src/code/z_kaleido_scope_call.c b/src/code/z_kaleido_scope_call.c index f1017342a8..50470ab02a 100644 --- a/src/code/z_kaleido_scope_call.c +++ b/src/code/z_kaleido_scope_call.c @@ -1,5 +1,5 @@ #pragma increment_block_number "gc-eu:160 gc-eu-mq:160 gc-jp:160 gc-jp-ce:160 gc-jp-mq:160 gc-us:160 gc-us-mq:160" \ - "ique-cn:160 ntsc-1.0:160 ntsc-1.1:160 ntsc-1.2:160 pal-1.0:160 pal-1.1:160" + "ique-cn:160 ntsc-1.0:192 ntsc-1.1:192 ntsc-1.2:192 pal-1.0:192 pal-1.1:192" #include "libu64/debug.h" #include "kaleido_manager.h" diff --git a/src/code/z_message.c b/src/code/z_message.c index 01ecf6f0c2..5c5a513715 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -24,7 +24,7 @@ #include "assets/textures/parameter_static/parameter_static.h" #pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ntsc-1.0:144 ntsc-1.1:144 ntsc-1.2:144 pal-1.0:128 pal-1.1:128" + "ntsc-1.0:160 ntsc-1.1:160 ntsc-1.2:160 pal-1.0:128 pal-1.1:128" #if !PLATFORM_IQUE #define MSG_BUF_DECODED (msgCtx->msgBufDecoded) diff --git a/src/code/z_play.c b/src/code/z_play.c index 1e47fab380..4657281a5f 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -2,6 +2,7 @@ #include "buffers.h" #include "controller.h" #include "fault.h" +#include "file_select_state.h" #include "gfx.h" #include "gfxalloc.h" #include "kaleido_manager.h" @@ -20,6 +21,7 @@ #include "sys_math3d.h" #include "sys_matrix.h" #include "terminal.h" +#include "title_setup_state.h" #include "versions.h" #include "zelda_arena.h" #include "z64cutscene_flags.h" @@ -34,7 +36,7 @@ #include "global.h" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ique-cn:192 ntsc-1.0:96 ntsc-1.1:96 ntsc-1.2:96 pal-1.0:96 pal-1.1:96" + "ique-cn:192 ntsc-1.0:112 ntsc-1.1:112 ntsc-1.2:112 pal-1.0:112 pal-1.1:112" TransitionTile gTransitionTile; s32 gTransitionTileState; diff --git a/src/code/z_prenmi.c b/src/code/z_prenmi.c index e1bb151453..34712be91a 100644 --- a/src/code/z_prenmi.c +++ b/src/code/z_prenmi.c @@ -1,3 +1,5 @@ +#include "prenmi_state.h" + #include "global.h" #include "terminal.h" #include "versions.h" diff --git a/src/code/z_sample.c b/src/code/z_sample.c index 541771432b..6a5b865294 100644 --- a/src/code/z_sample.c +++ b/src/code/z_sample.c @@ -1,3 +1,5 @@ +#include "sample_state.h" + #include "global.h" void Sample_HandleStateChange(SampleState* this) { diff --git a/src/code/z_sram.c b/src/code/z_sram.c index c78c7ae253..2f6a3b5dc3 100644 --- a/src/code/z_sram.c +++ b/src/code/z_sram.c @@ -1,3 +1,4 @@ +#include "file_select_state.h" #include "global.h" #include "terminal.h" #include "versions.h" diff --git a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index 3bf7e4b96f..f0e1656fa0 100644 --- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -29,7 +29,7 @@ #include "assets/overlays/ovl_Boss_Ganon2/ovl_Boss_Ganon2.h" #pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \ - "ique-cn:128" + "ique-cn:128 ntsc-1.0:128 ntsc-1.1:128 ntsc-1.2:128 pal-1.0:128 pal-1.1:128" #define FLAGS \ (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_UPDATE_CULLING_DISABLED | \ diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/src/overlays/gamestates/ovl_file_choose/z_file_choose.c index 09f9eafc5a..8388bd537d 100644 --- a/src/overlays/gamestates/ovl_file_choose/z_file_choose.c +++ b/src/overlays/gamestates/ovl_file_choose/z_file_choose.c @@ -1,3 +1,4 @@ +#include "file_select_state.h" #include "file_select.h" #include "attributes.h" @@ -5,6 +6,7 @@ #include "gfx_setupdl.h" #include "letterbox.h" #include "macros.h" +#include "map_select_state.h" #if PLATFORM_N64 #include "n64dd.h" #endif diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c b/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c index 4479689ede..5386630662 100644 --- a/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c +++ b/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.c @@ -1,3 +1,4 @@ +#include "file_select_state.h" #include "file_select.h" #include "controller.h" diff --git a/src/overlays/gamestates/ovl_file_choose/z_file_nameset.c b/src/overlays/gamestates/ovl_file_choose/z_file_nameset.c index b1b22c074e..9418e67d01 100644 --- a/src/overlays/gamestates/ovl_file_choose/z_file_nameset.c +++ b/src/overlays/gamestates/ovl_file_choose/z_file_nameset.c @@ -1,3 +1,4 @@ +#include "file_select_state.h" #include "file_select.h" #include "controller.h" diff --git a/src/overlays/gamestates/ovl_opening/z_opening.c b/src/overlays/gamestates/ovl_opening/z_opening.c index 69931c93a1..bcda61ce87 100644 --- a/src/overlays/gamestates/ovl_opening/z_opening.c +++ b/src/overlays/gamestates/ovl_opening/z_opening.c @@ -4,6 +4,8 @@ * Description: Initializes the game into the title screen */ +#include "title_setup_state.h" + #include "global.h" #include "z64save.h" #include "z64sram.h" diff --git a/src/overlays/gamestates/ovl_select/z_select.c b/src/overlays/gamestates/ovl_select/z_select.c index 016c44ad16..fea717fb71 100644 --- a/src/overlays/gamestates/ovl_select/z_select.c +++ b/src/overlays/gamestates/ovl_select/z_select.c @@ -4,8 +4,11 @@ * Description: Debug Scene Select Menu */ +#include "map_select_state.h" + #include "ultra64.h" #include "alloca.h" +#include "console_logo_state.h" #if PLATFORM_N64 #include "n64dd.h" #endif diff --git a/src/overlays/gamestates/ovl_title/z_title.c b/src/overlays/gamestates/ovl_title/z_title.c index fde3d01806..727d49a339 100644 --- a/src/overlays/gamestates/ovl_title/z_title.c +++ b/src/overlays/gamestates/ovl_title/z_title.c @@ -4,8 +4,11 @@ * Description: Displays the Nintendo Logo */ +#include "console_logo_state.h" + #include "global.h" #include "alloca.h" +#include "title_setup_state.h" #include "versions.h" #if PLATFORM_N64 diff --git a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c index eac990ce51..6dee212069 100644 --- a/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c +++ b/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope.c @@ -4,6 +4,7 @@ #endif #include "seqcmd.h" #include "terminal.h" +#include "title_setup_state.h" #include "versions.h" #include "z64save.h"