File Select (1 Non-Matching) (#1158)

* Everything below Main OK,
and some small ones at the top

* 3 more short ones

* FileChoose_Main

* SelectModeUpdate/Draw

* SelectMode update functions done

* 2 more small ones

* ConfigModeDraw

* SetWindowVtx

* FileChoose_FadeInMenuElements

* Rest of the Config Mode Update Functions

* Minor cleanup

* FileChoose_UpdateMainMenu

* Make xml for title_static

* Minor correction

* One nasty draw, thanks Synray

Co-Authored-By: Synray <31429825+Synray@users.noreply.github.com>

* import data

* some cleanup

* import OoT docs

* missed some docs

* some progress

* FileSelect_SetWindowContentVtx WIP

* improve FileSelect_SetWindowContentVtx

* match z_file_nameset_NES

* cleanup and docs

* title static

* a few more functions

* even more functions

* small cleanup

* Data Cleanup

* 2 more matches

* z_file_choose_80807940 OK

* cleanup

* fix merge master

* FileSelect_DrawFileInfo wip

* small cleanup

* minor

* fix merge

* match FileSelect_DrawFileInfo

* cleanup

* fix merge

* fix merge

* sram cleanup

* document select mode

* many docs

* more docs

* more cleanup

* small nitpick

* consistency

* more cleanup

* more cleanup

* small

* small typos

* octal bad

* pr review

* noop

* elliptic review

* more review

* non-matching

* oops

* more suggestions

* keyboard formatting

* fix master

* sound

* padding

---------

Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com>
Co-authored-by: Synray <31429825+Synray@users.noreply.github.com>
This commit is contained in:
engineer124
2023-06-05 15:03:02 -04:00
committed by GitHub
co-authored by Elliptic Ellipsis Synray
parent cd53dd317f
commit 8cabbb1a2b
38 changed files with 5951 additions and 792 deletions
+126
View File
@@ -0,0 +1,126 @@
<Root>
<File Name="title_static" Segment="1">
<Texture Name="gFileSelNoFileToCopyENGTex" OutName="no_file_to_copy_eng" Format="ia8" Width="128" Height="16" Offset="0x0"/>
<Texture Name="gFileSelNoFileToEraseENGTex" OutName="no_file_to_erase_eng" Format="ia8" Width="128" Height="16" Offset="0x800"/>
<Texture Name="gFileSelNoEmptyFileENGTex" OutName="no_empty_file_eng" Format="ia8" Width="128" Height="16" Offset="0x1000"/>
<Texture Name="gFileSelFileEmptyENGTex" OutName="file_empty_eng" Format="ia8" Width="128" Height="16" Offset="0x1800"/>
<Texture Name="gFileSelFileInUseENGTex" OutName="file_in_use_eng" Format="ia8" Width="128" Height="16" Offset="0x2000"/>
<Texture Name="gFileSelConnectorTex" OutName="connector" Format="ia8" Width="24" Height="16" Offset="0x2800"/>
<Texture Name="gFileSelCopyWhichFileENGTex" OutName="copy_which_file_eng" Format="ia8" Width="128" Height="16" Offset="0x2980"/>
<Texture Name="gFileSelCopyToWhichFileENGTex" OutName="copy_to_which_file_eng" Format="ia8" Width="128" Height="16" Offset="0x3180"/>
<Texture Name="gFileSelAreYouSureCopyENGTex" OutName="are_you_sure_copy_eng" Format="ia8" Width="128" Height="16" Offset="0x3980"/>
<Texture Name="gFileSelFileCopiedENGTex" OutName="file_copied_eng" Format="ia8" Width="128" Height="16" Offset="0x4180"/>
<Texture Name="gFileSelPleaseSelectAFileENGTex" OutName="please_select_a_file_eng" Format="ia8" Width="128" Height="16" Offset="0x4980"/>
<Texture Name="gFileSelOpenThisFileENGTex" OutName="open_this_file_eng" Format="ia8" Width="128" Height="16" Offset="0x5180"/>
<Texture Name="gFileSelEraseWhichFileENGTex" OutName="erase_which_file_eng" Format="ia8" Width="128" Height="16" Offset="0x5980"/>
<Texture Name="gFileSelAreYouSureEraseENGTex" OutName="are_you_sure_erase_eng" Format="ia8" Width="128" Height="16" Offset="0x6180"/>
<Texture Name="gFileSelFileErasedENGTex" OutName="file_erased_eng" Format="ia8" Width="128" Height="16" Offset="0x6980"/>
<Texture Name="gFileSelOptionsENGTex" OutName="options_eng" Format="ia8" Width="128" Height="16" Offset="0x7180"/>
<Texture Name="gFileSelNameENGTex" OutName="name_eng" Format="ia8" Width="56" Height="16" Offset="0x7980"/>
<Texture Name="gFileSelSurroundENGTex" OutName="surround_eng" Format="ia8" Width="48" Height="16" Offset="0x7D00"/>
<Texture Name="gFileSelHeadsetENGTex" OutName="headset_eng" Format="ia8" Width="48" Height="16" Offset="0x8000"/>
<Texture Name="gFileSelMonoENGTex" OutName="mono_eng" Format="ia8" Width="48" Height="16" Offset="0x8300"/>
<Texture Name="gFileSelSoundENGTex" OutName="sound_eng" Format="ia8" Width="64" Height="16" Offset="0x8600"/>
<Texture Name="gFileSelStereoENGTex" OutName="stereo_eng" Format="ia8" Width="48" Height="16" Offset="0x8A00"/>
<Texture Name="gFileSelTargetingENGTex" OutName="targeting_eng" Format="ia8" Width="64" Height="16" Offset="0x8D00"/>
<Texture Name="gFileSelSwitchENGTex" OutName="switch_eng" Format="ia8" Width="48" Height="16" Offset="0x9100"/>
<Texture Name="gFileSelHoldENGTex" OutName="hold_eng" Format="ia8" Width="48" Height="16" Offset="0x9400"/>
<Texture Name="gFileSelCheckBrightnessENGTex" OutName="check_brightness_eng" Format="ia8" Width="96" Height="16" Offset="0x9700"/>
<Texture Name="gFileSelDolbySurroundLogoENGTex" OutName="dolby_surround_logo_eng" Format="i8" Width="48" Height="17" Offset="0x9D00"/>
<Texture Name="gFileSelDecideCancelENGTex" OutName="decide_cancel_eng" Format="ia8" Width="144" Height="16" Offset="0xA030"/>
<Texture Name="gFileSelDecideSaveENGTex" OutName="decide_save_eng" Format="ia8" Width="152" Height="16" Offset="0xA930"/>
<Texture Name="gFileSelPleaseWaitENGTex" OutName="please_wait_eng" Format="ia8" Width="144" Height="16" Offset="0xB2B0"/>
<Texture Name="gFileSelWindow00Tex" OutName="window_00" Format="ia16" Width="64" Height="32" Offset="0xBBB0"/>
<Texture Name="gFileSelWindow01Tex" OutName="window_01" Format="ia16" Width="64" Height="32" Offset="0xCBB0"/>
<Texture Name="gFileSelWindow02Tex" OutName="window_02" Format="ia16" Width="64" Height="32" Offset="0xDBB0"/>
<Texture Name="gFileSelWindow03Tex" OutName="window_03" Format="ia16" Width="48" Height="32" Offset="0xEBB0"/>
<Texture Name="gFileSelWindow10Tex" OutName="window_10" Format="ia16" Width="64" Height="32" Offset="0xF7B0"/>
<Texture Name="gFileSelWindow11Tex" OutName="window_11" Format="ia16" Width="64" Height="32" Offset="0x107B0"/>
<Texture Name="gFileSelWindow12Tex" OutName="window_12" Format="ia16" Width="64" Height="32" Offset="0x117B0"/>
<Texture Name="gFileSelWindow13Tex" OutName="window_13" Format="ia16" Width="48" Height="32" Offset="0x127B0"/>
<Texture Name="gFileSelWindow20Tex" OutName="window_20" Format="ia16" Width="64" Height="32" Offset="0x133B0"/>
<Texture Name="gFileSelWindow21Tex" OutName="window_21" Format="ia16" Width="64" Height="32" Offset="0x143B0"/>
<Texture Name="gFileSelWindow22Tex" OutName="window_22" Format="ia16" Width="64" Height="32" Offset="0x153B0"/>
<Texture Name="gFileSelWindow23Tex" OutName="window_23" Format="ia16" Width="48" Height="32" Offset="0x163B0"/>
<Texture Name="gFileSelWindow30Tex" OutName="window_30" Format="ia16" Width="64" Height="32" Offset="0x16FB0"/>
<Texture Name="gFileSelWindow31Tex" OutName="window_31" Format="ia16" Width="64" Height="32" Offset="0x17FB0"/>
<Texture Name="gFileSelWindow32Tex" OutName="window_32" Format="ia16" Width="64" Height="32" Offset="0x18FB0"/>
<Texture Name="gFileSelWindow33Tex" OutName="window_33" Format="ia16" Width="48" Height="32" Offset="0x19FB0"/>
<Texture Name="gFileSelWindow40Tex" OutName="window_40" Format="ia16" Width="64" Height="32" Offset="0x1ABB0"/>
<Texture Name="gFileSelWindow41Tex" OutName="window_41" Format="ia16" Width="64" Height="32" Offset="0x1BBB0"/>
<Texture Name="gFileSelWindow42Tex" OutName="window_42" Format="ia16" Width="64" Height="32" Offset="0x1CBB0"/>
<Texture Name="gFileSelWindow43Tex" OutName="window_43" Format="ia16" Width="48" Height="32" Offset="0x1DBB0"/>
<Texture Name="gFileSelCopyButtonENGTex" OutName="copy_button_eng" Format="ia16" Width="64" Height="16" Offset="0x1E7B0"/>
<Texture Name="gFileSelFile1ButtonENGTex" OutName="file_1_button_eng" Format="ia16" Width="64" Height="16" Offset="0x1EFB0"/>
<Texture Name="gFileSelFile2ButtonENGTex" OutName="file_2_button_eng" Format="ia16" Width="64" Height="16" Offset="0x1F7B0"/>
<Texture Name="gFileSelFile3ButtonENGTex" OutName="file_3_button_eng" Format="ia16" Width="64" Height="16" Offset="0x1FFB0"/>
<Texture Name="gFileSelYesButtonENGTex" OutName="yes_button_eng" Format="ia16" Width="64" Height="16" Offset="0x207B0"/>
<Texture Name="gFileSelEraseButtonENGTex" OutName="erase_button_eng" Format="ia16" Width="64" Height="16" Offset="0x20FB0"/>
<Texture Name="gFileSelENDButtonENGTex" OutName="end_button_eng" Format="ia16" Width="44" Height="16" Offset="0x217B0"/>
<Texture Name="gFileSelBackspaceButtonTex" OutName="backspace_button" Format="ia16" Width="28" Height="16" Offset="0x21D30"/>
<Texture Name="gFileSelFileNameBoxTex" OutName="file_name_box" Format="ia16" Width="108" Height="16" Offset="0x220B0"/>
<Texture Name="gFileSelFileInfoBox0Tex" OutName="file_info_box_0" Format="ia16" Width="36" Height="56" Offset="0x22E30"/>
<Texture Name="gFileSelFileInfoBox1Tex" OutName="file_info_box_1" Format="ia16" Width="36" Height="56" Offset="0x23DF0"/>
<Texture Name="gFileSelFileInfoBox2Tex" OutName="file_info_box_2" Format="ia16" Width="36" Height="56" Offset="0x24DB0"/>
<Texture Name="gFileSelFileInfoBox3Tex" OutName="file_info_box_3" Format="ia16" Width="36" Height="56" Offset="0x25D70"/>
<Texture Name="gFileSelFileInfoBox4Tex" OutName="file_info_box_4" Format="ia16" Width="24" Height="56" Offset="0x26D30"/>
<Texture Name="gFileSelOptionsButtonENGTex" OutName="options_button_eng" Format="ia16" Width="64" Height="16" Offset="0x277B0"/>
<Texture Name="gFileSelQuitButtonENGTex" OutName="quit_button_eng" Format="ia16" Width="64" Height="16" Offset="0x27FB0"/>
<!-- Extension for owl save information -->
<Texture Name="gFileSelFileExtraInfoBox0Tex" OutName="file_extra_info_box_0" Format="ia16" Width="28" Height="56" Offset="0x287B0"/>
<Texture Name="gFileSelFileExtraInfoBox1Tex" OutName="file_extra_info_box_1" Format="ia16" Width="28" Height="56" Offset="0x293F0"/>
<!-- Used for closed owl save file -->
<Texture Name="gFileSelBlankButtonTex" OutName="file_blank_button" Format="ia16" Width="52" Height="16" Offset="0x2A030"/>
<Texture Name="gFileSelOptionsDividerTex" OutName="options_divider" Format="ia4" Width="256" Height="2" Offset="0x2A6B0"/>
<Texture Name="gFileSelBrightnessCheckTex" OutName="brightness_check" Format="ia4" Width="96" Height="16" Offset="0x2A7B0"/>
<Texture Name="gFileSelBigButtonHighlightTex" OutName="big_button_highlight" Format="i8" Width="72" Height="24" Offset="0x2AAB0"/>
<Texture Name="gFileSelCharHighlightTex" OutName="char_highlight" Format="i8" Width="24" Height="24" Offset="0x2B170"/>
<Texture Name="gFileSelMediumButtonHighlightTex" OutName="medium_button_highlight" Format="i8" Width="56" Height="24" Offset="0x2B3B0"/>
<Texture Name="gFileSelSmallButtonHighlightTex" OutName="small_button_highlight" Format="i8" Width="40" Height="24" Offset="0x2B8F0"/>
<!-- Boss remains textures -->
<Texture Name="gFileSelOdolwasRemainsTex" OutName="odolwas_remains" Format="rgba32" Width="32" Height="32" Offset="0x2BCB0"/>
<Texture Name="gFileSelGohtsRemainsTex" OutName="gohts_remains" Format="rgba32" Width="32" Height="32" Offset="0x2CCB0"/>
<Texture Name="gFileSelGyorgsRemainsTex" OutName="gyorgs_remains" Format="rgba32" Width="32" Height="32" Offset="0x2DCB0"/>
<Texture Name="gFileSelTwinmoldsRemainsTex" OutName="twinmolds_remains" Format="rgba32" Width="32" Height="32" Offset="0x2ECB0"/>
<Texture Name="gFileSelOwlSaveIconTex" OutName="owl_save_icon" Format="rgba32" Width="24" Height="12" Offset="0x2FCB0"/>
<Texture Name="gFileSelFirstDayENGTex" OutName="first_day_eng" Format="i4" Width="48" Height="24" Offset="0x30130"/>
<Texture Name="gFileSelSecondDayENGTex" OutName="second_day_eng" Format="i4" Width="48" Height="24" Offset="0x30370"/>
<Texture Name="gFileSelFinalDayENGTex" OutName="final_day_eng" Format="i4" Width="48" Height="24" Offset="0x305B0"/>
<Texture Name="gFileSelSaveXJPNTex" OutName="save_x_jpn" Format="i4" Width="32" Height="16" Offset="0x307F0"/>
<Texture Name="gFileSelMASKSENGTex" OutName="masks_eng" Format="i4" Width="64" Height="16" Offset="0x308F0"/>
<Texture Name="gFileSel0QuarterHeartENGTex" OutName="0_quarter_heart" Format="ia8" Width="24" Height="16" Offset="0x30AF0"/>
<Texture Name="gFileSel1QuarterHeartENGTex" OutName="1_quarter_heart" Format="ia8" Width="24" Height="16" Offset="0x30C70"/>
<Texture Name="gFileSel2QuarterHeartENGTex" OutName="2_quarter_heart" Format="ia8" Width="24" Height="16" Offset="0x30DF0"/>
<Texture Name="gFileSel3QuarterHeartENGTex" OutName="3_quarter_heart" Format="ia8" Width="24" Height="16" Offset="0x30F70"/>
<Texture Name="gFileSelRupeeTex" OutName="rupee" Format="ia8" Width="16" Height="16" Offset="0x310F0"/>
<DList Name="gFileSelWindow1DL" Offset="0x311F0"/>
<DList Name="gFileSelWindow2DL" Offset="0x31408"/>
<DList Name="gFileSelWindow3DL" Offset="0x31618"/>
</File>
</Root>
+19
View File
@@ -0,0 +1,19 @@
<Root>
<File Name="ovl_file_choose" BaseAddress="0x80804010" RangeStart="0xFDE0" RangeEnd="0x101E0">
<Array Name="D_80813DF0" Count="20" Offset="0xFDE0" Static="Off">
<Vtx/>
</Array>
<Array Name="D_80813F30" Count="32" Offset="0xFF20" Static="Off">
<Vtx/>
</Array>
<Array Name="gOptionsDividerTopVtx" Count="4" Offset="0x10120" Static="Off">
<Vtx/>
</Array>
<Array Name="gOptionsDividerMiddleVtx" Count="4" Offset="0x10160" Static="Off">
<Vtx/>
</Array>
<Array Name="gOptionsDividerBottomVtx" Count="4" Offset="0x101A0" Static="Off">
<Vtx/>
</Array>
</File>
</Root>
+2 -1
View File
@@ -2218,7 +2218,8 @@ s32 SysFlashrom_IsBusy(void);
s32 SysFlashrom_AwaitResult(void);
void SysFlashrom_WriteDataSync(void* addr, u32 pageNum, u32 pageCount);
s32 func_80185F90(u32 param_1);
s32 func_80185F90(u32 arg0);
u32 osFlashGetAddr(u32 pageNum);
OSPiHandle* osFlashReInit(u8 latency, u8 pulse, u8 pageSize, u8 relDuration, u32 start);
void osFlashChange(u32 flashNum);
+23 -23
View File
@@ -273,45 +273,45 @@ typedef struct {
/* 0x00 */ u16 unk_0;
/* 0x02 */ u16 sceneTimeSpeed;
/* 0x04 */ Vec3f sunPos;
/* 0x10 */ u8 unk_10;
/* 0x11 */ u8 unk_11;
/* 0x10 */ u8 skybox1Index;
/* 0x11 */ u8 skybox2Index;
/* 0x12 */ u8 unk_12;
/* 0x13 */ u8 unk_13;
/* 0x13 */ u8 skyboxBlend;
/* 0x14 */ u8 unk_14;
/* 0x15 */ u8 skyboxDisabled;
/* 0x16 */ u8 sunMoonDisabled;
/* 0x17 */ u8 unk_17;
/* 0x18 */ u8 unk_18;
/* 0x19 */ u8 unk_19;
/* 0x1A */ u16 unk_1A;
/* 0x17 */ u8 skyboxConfig;
/* 0x18 */ u8 changeSkyboxNextConfig;
/* 0x19 */ u8 changeSkyboxState;
/* 0x1A */ u16 changeSkyboxTimer;
/* 0x1C */ u16 unk_1C;
/* 0x1E */ u8 unk_1E;
/* 0x1F */ u8 unk_1F;
/* 0x20 */ u8 unk_20;
/* 0x21 */ u8 unk_21;
/* 0x22 */ u16 unk_22;
/* 0x24 */ u16 unk_24;
/* 0x1E */ u8 lightMode;
/* 0x1F */ u8 lightConfig;
/* 0x20 */ u8 changeLightNextConfig;
/* 0x21 */ u8 changeLightEnabled;
/* 0x22 */ u16 changeLightTimer;
/* 0x24 */ u16 changeDuration;
/* 0x26 */ u8 unk_26;
/* 0x28 */ LightInfo dirLight1; // sun 1
/* 0x36 */ LightInfo unk_36; // sun 2
/* 0x44 */ s8 unk_44;
/* 0x48 */ DmaRequest unk_48;
/* 0x68 */ OSMesgQueue unk_68;
/* 0x80 */ OSMesg unk_80;
/* 0x84 */ f32 unk_84;
/* 0x88 */ f32 unk_88;
/* 0x44 */ s8 skyboxDmaState;
/* 0x48 */ DmaRequest dmaRequest;
/* 0x68 */ OSMesgQueue loadQueue;
/* 0x80 */ OSMesg loadMsg;
/* 0x84 */ f32 glareAlpha;
/* 0x88 */ f32 lensFlareAlphaScale;
/* 0x8C */ EnvLightSettings lightSettings;
/* 0xA8 */ f32 unk_A8;
/* 0xAC */ Vec3s windDir;
/* 0xB4 */ f32 windSpeed;
/* 0xB8 */ u8 numLightSettings;
/* 0xBC */ LightSettings* lightSettingsList;
/* 0xC0 */ u8 unk_C0;
/* 0xC1 */ u8 unk_C1;
/* 0xC2 */ u8 unk_C2;
/* 0xC0 */ u8 lightBlendEnabled;
/* 0xC1 */ u8 lightSetting;
/* 0xC2 */ u8 prevLightSetting;
/* 0xC3 */ u8 lightSettingOverride;
/* 0xC4 */ LightSettings unk_C4;
/* 0xDA */ u16 unk_DA;
/* 0xDA */ u16 lightBlendRateOverride;
/* 0xDC */ f32 lightBlend;
/* 0xE0 */ u8 unk_E0;
/* 0xE1 */ u8 unk_E1;
+33 -26
View File
@@ -10,6 +10,13 @@ struct GameState;
struct PlayState;
struct FileSelectState;
typedef enum {
/* 0 */ SAVE_AUDIO_STEREO,
/* 1 */ SAVE_AUDIO_MONO,
/* 2 */ SAVE_AUDIO_HEADSET,
/* 3 */ SAVE_AUDIO_SURROUND
} AudioOption;
// TODO: properly name DOWN, RETURN and TOP
typedef enum RespawnMode {
/* 0 */ RESPAWN_MODE_DOWN, // "RESTART_MODE_DOWN"
@@ -157,13 +164,13 @@ typedef enum {
#define PICTO_PHOTO_COMPRESSED_SIZE (PICTO_PHOTO_SIZE * 5 / 8)
typedef struct SramContext {
/* 0x00 */ u8* readBuff;
/* 0x04 */ u8 *saveBuf;
/* 0x00 */ u8* noFlashSaveBuf; // Never allocated memory
/* 0x04 */ u8* saveBuf;
/* 0x08 */ char unk_08[4];
/* 0x0C */ s16 status;
/* 0x10 */ u32 curPage;
/* 0x14 */ u32 numPages;
/* 0x18 */ OSTime unk_18;
/* 0x18 */ OSTime startWriteOsTime;
/* 0x20 */ s16 unk_20;
/* 0x22 */ s16 unk_22;
/* 0x24 */ s16 unk_24;
@@ -226,14 +233,14 @@ typedef struct CycleSceneFlags {
typedef struct SaveOptions {
/* 0x0 */ u16 optionId; // "option_id"
/* 0x2 */ u8 language; // "j_n"
/* 0x3 */ s8 audioSetting; // "s_sound"
/* 0x3 */ u8 audioSetting; // "s_sound"
/* 0x4 */ u8 languageSetting; // "language"
/* 0x5 */ u8 zTargetSetting; // "z_attention", 0: Switch; 1: Hold
} SaveOptions; // size = 0x6
typedef struct SavePlayerData {
/* 0x00 */ char newf[6]; // "newf" Will always be "ZELDA3 for a valid save
/* 0x06 */ u16 deaths; // "savect"
/* 0x06 */ u16 threeDayResetCount; // "savect"
/* 0x08 */ char playerName[8]; // "player_name"
/* 0x10 */ s16 healthCapacity; // "max_life"
/* 0x12 */ s16 health; // "now_life"
@@ -337,11 +344,11 @@ typedef struct SaveContext {
/* 0x3DB4 */ f32 entranceSpeed; // "player_wipe_speedF"
/* 0x3DB8 */ u16 entranceSound; // "player_wipe_door_SE"
/* 0x3DBA */ u8 unk_3DBA; // "player_wipe_item"
/* 0x3DBB */ u8 unk_3DBB; // "next_walk"
/* 0x3DBB */ u8 retainWeatherMode; // "next_walk"
/* 0x3DBC */ s16 dogParams; // OoT leftover. "dog_flag"
/* 0x3DBE */ u8 envHazardTextTriggerFlags; // "guide_status"
/* 0x3DBF */ u8 showTitleCard; // "name_display"
/* 0x3DC0 */ s16 unk_3DC0; // "shield_magic_timer"
/* 0x3DC0 */ s16 nayrusLoveTimer; // remnant of OoT, "shield_magic_timer"
/* 0x3DC2 */ u8 unk_3DC2; // "pad1"
/* 0x3DC8 */ OSTime postmanTimerStopOsTime; // The osTime when the timer stops for the postman minigame. "get_time"
/* 0x3DD0 */ u8 timerStates[TIMER_ID_MAX]; // See the `TimerState` enum. "event_fg"
@@ -374,13 +381,13 @@ typedef struct SaveContext {
/* 0x3F3A */ u16 minigameScore; // "yabusame_total"
/* 0x3F3C */ u16 minigameHiddenScore; // "yabusame_out_ct"
/* 0x3F3E */ u8 unk_3F3E; // "no_save"
/* 0x3F3F */ u8 unk_3F3F; // "flash_flag"
/* 0x3F3F */ u8 flashSaveAvailable; // "flash_flag"
/* 0x3F40 */ SaveOptions options;
/* 0x3F46 */ u16 unk_3F46; // "NottoriBgm"
/* 0x3F46 */ u16 forcedSeqId; // "NottoriBgm"
/* 0x3F48 */ u8 cutsceneTransitionControl; // "fade_go"
/* 0x3F4A */ u16 nextCutsceneIndex; // "next_daytime"
/* 0x3F4C */ u8 cutsceneTrigger; // "doukidemo"
/* 0x3F4D */ u8 unk_3F4D; // "Kenjya_no"
/* 0x3F4D */ u8 chamberCutsceneNum; // remnant of OoT "Kenjya_no"
/* 0x3F4E */ u16 nextDayTime; // "next_zelda_time"
/* 0x3F50 */ u8 transFadeDuration; // "fade_speed"
/* 0x3F51 */ u8 transWipeSpeed; // "wipe_speed" transition related
@@ -1575,28 +1582,28 @@ void Sram_InitDebugSave(void);
void Sram_ResetSaveFromMoonCrash(SramContext* sramCtx);
void Sram_OpenSave(struct FileSelectState* fileSelect, SramContext* sramCtx);
void func_8014546C(SramContext* sramCtx);
void func_801457CC(struct FileSelectState* fileSelect, SramContext* sramCtx);
void func_80146580(struct FileSelectState* fileSelect2, SramContext* sramCtx, s32 fileNum);
void func_80146628(struct FileSelectState* fileSelect2, SramContext* sramCtx);
void func_801457CC(struct GameState* gameState, SramContext* sramCtx);
void Sram_EraseSave(struct FileSelectState* fileSelect2, SramContext* sramCtx, s32 fileNum);
void Sram_CopySave(struct FileSelectState* fileSelect2, SramContext* sramCtx);
void Sram_InitSave(struct FileSelectState* fileSelect2, SramContext* sramCtx);
void func_80146DF8(SramContext* sramCtx);
void Sram_WriteSaveOptionsToBuffer(SramContext* sramCtx);
void Sram_InitSram(struct GameState* gameState, SramContext* sramCtx);
void Sram_Alloc(struct GameState* gameState, SramContext* sramCtx);
void Sram_SaveSpecialEnterClockTown(struct PlayState* play);
void Sram_SaveSpecialNewDay(struct PlayState* play);
void func_80147008(SramContext* sramCtx, u32 curPage, u32 numPages);
void func_80147020(SramContext* sramCtx);
void func_80147068(SramContext* sramCtx);
void func_80147138(SramContext* sramCtx, s32 curPage, s32 numPages);
void func_80147150(SramContext* sramCtx);
void func_80147198(SramContext* sramCtx);
void Sram_SetFlashPagesDefault(SramContext* sramCtx, u32 curPage, u32 numPages);
void Sram_StartWriteToFlashDefault(SramContext* sramCtx);
void Sram_UpdateWriteToFlashDefault(SramContext* sramCtx);
void Sram_SetFlashPagesOwlSave(SramContext* sramCtx, s32 curPage, s32 numPages);
void Sram_StartWriteToFlashOwlSave(SramContext* sramCtx);
void Sram_UpdateWriteToFlashOwlSave(SramContext* sramCtx);
extern s32 D_801C6798[];
extern u32 gSramSlotOffsets[];
extern u8 gAmmoItems[];
extern s32 D_801C67C8[];
extern s32 D_801C67F0[];
extern s32 D_801C6818[];
extern s32 D_801C6840[];
extern s32 D_801C6850[];
extern s32 gFlashSaveStartPages[];
extern s32 gFlashSaveNumPages[];
extern s32 gFlashSpecialSaveNumPages[];
extern s32 gFlashOwlSaveStartPages[];
extern s32 gFlashOwlSaveNumPages[];
#endif
+4 -2
View File
@@ -130,8 +130,8 @@ typedef struct {
/* 0x1 */ u8 data1;
/* 0x2 */ UNK_TYPE1 pad2[2];
/* 0x4 */ u8 skyboxId;
/* 0x5 */ u8 unk5;
/* 0x6 */ u8 unk6;
/* 0x5 */ u8 skyboxConfig;
/* 0x6 */ u8 envLightMode;
} SCmdSkyboxSettings; // size = 0x7
typedef struct {
@@ -719,6 +719,8 @@ typedef enum {
*/
#define ENTRANCE(scene, spawn) ((((ENTR_SCENE_##scene) & 0x7F) << 9) | (((spawn) & 0x1F) << 4))
#define ENTR_LOAD_OPENING -1
/*
* Entrances used in cutscene destination. Includes scene layer that's immediately applied to `nextCutsceneIndex` and removed.
* See `CutsceneScriptEntry.nextEntrance`
+9 -5
View File
@@ -664,12 +664,15 @@ endseg
beginseg
name "ovl_file_choose"
compress
include "build/src/overlays/gamestates/ovl_file_choose/z_file_nameset_data.o"
include "build/src/overlays/gamestates/ovl_file_choose/z_file_copy_erase.o"
include "build/src/overlays/gamestates/ovl_file_choose/z_file_nameset_NES.o"
include "build/src/overlays/gamestates/ovl_file_choose/z_file_choose_80807940.o"
include "build/src/overlays/gamestates/ovl_file_choose/z_file_choose_NES.o"
include "build/data/ovl_file_choose/ovl_file_choose.data.o"
include "build/data/ovl_file_choose/ovl_file_choose.bss.o"
include "build/data/ovl_file_choose/ovl_file_choose.reloc.o"
#ifdef NON_MATCHING
include "build/src/overlays/gamestates/ovl_file_choose/ovl_file_choose_reloc.o"
#else
include "build/data/ovl_file_choose/ovl_file_choose.reloc.o"
#endif
endseg
beginseg
@@ -8824,7 +8827,8 @@ beginseg
name "title_static"
compress
romalign 0x1000
include "build/baserom/title_static.o"
include "build/assets/misc/title_static/title_static.o"
number 1
endseg
beginseg
+1 -1
View File
@@ -2,7 +2,7 @@
#include "buffers.h"
#include "system_malloc.h"
#include "overlays/gamestates/ovl_daytelop/z_daytelop.h"
#include "overlays/gamestates/ovl_file_choose/z_file_choose.h"
#include "overlays/gamestates/ovl_file_choose/z_file_select.h"
#include "overlays/gamestates/ovl_opening/z_opening.h"
#include "overlays/gamestates/ovl_select/z_select.h"
#include "overlays/gamestates/ovl_title/z_title.h"
+3 -3
View File
@@ -8,10 +8,10 @@ void SaveContext_Init(void) {
gSaveContext.save.playerForm = 0;
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
gSaveContext.ambienceId = AMBIENCE_ID_DISABLED;
gSaveContext.unk_3F46 = NA_BGM_GENERAL_SFX;
gSaveContext.forcedSeqId = NA_BGM_GENERAL_SFX;
gSaveContext.nextCutsceneIndex = 0xFFEF;
gSaveContext.cutsceneTrigger = 0;
gSaveContext.unk_3F4D = 0;
gSaveContext.chamberCutsceneNum = 0;
gSaveContext.nextDayTime = 0xFFFF;
gSaveContext.skyboxTime = 0;
gSaveContext.dogIsLost = true;
@@ -19,6 +19,6 @@ void SaveContext_Init(void) {
gSaveContext.prevHudVisibility = HUD_VISIBILITY_ALL;
gSaveContext.options.language = 1;
gSaveContext.options.audioSetting = 0;
gSaveContext.options.audioSetting = SAVE_AUDIO_STEREO;
gSaveContext.options.zTargetSetting = 0;
}
+10 -11
View File
@@ -171,15 +171,15 @@ void CutsceneCmd_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdMisc* cmd) {
case CS_MISC_CLOUDY_SKY:
if (isFirstFrame) {
play->envCtx.unk_19 = 1;
play->envCtx.unk_17 = 1;
play->envCtx.unk_18 = 0;
play->envCtx.unk_1A = 0x3C;
play->envCtx.unk_21 = 1;
play->envCtx.unk_1F = 0;
play->envCtx.unk_20 = 1;
play->envCtx.unk_24 = 0x3C;
play->envCtx.unk_22 = play->envCtx.unk_24;
play->envCtx.changeSkyboxState = 1;
play->envCtx.skyboxConfig = 1;
play->envCtx.changeSkyboxNextConfig = 0;
play->envCtx.changeSkyboxTimer = 60;
play->envCtx.changeLightEnabled = true;
play->envCtx.lightConfig = 0;
play->envCtx.changeLightNextConfig = 1;
play->envCtx.changeDuration = 60;
play->envCtx.changeLightTimer = play->envCtx.changeDuration;
}
break;
@@ -327,8 +327,7 @@ void CutsceneCmd_Misc(PlayState* play, CutsceneContext* csCtx, CsCmdMisc* cmd) {
case CS_MISC_MOON_CRASH_SKYBOX:
if (isFirstFrame) {
// skyboxConfig
play->envCtx.unk_17 = 0xD;
play->envCtx.skyboxConfig = 0xD;
}
break;
+1 -1
View File
@@ -1,6 +1,6 @@
#include "global.h"
#include "overlays/gamestates/ovl_daytelop/z_daytelop.h"
#include "overlays/gamestates/ovl_file_choose/z_file_choose.h"
#include "overlays/gamestates/ovl_file_choose/z_file_select.h"
#include "overlays/gamestates/ovl_opening/z_opening.h"
#include "overlays/gamestates/ovl_select/z_select.h"
#include "overlays/gamestates/ovl_title/z_title.h"
+1 -1
View File
@@ -49,7 +49,7 @@ void GameOver_Update(PlayState* play) {
}
}
gSaveContext.unk_3DC0 = 2000;
gSaveContext.nayrusLoveTimer = 2000;
gSaveContext.save.saveInfo.playerData.tatlTimer = 0;
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
gSaveContext.ambienceId = AMBIENCE_ID_DISABLED;
+2 -2
View File
@@ -16,14 +16,14 @@ s16 sBeatingHeartsDDEnv[3];
s16 sHeartsDDPrim[2][3];
s16 sHeartsDDEnv[2][3];
TexturePtr sHeartTextures[] = {
static TexturePtr sHeartTextures[] = {
gHeartFullTex, gHeartQuarterTex, gHeartQuarterTex, gHeartQuarterTex,
gHeartQuarterTex, gHeartQuarterTex, gHeartHalfTex, gHeartHalfTex,
gHeartHalfTex, gHeartHalfTex, gHeartHalfTex, gHeartThreeQuarterTex,
gHeartThreeQuarterTex, gHeartThreeQuarterTex, gHeartThreeQuarterTex, gHeartThreeQuarterTex,
};
TexturePtr sHeartDDTextures[] = {
static TexturePtr sHeartDDTextures[] = {
gDefenseHeartFullTex, gDefenseHeartQuarterTex, gDefenseHeartQuarterTex,
gDefenseHeartQuarterTex, gDefenseHeartQuarterTex, gDefenseHeartQuarterTex,
gDefenseHeartHalfTex, gDefenseHeartHalfTex, gDefenseHeartHalfTex,
+1 -1
View File
@@ -147,7 +147,7 @@ s16 D_801BF97C = 255;
f32 D_801BF980 = 1.0f;
s32 D_801BF984 = 0;
Gfx sScreenFillSetupDL[] = {
static Gfx sScreenFillSetupDL[] = {
gsDPPipeSync(),
gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN |
G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH),
+6 -6
View File
@@ -7,7 +7,7 @@
#include "z64view.h"
#include "overlays/gamestates/ovl_daytelop/z_daytelop.h"
#include "overlays/gamestates/ovl_opening/z_opening.h"
#include "overlays/gamestates/ovl_file_choose/z_file_choose.h"
#include "overlays/gamestates/ovl_file_choose/z_file_select.h"
#include "overlays/kaleido_scope/ovl_kaleido_scope/z_kaleido_scope.h"
s32 gDbgCamEnabled = false;
@@ -1036,9 +1036,9 @@ void Play_UpdateMain(PlayState* this) {
if (this->sramCtx.status != 0) {
if (gSaveContext.save.isOwlSave) {
func_80147198(&this->sramCtx);
Sram_UpdateWriteToFlashOwlSave(&this->sramCtx);
} else {
func_80147068(&this->sramCtx);
Sram_UpdateWriteToFlashDefault(&this->sramCtx);
}
}
}
@@ -1272,8 +1272,8 @@ void Play_DrawMain(PlayState* this) {
if ((this->skyboxId != SKYBOX_NONE) && !this->envCtx.skyboxDisabled) {
if ((this->skyboxId == SKYBOX_NORMAL_SKY) || (this->skyboxId == SKYBOX_3)) {
Environment_UpdateSkybox(this->skyboxId, &this->envCtx, &this->skyboxCtx);
Skybox_Draw(&this->skyboxCtx, gfxCtx, this->skyboxId, this->envCtx.unk_13, this->view.eye.x,
this->view.eye.y, this->view.eye.z);
Skybox_Draw(&this->skyboxCtx, gfxCtx, this->skyboxId, this->envCtx.skyboxBlend,
this->view.eye.x, this->view.eye.y, this->view.eye.z);
} else if (!this->skyboxCtx.skyboxShouldDraw) {
Skybox_Draw(&this->skyboxCtx, gfxCtx, this->skyboxId, 0, this->view.eye.x, this->view.eye.y,
this->view.eye.z);
@@ -2217,7 +2217,7 @@ void Play_Init(GameState* thisx) {
if (((gSaveContext.gameMode != GAMEMODE_NORMAL) && (gSaveContext.gameMode != GAMEMODE_TITLE_SCREEN)) ||
(gSaveContext.save.cutsceneIndex >= 0xFFF0)) {
gSaveContext.unk_3DC0 = 0;
gSaveContext.nayrusLoveTimer = 0;
Magic_Reset(this);
gSaveContext.sceneLayer = (gSaveContext.save.cutsceneIndex & 0xF) + 1;
+2 -2
View File
@@ -365,8 +365,8 @@ void Scene_LoadAreaTextures(PlayState* play, s32 fileIndex) {
// SceneTableEntry Header Command 0x11: Skybox Settings
void Scene_CommandSkyboxSettings(PlayState* play, SceneCmd* cmd) {
play->skyboxId = cmd->skyboxSettings.skyboxId & 3;
play->envCtx.unk_17 = play->envCtx.unk_18 = cmd->skyboxSettings.unk5;
play->envCtx.unk_1E = cmd->skyboxSettings.unk6;
play->envCtx.skyboxConfig = play->envCtx.changeSkyboxNextConfig = cmd->skyboxSettings.skyboxConfig;
play->envCtx.lightMode = cmd->skyboxSettings.envLightMode;
Scene_LoadAreaTextures(play, cmd->skyboxSettings.data1);
}
+375 -242
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -239,7 +239,7 @@ void func_80143324(PlayState* play, SkyboxContext* skyboxCtx, s16 skyboxId) {
case SKYBOX_NORMAL_SKY:
osCreateMesgQueue(&skyboxCtx->loadQueue, &skyboxCtx->loadMsg, 1);
if (play->envCtx.unk_10 == 0) {
if (play->envCtx.skybox1Index == 0) {
// Send a DMA request for the clear sky texture
size = SEGMENT_ROM_SIZE(d2_fine_static);
@@ -256,7 +256,7 @@ void func_80143324(PlayState* play, SkyboxContext* skyboxCtx, s16 skyboxId) {
osRecvMesg(&skyboxCtx->loadQueue, NULL, OS_MESG_BLOCK);
osCreateMesgQueue(&skyboxCtx->loadQueue, &skyboxCtx->loadMsg, 1);
if (play->envCtx.unk_11 == 0) {
if (play->envCtx.skybox2Index == 0) {
// Send a DMA request for the clear sky texture
size = SEGMENT_ROM_SIZE(d2_fine_static);
@@ -74,8 +74,8 @@ void DmChar01_Init(Actor* thisx, PlayState* play) {
}
if (gSaveContext.sceneLayer == 0) {
play->envCtx.unk_1F = 5;
play->envCtx.unk_20 = 5;
play->envCtx.lightConfig = 5;
play->envCtx.changeLightNextConfig = 5;
}
this->unk_348 = 255.0f;
+4 -4
View File
@@ -1129,8 +1129,8 @@ void DmStk_Init(Actor* thisx, PlayState* play) {
Actor_SetScale(&this->actor, 0.01f);
if ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneLayer == 3) && (play->csCtx.scriptIndex > 0)) {
play->envCtx.unk_17 = 15;
play->envCtx.unk_18 = 15;
play->envCtx.skyboxConfig = 15;
play->envCtx.changeSkyboxNextConfig = 15;
}
}
@@ -1826,8 +1826,8 @@ void DmStk_Update(Actor* thisx, PlayState* play) {
}
if ((play->sceneId == SCENE_00KEIKOKU) && (gSaveContext.sceneLayer == 3) && (play->csCtx.scriptIndex > 0)) {
play->envCtx.unk_17 = 15;
play->envCtx.unk_18 = 15;
play->envCtx.skyboxConfig = 15;
play->envCtx.changeSkyboxNextConfig = 15;
}
}

Some files were not shown because too many files have changed in this diff Show More