mirror of
https://github.com/zeldaret/mm.git
synced 2026-09-08 03:16:42 -04:00
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:
+1
-1
@@ -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"
|
||||
|
||||
@@ -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
@@ -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,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"
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
@@ -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
@@ -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
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ void EnHoll_VisibleIdle(EnHoll* this, PlayState* play) {
|
||||
}
|
||||
} else if (this->type == EN_HOLL_TYPE_SCENE_CHANGER) {
|
||||
play->nextEntrance = play->setupExitList[EN_HOLL_GET_EXIT_LIST_INDEX(&this->actor)];
|
||||
gSaveContext.unk_3DBB = 1;
|
||||
gSaveContext.retainWeatherMode = true;
|
||||
Scene_SetExitFade(play);
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->unk_1878C(play);
|
||||
|
||||
@@ -78,8 +78,8 @@ void func_8089F014(EnViewer* this, PlayState* play, f32 arg2) {
|
||||
}
|
||||
play->envCtx.lightSettingOverride = 0;
|
||||
play->envCtx.unk_E0 = 2;
|
||||
play->envCtx.unk_C1 = this->actor.world.rot.x;
|
||||
play->envCtx.unk_C2 = this->actor.world.rot.z;
|
||||
play->envCtx.lightSetting = this->actor.world.rot.x;
|
||||
play->envCtx.prevLightSetting = this->actor.world.rot.z;
|
||||
play->envCtx.lightBlend = arg2;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ void func_8089F0A0(EnViewer* this, PlayState* play) {
|
||||
func_800FAAB4(
|
||||
play, SurfaceType_GetLightSettingIndex(&play->colCtx, player->actor.floorPoly, player->actor.floorBgId));
|
||||
play->envCtx.lightBlend = 1.0f;
|
||||
play->envCtx.unk_C2 = play->envCtx.unk_C1;
|
||||
play->envCtx.prevLightSetting = play->envCtx.lightSetting;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -99,8 +99,8 @@ void EnWeatherTag_Init(Actor* thisx, PlayState* play) {
|
||||
case WEATHERTAG_TYPE_UNK5:
|
||||
func_800BC154(play, &play->actorCtx, &this->actor, 7);
|
||||
play->skyboxId = SKYBOX_3;
|
||||
play->envCtx.unk_1F = 5;
|
||||
play->envCtx.unk_20 = 5;
|
||||
play->envCtx.lightConfig = 5;
|
||||
play->envCtx.changeLightNextConfig = 5;
|
||||
D_801F4E74 = 1.0f;
|
||||
EnWeatherTag_SetupAction(this, func_80966BF4);
|
||||
break;
|
||||
@@ -124,25 +124,26 @@ void EnWeatherTag_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
// matches but unused params is suspicious
|
||||
// called WeatherTag_CheckEnableWeatherEffect in OOT, that's where "weatherMode" came from
|
||||
u8 func_80966608(EnWeatherTag* this, PlayState* play, UNK_TYPE a3, UNK_TYPE a4, u8 new1F, u8 new20, u16 new24,
|
||||
u8 weatherMode) {
|
||||
u8 func_80966608(EnWeatherTag* this, PlayState* play, UNK_TYPE a3, UNK_TYPE a4, u8 lightConfig,
|
||||
u8 changeLightNextConfig, u16 changeDuration, u8 weatherMode) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
u8 returnVal = 0;
|
||||
|
||||
if (WEATHER_TAG_RANGE100(&this->actor) > Actor_WorldDistXZToActor(&player->actor, &this->actor)) {
|
||||
if (play->envCtx.unk_1F == play->envCtx.unk_20) {
|
||||
if (play->envCtx.lightConfig == play->envCtx.changeLightNextConfig) {
|
||||
D_801BDBB8 = 1;
|
||||
if (!(play->envCtx.unk_1E == 0) || ((play->envCtx.unk_1F != 1) && (play->envCtx.unk_21 == 0))) {
|
||||
if (!(play->envCtx.lightMode == 0) ||
|
||||
((play->envCtx.lightConfig != 1) && !play->envCtx.changeLightEnabled)) {
|
||||
|
||||
D_801BDBB8 = 0;
|
||||
if (gWeatherMode != weatherMode) {
|
||||
gWeatherMode = weatherMode;
|
||||
play->envCtx.unk_21 = 1;
|
||||
play->envCtx.unk_1F = new1F;
|
||||
play->envCtx.unk_20 = new20;
|
||||
D_801BDBB4 = new20;
|
||||
play->envCtx.unk_24 = new24;
|
||||
play->envCtx.unk_22 = play->envCtx.unk_24;
|
||||
play->envCtx.changeLightEnabled = true;
|
||||
play->envCtx.lightConfig = lightConfig;
|
||||
play->envCtx.changeLightNextConfig = changeLightNextConfig;
|
||||
D_801BDBB4 = changeLightNextConfig;
|
||||
play->envCtx.changeDuration = changeDuration;
|
||||
play->envCtx.changeLightTimer = play->envCtx.changeDuration;
|
||||
}
|
||||
returnVal = 1;
|
||||
}
|
||||
@@ -153,23 +154,25 @@ u8 func_80966608(EnWeatherTag* this, PlayState* play, UNK_TYPE a3, UNK_TYPE a4,
|
||||
|
||||
// again with the unused parameters
|
||||
// called WeatherTag_CheckRestoreWeather in OOT
|
||||
u8 func_80966758(EnWeatherTag* this, PlayState* play, UNK_TYPE a3, UNK_TYPE a4, u8 new1F, u8 new20, u16 new24) {
|
||||
u8 func_80966758(EnWeatherTag* this, PlayState* play, UNK_TYPE a3, UNK_TYPE a4, u8 lightConfig,
|
||||
u8 changeLightNextConfig, u16 changeDuration) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
u8 returnVal = 0;
|
||||
|
||||
if (WEATHER_TAG_RANGE100(&this->actor) < Actor_WorldDistXZToActor(&player->actor, &this->actor)) {
|
||||
if (play->envCtx.unk_1F == play->envCtx.unk_20) {
|
||||
if (play->envCtx.lightConfig == play->envCtx.changeLightNextConfig) {
|
||||
D_801BDBB8 = 1;
|
||||
if (!(play->envCtx.unk_1E == 0) || ((play->envCtx.unk_1F != 1) && (play->envCtx.unk_21 == 0))) {
|
||||
if (!(play->envCtx.lightMode == 0) ||
|
||||
((play->envCtx.lightConfig != 1) && !play->envCtx.changeLightEnabled)) {
|
||||
|
||||
D_801BDBB8 = 0;
|
||||
gWeatherMode = 0;
|
||||
play->envCtx.unk_21 = 1;
|
||||
play->envCtx.unk_1F = new1F;
|
||||
play->envCtx.unk_20 = new20;
|
||||
D_801BDBB4 = new20;
|
||||
play->envCtx.unk_24 = new24;
|
||||
play->envCtx.unk_22 = play->envCtx.unk_24;
|
||||
play->envCtx.changeLightEnabled = true;
|
||||
play->envCtx.lightConfig = lightConfig;
|
||||
play->envCtx.changeLightNextConfig = changeLightNextConfig;
|
||||
D_801BDBB4 = changeLightNextConfig;
|
||||
play->envCtx.changeDuration = changeDuration;
|
||||
play->envCtx.changeLightTimer = play->envCtx.changeDuration;
|
||||
returnVal = 1;
|
||||
}
|
||||
}
|
||||
@@ -240,7 +243,7 @@ void EnWeatherTag_Die(EnWeatherTag* this, PlayState* play) {
|
||||
// poisoned swamp: placed behind the water fall from ikana
|
||||
// this tag stops spawning after STT cleared?
|
||||
void func_80966B08(EnWeatherTag* this, PlayState* play) {
|
||||
if (func_80966608(this, play, 0, 0, play->envCtx.unk_1F, 5, 100, 2) || (gWeatherMode == 2)) {
|
||||
if (func_80966608(this, play, 0, 0, play->envCtx.lightConfig, 5, 100, 2) || (gWeatherMode == 2)) {
|
||||
play->skyboxId = SKYBOX_3;
|
||||
EnWeatherTag_SetupAction(this, func_80966D20);
|
||||
} else if (D_801F4E74 <= 0.01f) {
|
||||
@@ -253,7 +256,7 @@ void func_80966B08(EnWeatherTag* this, PlayState* play) {
|
||||
// WEATHERTAG_TYPE_UNK5: only one in ikana canyon, corner of cliff right outside of stone tower entrance
|
||||
// because it uses cutsecnes.. is this the clear ikana cutcsene?
|
||||
void func_80966BF4(EnWeatherTag* this, PlayState* play) {
|
||||
u8 newUnk20;
|
||||
u8 changeLightNextConfig;
|
||||
CsCmdActorCue* cue;
|
||||
|
||||
if (Cutscene_IsCueInChannel(play, CS_CMD_ACTOR_CUE_567)) {
|
||||
@@ -263,25 +266,25 @@ void func_80966BF4(EnWeatherTag* this, PlayState* play) {
|
||||
case 0:
|
||||
case 1:
|
||||
default:
|
||||
|
||||
newUnk20 = 0;
|
||||
changeLightNextConfig = 0;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
newUnk20 = 3;
|
||||
changeLightNextConfig = 3;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
newUnk20 = 4;
|
||||
changeLightNextConfig = 4;
|
||||
break;
|
||||
}
|
||||
|
||||
Math_SmoothStepToF(&D_801F4E74, 0.0f, 0.2f, 0.02f, 0.001f);
|
||||
|
||||
if (play->envCtx.unk_20 != newUnk20) {
|
||||
play->envCtx.unk_21 = 1;
|
||||
play->envCtx.unk_20 = newUnk20;
|
||||
play->envCtx.unk_24 = 100;
|
||||
play->envCtx.unk_22 = play->envCtx.unk_24;
|
||||
if (play->envCtx.changeLightNextConfig != changeLightNextConfig) {
|
||||
play->envCtx.changeLightEnabled = true;
|
||||
play->envCtx.changeLightNextConfig = changeLightNextConfig;
|
||||
play->envCtx.changeDuration = 100;
|
||||
play->envCtx.changeLightTimer = play->envCtx.changeDuration;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* Description: "Master" instance of grass for unit spawned by Obj_Grass_Unit
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_obj_grass.h"
|
||||
#include "overlays/actors/ovl_Obj_Grass_Carry/z_obj_grass_carry.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
@@ -5734,7 +5734,7 @@ void func_808354A4(PlayState* play, s32 arg1, s32 arg2) {
|
||||
gSaveContext.respawnFlag = -2;
|
||||
}
|
||||
|
||||
gSaveContext.unk_3DBB = 1;
|
||||
gSaveContext.retainWeatherMode = 1;
|
||||
Scene_SetExitFade(play);
|
||||
}
|
||||
|
||||
@@ -16454,7 +16454,7 @@ void func_8085269C(Player* this, PlayState* play) {
|
||||
(play->msgCtx.ocarinaMode == 0x18) || (play->msgCtx.ocarinaMode == 0x19)) {
|
||||
if (play->msgCtx.ocarinaMode == 0x16) {
|
||||
if (!func_8082DA90(play)) {
|
||||
if (gSaveContext.save.saveInfo.playerData.deaths == 1) {
|
||||
if (gSaveContext.save.saveInfo.playerData.threeDayResetCount == 1) {
|
||||
play->nextEntrance = ENTRANCE(CUTSCENE, 1);
|
||||
} else {
|
||||
play->nextEntrance = ENTRANCE(CUTSCENE, 0);
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
#ifndef Z64_FILE_CHOOSE_H
|
||||
#define Z64_FILE_CHOOSE_H
|
||||
|
||||
#include "global.h"
|
||||
|
||||
void FileSelect_Init(GameState* thisx);
|
||||
void FileSelect_Destroy(GameState* thisx);
|
||||
|
||||
typedef struct FileSelectState {
|
||||
/* 0x00000 */ GameState state;
|
||||
/* 0x000A4 */ Vtx* unk_A4;
|
||||
/* 0x000A8 */ u8* staticSegment;
|
||||
/* 0x000AC */ u8* parameterSegment;
|
||||
/* 0x000B0 */ u8* titleSegment;
|
||||
/* 0x000B8 */ View view;
|
||||
/* 0x00220 */ SramContext sramCtx;
|
||||
/* 0x00248 */ SkyboxContext skyboxCtx;
|
||||
/* 0x00470 */ MessageContext msgCtx;
|
||||
/* 0x12550 */ Font font;
|
||||
/* 0x242E0 */ EnvironmentContext envCtx;
|
||||
/* 0x243E0 */ Vtx* unk_243E0;
|
||||
/* 0x243E4 */ Vtx* unk_243E4;
|
||||
/* 0x243E8 */ u8 newf2[2][6];
|
||||
/* 0x243F4 */ u8 newf[2][6];
|
||||
/* 0x24400 */ UNK_TYPE1 unk_24400[0xC];
|
||||
/* 0x2440C */ u16 unk_2440C[2];
|
||||
/* 0x24410 */ u16 unk_24410[2];
|
||||
/* 0x24414 */ u8 unk_24414[2][8]; // playername
|
||||
/* 0x24424 */ u8 unk_24424[2][8]; // playername
|
||||
/* 0x24434 */ s16 healthCapacity[2];
|
||||
/* 0x24438 */ u16 unk_24438[2];
|
||||
/* 0x2443C */ s16 health[2];
|
||||
/* 0x24440 */ u16 unk_24440[2];
|
||||
/* 0x24444 */ u32 unk_24444[2];
|
||||
/* 0x2444C */ u32 unk_2444C[2];
|
||||
/* 0x24454 */ s8 unk_24454[2];
|
||||
/* 0x24456 */ u8 unk_24456[2];
|
||||
/* 0x24458 */ u16 unk_24458[2];
|
||||
/* 0x2445C */ u16 unk_2445C[2];
|
||||
/* 0x24460 */ s16 unk_24460[2];
|
||||
/* 0x24464 */ s16 unk_24464[2];
|
||||
/* 0x24468 */ u8 unk_24468[2];
|
||||
/* 0x2446A */ u8 unk_2446A[2];
|
||||
/* 0x2446C */ s16 rupees[2];
|
||||
/* 0x24470 */ s16 unk_24470[2];
|
||||
/* 0x24474 */ s8 unk_24474[2];
|
||||
/* 0x24476 */ s8 unk_24476[2];
|
||||
/* 0x24478 */ s8 maskCount[2];
|
||||
/* 0x2447A */ s8 unk_2447A[2];
|
||||
/* 0x2447C */ s8 heartPieceCount[2];
|
||||
/* 0x2447E */ s8 unk_2447E[2];
|
||||
/* 0x24480 */ s16 unk_24480;
|
||||
/* 0x24482 */ s16 unk_24482;
|
||||
/* 0x24484 */ s16 unk_24484;
|
||||
/* 0x24486 */ s16 unk_24486;
|
||||
/* 0x24488 */ s16 unk_24488;
|
||||
/* 0x2448A */ s16 unk_2448A;
|
||||
/* 0x2448C */ s16 unk_2448C;
|
||||
/* 0x2448E */ s16 unk_2448E;
|
||||
/* 0x24490 */ s16 unk_24490;
|
||||
/* 0x24492 */ s16 unk_24492[3];
|
||||
/* 0x24498 */ s16 unk_24498;
|
||||
/* 0x2449A */ s16 unk_2449A[6];
|
||||
/* 0x244A6 */ s16 fileNum;
|
||||
/* 0x244A8 */ s16 unk_244A8;
|
||||
/* 0x244AA */ s16 unk_244AA;
|
||||
/* 0x244AC */ s16 unk_244AC;
|
||||
/* 0x244AE */ s16 unk_244AE;
|
||||
/* 0x244B0 */ s16 unk_244B0[3];
|
||||
/* 0x244B6 */ s16 unk_244B6[2];
|
||||
/* 0x244BA */ s16 unk_244BA;
|
||||
/* 0x244BC */ s16 unk_244BC[3];
|
||||
/* 0x244C2 */ s16 unk_244C2[3];
|
||||
/* 0x244C8 */ s16 unk_244C8[3];
|
||||
/* 0x244CE */ s16 unk_244CE[3];
|
||||
/* 0x244D4 */ s16 unk_244D4[3];
|
||||
/* 0x244DA */ s16 unk_244DA[4];
|
||||
/* 0x244E2 */ s16 unk_244E2;
|
||||
/* 0x244E4 */ s16 unk_244E4;
|
||||
/* 0x244E6 */ s16 unk_244E6;
|
||||
/* 0x244E8 */ s16 unk_244E8;
|
||||
/* 0x244EA */ s16 unk_244EA[4];
|
||||
/* 0x244F2 */ s16 unk_244F2;
|
||||
/* 0x244F4 */ s16 unk_244F4;
|
||||
/* 0x244F6 */ s16 unk_244F6[2];
|
||||
/* 0x244FA */ s16 unk_244FA;
|
||||
/* 0x244FC */ s16 unk_244FC;
|
||||
/* 0x244FE */ s16 unk_244FE;
|
||||
/* 0x24500 */ s16 unk_24500;
|
||||
/* 0x24502 */ s16 unk_24502;
|
||||
/* 0x24504 */ s16 unk_24504;
|
||||
/* 0x24506 */ s16 unk_24506;
|
||||
/* 0x24508 */ s16 unk_24508;
|
||||
/* 0x2450A */ s16 unk_2450A;
|
||||
/* 0x2450C */ f32 unk_2450C;
|
||||
/* 0x24510 */ s16 unk_24510;
|
||||
/* 0x24512 */ s16 unk_24512;
|
||||
/* 0x24514 */ s16 unk_24514;
|
||||
/* 0x24516 */ s16 unk_24516;
|
||||
/* 0x24518 */ s16 unk_24518;
|
||||
/* 0x2451A */ s16 unk_2451A;
|
||||
/* 0x2451C */ s16 unk_2451C;
|
||||
/* 0x2451E */ s16 unk_2451E[5];
|
||||
/* 0x24528 */ s16 unk_24528;
|
||||
/* 0x2452A */ s16 unk_2452A;
|
||||
/* 0x2452C */ s16 unk_2452C[4];
|
||||
/* 0x24534 */ s16 unk_24534[4];
|
||||
/* 0x2453C */ s16 unk_2453C[4];
|
||||
/* 0x24544 */ s16 unk_24544[4];
|
||||
/* 0x2454C */ s16 unk_2454C;
|
||||
/* 0x2454E */ s16 unk_2454E;
|
||||
/* 0x24550 */ s16 unk_24550;
|
||||
} FileSelectState; // size = 0x24558
|
||||
|
||||
#endif
|
||||
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* File: z_file_choose_80807940.c
|
||||
* Overlay: ovl_file_choose
|
||||
* Description:
|
||||
*/
|
||||
|
||||
#include "z_file_choose.h"
|
||||
#include "z64rumble.h"
|
||||
|
||||
extern UNK_TYPE D_01002800;
|
||||
extern UNK_TYPE D_01007980;
|
||||
extern UNK_TYPE D_0102A6B0;
|
||||
extern UNK_TYPE D_0102B170;
|
||||
extern UNK_TYPE D_010310F0;
|
||||
extern UNK_TYPE D_010311F0;
|
||||
|
||||
// there are uses of D_0E000000.fillRect (appearing as D_0E0002E0) in this file
|
||||
extern GfxMasterList D_0E000000;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_80807940.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_80807A78.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_80807C58.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_80808214.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_80808D30.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_80808F1C.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_80809DF0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_80809EA0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_8080A3CC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_8080A418.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_8080A4A0.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_8080A6BC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_8080A708.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_file_choose/func_8080BBFC.s")
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,17 @@
|
||||
#include "z_file_select.h"
|
||||
|
||||
// Vtx Data
|
||||
#include "overlays/ovl_file_choose/ovl_file_choose.c"
|
||||
|
||||
u8 D_808141F0[] = {
|
||||
// 'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M'
|
||||
/* Row 0 */ 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16,
|
||||
// 'N' 'O' 'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z'
|
||||
/* Row 1 */ 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23,
|
||||
// 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm'
|
||||
/* Row 2 */ 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30,
|
||||
// 'n' 'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z'
|
||||
/* Row 3 */ 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D,
|
||||
// '1' '2' '3' '4' '5' '6' '7' '8' '9' '0' '.' '-' ' '
|
||||
/* Row 4 */ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x00, 0x40, 0x3F, 0x3E
|
||||
};
|
||||
@@ -0,0 +1,327 @@
|
||||
#ifndef FILE_SELECT_H
|
||||
#define FILE_SELECT_H
|
||||
|
||||
#include "global.h"
|
||||
|
||||
// `sramCtx->noFlashSaveBuf` is never allocated space, so should never be used
|
||||
// Slot offsets are also based on OoT SaveContext sizes, and contains incorrect sizes from MM
|
||||
// Macros appear to be remnant from OoT
|
||||
#define NO_FLASH_GET_NEWF(sramCtx, slotNum, index) \
|
||||
(sramCtx->noFlashSaveBuf[gSramSlotOffsets[slotNum] + offsetof(SaveContext, save.saveInfo.playerData.newf[index])])
|
||||
#define NO_FLASH_SLOT_OCCUPIED(sramCtx, slotNum) \
|
||||
((NO_FLASH_GET_NEWF(sramCtx, slotNum, 0) == 'Z') || (NO_FLASH_GET_NEWF(sramCtx, slotNum, 1) == 'E') || \
|
||||
(NO_FLASH_GET_NEWF(sramCtx, slotNum, 2) == 'L') || (NO_FLASH_GET_NEWF(sramCtx, slotNum, 3) == 'D') || \
|
||||
(NO_FLASH_GET_NEWF(sramCtx, slotNum, 4) == 'A') || (NO_FLASH_GET_NEWF(sramCtx, slotNum, 5) == '3'))
|
||||
|
||||
#define GET_NEWF(fileSelect, slotNum, index) (fileSelect->newf[slotNum][index])
|
||||
#define SLOT_OCCUPIED(fileSelect, slotNum) \
|
||||
((GET_NEWF(fileSelect, slotNum, 0) == 'Z') && (GET_NEWF(fileSelect, slotNum, 1) == 'E') && \
|
||||
(GET_NEWF(fileSelect, slotNum, 2) == 'L') && (GET_NEWF(fileSelect, slotNum, 3) == 'D') && \
|
||||
(GET_NEWF(fileSelect, slotNum, 4) == 'A') && (GET_NEWF(fileSelect, slotNum, 5) == '3'))
|
||||
|
||||
// Init mode: Initial setup as the file select is starting up, fades and slides in various menu elements
|
||||
// Config mode: Handles the bulk of the file select, various configuration tasks like picking a file, copy/erase, and the options menu
|
||||
// Select mode: Displays the selected file with various details about it, and allows the player to confirm and open it
|
||||
typedef enum {
|
||||
/* 0 */ FS_MENU_MODE_INIT,
|
||||
/* 1 */ FS_MENU_MODE_CONFIG,
|
||||
/* 2 */ FS_MENU_MODE_SELECT
|
||||
} MenuMode;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ CM_FADE_IN_START,
|
||||
/* 0x01 */ CM_FADE_IN_END,
|
||||
/* 0x02 */ CM_MAIN_MENU,
|
||||
/* 0x03 */ CM_SETUP_COPY_SOURCE,
|
||||
/* 0x04 */ CM_SELECT_COPY_SOURCE,
|
||||
/* 0x05 */ CM_SETUP_COPY_DEST_1,
|
||||
/* 0x06 */ CM_SETUP_COPY_DEST_2,
|
||||
/* 0x07 */ CM_SELECT_COPY_DEST,
|
||||
/* 0x08 */ CM_EXIT_TO_COPY_SOURCE_1,
|
||||
/* 0x09 */ CM_EXIT_TO_COPY_SOURCE_2,
|
||||
/* 0x0A */ CM_SETUP_COPY_CONFIRM_1,
|
||||
/* 0x0B */ CM_SETUP_COPY_CONFIRM_2,
|
||||
/* 0x0C */ CM_COPY_CONFIRM,
|
||||
/* 0x0D */ CM_COPY_WAIT_FOR_FLASH_SAVE,
|
||||
/* 0x0E */ CM_RETURN_TO_COPY_DEST,
|
||||
/* 0x0F */ CM_COPY_ANIM_1,
|
||||
/* 0x10 */ CM_COPY_ANIM_2,
|
||||
/* 0x11 */ CM_COPY_ANIM_3,
|
||||
/* 0x12 */ CM_COPY_ANIM_4,
|
||||
/* 0x13 */ CM_COPY_ANIM_5,
|
||||
/* 0x14 */ CM_COPY_RETURN_MAIN,
|
||||
/* 0x15 */ CM_SETUP_ERASE_SELECT,
|
||||
/* 0x16 */ CM_ERASE_SELECT,
|
||||
/* 0x17 */ CM_SETUP_ERASE_CONFIRM_1,
|
||||
/* 0x18 */ CM_SETUP_ERASE_CONFIRM_2,
|
||||
/* 0x19 */ CM_ERASE_CONFIRM,
|
||||
/* 0x1A */ CM_EXIT_TO_ERASE_SELECT_1,
|
||||
/* 0x1B */ CM_EXIT_TO_ERASE_SELECT_2,
|
||||
/* 0x1C */ CM_ERASE_ANIM_1,
|
||||
/* 0x1D */ CM_ERASE_WAIT_FOR_FLASH_SAVE,
|
||||
/* 0x1E */ CM_ERASE_ANIM_2,
|
||||
/* 0x1F */ CM_ERASE_ANIM_3,
|
||||
/* 0x20 */ CM_EXIT_ERASE_TO_MAIN,
|
||||
/* 0x21 */ CM_UNUSED_31,
|
||||
/* 0x22 */ CM_ROTATE_TO_NAME_ENTRY,
|
||||
/* 0x23 */ CM_START_NAME_ENTRY,
|
||||
/* 0x24 */ CM_NAME_ENTRY,
|
||||
/* 0x25 */ CM_NAME_ENTRY_WAIT_FOR_FLASH_SAVE,
|
||||
/* 0x26 */ CM_NAME_ENTRY_TO_MAIN,
|
||||
/* 0x27 */ CM_MAIN_TO_OPTIONS,
|
||||
/* 0x28 */ CM_START_OPTIONS,
|
||||
/* 0x29 */ CM_OPTIONS_MENU,
|
||||
/* 0x2A */ CM_OPTIONS_WAIT_FOR_FLASH_SAVE,
|
||||
/* 0x2B */ CM_OPTIONS_TO_MAIN,
|
||||
/* 0x2C */ CM_UNUSED_DELAY
|
||||
} ConfigMode;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SM_FADE_MAIN_TO_SELECT,
|
||||
/* 1 */ SM_MOVE_FILE_TO_TOP,
|
||||
/* 2 */ SM_FADE_IN_FILE_INFO,
|
||||
/* 3 */ SM_CONFIRM_FILE,
|
||||
/* 4 */ SM_FADE_OUT_FILE_INFO,
|
||||
/* 5 */ SM_MOVE_FILE_TO_SLOT,
|
||||
/* 6 */ SM_FADE_OUT,
|
||||
/* 7 */ SM_LOAD_GAME
|
||||
} SelectMode;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ FS_TITLE_SELECT_FILE, // "Please select a file."
|
||||
/* 1 */ FS_TITLE_OPEN_FILE, // "Open this file?"
|
||||
/* 2 */ FS_TITLE_COPY_FROM, // "Copy which file?"
|
||||
/* 3 */ FS_TITLE_COPY_TO, // "Copy to which file?"
|
||||
/* 4 */ FS_TITLE_COPY_CONFIRM, // "Are you sure?"
|
||||
/* 5 */ FS_TITLE_COPY_COMPLETE, // "File copied."
|
||||
/* 6 */ FS_TITLE_ERASE_FILE, // "Erase which file?"
|
||||
/* 7 */ FS_TITLE_ERASE_CONFIRM, // "Are you sure?"
|
||||
/* 8 */ FS_TITLE_ERASE_COMPLETE // "File erased."
|
||||
} TitleLabel;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ FS_TITLE_CUR,
|
||||
/* 1 */ FS_TITLE_NEXT
|
||||
} TitleIndex;
|
||||
|
||||
typedef enum {
|
||||
/* -1 */ FS_WARNING_NONE = -1,
|
||||
/* 0 */ FS_WARNING_NO_FILE_COPY, // "No file to copy."
|
||||
/* 1 */ FS_WARNING_NO_FILE_ERASE, // "No file to erase."
|
||||
/* 2 */ FS_WARNING_NO_EMPTY_FILES, // "There is no empty file."
|
||||
/* 3 */ FS_WARNING_FILE_EMPTY, // "This is an empty file."
|
||||
/* 4 */ FS_WARNING_FILE_IN_USE // "This file is in use."
|
||||
} WarningLabel;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ FS_BTN_MAIN_FILE_1,
|
||||
/* 1 */ FS_BTN_MAIN_FILE_2,
|
||||
/* 2 */ FS_BTN_MAIN_FILE_3,
|
||||
/* 3 */ FS_BTN_MAIN_COPY,
|
||||
/* 4 */ FS_BTN_MAIN_ERASE,
|
||||
/* 5 */ FS_BTN_MAIN_OPTIONS
|
||||
} MainMenuButtonIndex;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ FS_BTN_COPY_FILE_1,
|
||||
/* 1 */ FS_BTN_COPY_FILE_2,
|
||||
/* 2 */ FS_BTN_COPY_FILE_3,
|
||||
/* 3 */ FS_BTN_COPY_QUIT
|
||||
} CopyMenuButtonIndex;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ FS_BTN_ERASE_FILE_1,
|
||||
/* 1 */ FS_BTN_ERASE_FILE_2,
|
||||
/* 2 */ FS_BTN_ERASE_FILE_3,
|
||||
/* 3 */ FS_BTN_ERASE_QUIT
|
||||
} EraseMenuButtonIndex;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ FS_BTN_SELECT_FILE_1,
|
||||
/* 1 */ FS_BTN_SELECT_FILE_2,
|
||||
/* 2 */ FS_BTN_SELECT_FILE_3,
|
||||
/* 3 */ FS_BTN_SELECT_YES,
|
||||
/* 4 */ FS_BTN_SELECT_QUIT
|
||||
} SelectMenuButtonIndex;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ FS_BTN_CONFIRM_YES,
|
||||
/* 1 */ FS_BTN_CONFIRM_QUIT
|
||||
} ConfirmButtonIndex;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ FS_BTN_ACTION_COPY,
|
||||
/* 1 */ FS_BTN_ACTION_ERASE
|
||||
} ActionButtonIndex;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ FS_SETTING_AUDIO,
|
||||
/* 1 */ FS_SETTING_ZTARGET
|
||||
} SettingIndex;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ FS_CHAR_PAGE_HIRA,
|
||||
/* 1 */ FS_CHAR_PAGE_KATA,
|
||||
/* 2 */ FS_CHAR_PAGE_ENG
|
||||
} CharPage;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ FS_KBD_BTN_HIRA,
|
||||
/* 1 */ FS_KBD_BTN_KATA,
|
||||
/* 2 */ FS_KBD_BTN_ENG,
|
||||
/* 3 */ FS_KBD_BTN_BACKSPACE,
|
||||
/* 4 */ FS_KBD_BTN_END,
|
||||
/* 99 */ FS_KBD_BTN_NONE = 99
|
||||
} KeyboardButton;
|
||||
|
||||
typedef struct FileSelectState {
|
||||
/* 0x00000 */ GameState state;
|
||||
/* 0x000A4 */ Vtx* windowVtx;
|
||||
/* 0x000A8 */ u8* staticSegment;
|
||||
/* 0x000AC */ u8* parameterSegment;
|
||||
/* 0x000B0 */ u8* titleSegment;
|
||||
/* 0x000B8 */ View view;
|
||||
/* 0x00220 */ SramContext sramCtx;
|
||||
/* 0x00248 */ SkyboxContext skyboxCtx;
|
||||
/* 0x00470 */ MessageContext msgCtx;
|
||||
/* 0x12550 */ Font font;
|
||||
/* 0x242E0 */ EnvironmentContext envCtx;
|
||||
/* 0x243E0 */ UNK_TYPE1 pad243E0[0x4];
|
||||
/* 0x243E4 */ Vtx* windowContentVtx;
|
||||
/* 0x243E8 */ Vtx* keyboardVtx;
|
||||
/* 0x243EC */ Vtx* nameEntryVtx;
|
||||
/* 0x243F0 */ Vtx* keyboard2Vtx;
|
||||
/* 0x243F4 */ u8 newf[4][6];
|
||||
/* 0x2440C */ u16 threeDayResetCount[4];
|
||||
/* 0x24414 */ char fileNames[4][8];
|
||||
/* 0x24434 */ s16 healthCapacity[4];
|
||||
/* 0x2443C */ s16 health[4];
|
||||
/* 0x24444 */ u32 questItems[4];
|
||||
/* 0x24454 */ s8 defenseHearts[4];
|
||||
/* 0x24458 */ u16 time[4];
|
||||
/* 0x24460 */ s16 day[4];
|
||||
/* 0x24468 */ u8 isOwlSave[4];
|
||||
/* 0x2446C */ s16 rupees[4];
|
||||
/* 0x24474 */ u8 walletUpgrades[4];
|
||||
/* 0x24478 */ u8 maskCount[4];
|
||||
/* 0x2447C */ u8 heartPieceCount[4];
|
||||
/* 0x24480 */ s16 buttonIndex; // enum will depend on `ConfigMode`
|
||||
/* 0x24482 */ s16 confirmButtonIndex; // see `ConfirmButtonIndex` enum
|
||||
/* 0x24484 */ s16 menuMode; // see `MenuMode` enum
|
||||
/* 0x24486 */ s16 configMode; // see `ConfigMode` enum
|
||||
/* 0x24488 */ s16 prevConfigMode; // see `ConfigMode` enum
|
||||
/* 0x2448A */ s16 nextConfigMode; // see `ConfigMode` enum
|
||||
/* 0x2448C */ s16 selectMode; // see `SelectMode` enum
|
||||
/* 0x2448E */ s16 selectedFileIndex;
|
||||
/* 0x24490 */ UNK_TYPE1 pad24490[0x2];
|
||||
/* 0x24492 */ s16 fileNamesY[3];
|
||||
/* 0x24498 */ s16 actionTimer;
|
||||
/* 0x2449A */ s16 buttonYOffsets[6];
|
||||
/* 0x244A6 */ s16 copyDestFileIndex;
|
||||
/* 0x244A8 */ s16 warningLabel;
|
||||
/* 0x244AA */ s16 warningButtonIndex;
|
||||
/* 0x244AC */ s16 titleLabel; // see `TitleLabel` enum
|
||||
/* 0x244AE */ s16 nextTitleLabel; // see `TitleLabel` enum
|
||||
/* 0x244B0 */ s16 windowColor[3];
|
||||
/* 0x244B6 */ s16 titleAlpha[2]; // see `TitleIndex` enum
|
||||
/* 0x244BA */ s16 windowAlpha;
|
||||
/* 0x244BC */ s16 fileButtonAlpha[3];
|
||||
/* 0x244C2 */ s16 nameBoxAlpha[3];
|
||||
/* 0x244C8 */ s16 nameAlpha[3];
|
||||
/* 0x244CE */ s16 connectorAlpha[3];
|
||||
/* 0x244D4 */ s16 fileInfoAlpha[3];
|
||||
/* 0x244DA */ s16 actionButtonAlpha[2];
|
||||
/* 0x244DA */ s16 confirmButtonAlpha[2];
|
||||
/* 0x244E2 */ s16 optionButtonAlpha;
|
||||
/* 0x244E4 */ s16 nameEntryBoxAlpha;
|
||||
/* 0x244E6 */ s16 controlsAlpha;
|
||||
/* 0x244E8 */ s16 emptyFileTextAlpha;
|
||||
/* 0x244EA */ s16 highlightColor[4];
|
||||
/* 0x244F2 */ s16 highlightPulseDir;
|
||||
/* 0x244F4 */ s16 unk_244F4;
|
||||
/* 0x244F6 */ s16 confirmButtonTexIndices[2];
|
||||
/* 0x244FA */ s16 inputTimerX;
|
||||
/* 0x244FC */ s16 inputTimerY;
|
||||
/* 0x244FE */ s16 stickXDir;
|
||||
/* 0x24500 */ s16 stickYDir;
|
||||
/* 0x24502 */ s16 stickAdjX;
|
||||
/* 0x24504 */ s16 stickAdjY;
|
||||
/* 0x24506 */ s16 nameEntryBoxPosX;
|
||||
/* 0x24508 */ s16 windowPosX;
|
||||
/* 0x2450A */ s16 screenFillAlpha;
|
||||
/* 0x2450C */ f32 windowRot;
|
||||
/* 0x24510 */ s16 kbdButton;
|
||||
/* 0x24512 */ s16 charPage;
|
||||
/* 0x24514 */ s16 charBgAlpha;
|
||||
/* 0x24516 */ s16 charIndex;
|
||||
/* 0x24518 */ s16 kbdX;
|
||||
/* 0x2451A */ s16 kbdY;
|
||||
/* 0x2451C */ s16 newFileNameCharCount;
|
||||
/* 0x2451E */ s16 unk_2451E[5];
|
||||
/* 0x24528 */ s16 highlightTimer;
|
||||
/* 0x2452A */ s16 unk_2452A;
|
||||
/* 0x2452C */ s16 unk_2452C[4];
|
||||
/* 0x24534 */ s16 unk_24534[4];
|
||||
/* 0x2453C */ s16 unk_2453C[4];
|
||||
/* 0x24544 */ s16 unk_24544[4];
|
||||
/* 0x2454C */ s16 unk_2454C;
|
||||
/* 0x2454E */ s16 unk_2454E;
|
||||
/* 0x24550 */ s16 unk_24550;
|
||||
} FileSelectState; // size = 0x24558
|
||||
|
||||
void FileSelect_Init(GameState* thisx);
|
||||
void FileSelect_Destroy(GameState* thisx);
|
||||
|
||||
void FileSelect_PulsateCursor(GameState* thisx);
|
||||
void FileSelect_DrawNameEntry(GameState* thisx);
|
||||
void FileSelect_DrawOptions(GameState* thisx);
|
||||
void FileSelect_DrawTexQuadI4(GraphicsContext* gfxCtx, TexturePtr texture, s16 point);
|
||||
|
||||
// Copying Files
|
||||
void FileSelect_SetupCopySource(GameState* thisx);
|
||||
void FileSelect_SelectCopySource(GameState* thisx);
|
||||
void FileSelect_SetupCopyDest1(GameState* thisx);
|
||||
void FileSelect_SetupCopyDest2(GameState* thisx);
|
||||
void FileSelect_SelectCopyDest(GameState* thisx);
|
||||
void FileSelect_ExitToCopySource1(GameState* thisx);
|
||||
void FileSelect_ExitToCopySource2(GameState* thisx);
|
||||
void FileSelect_SetupCopyConfirm1(GameState* thisx);
|
||||
void FileSelect_SetupCopyConfirm2(GameState* thisx);
|
||||
void FileSelect_CopyConfirm(GameState* thisx);
|
||||
void FileSelect_CopyWaitForFlashSave(GameState* thisx);
|
||||
void FileSelect_ReturnToCopyDest(GameState* thisx);
|
||||
void FileSelect_CopyAnim1(GameState* thisx);
|
||||
void FileSelect_CopyAnim2(GameState* thisx);
|
||||
void FileSelect_CopyAnim3(GameState* thisx);
|
||||
void FileSelect_CopyAnim4(GameState* thisx);
|
||||
void FileSelect_CopyAnim5(GameState* thisx);
|
||||
void FileSelect_ExitCopyToMain(GameState* thisx);
|
||||
|
||||
// Erasing Files
|
||||
void FileSelect_SetupEraseSelect(GameState* thisx);
|
||||
void FileSelect_EraseSelect(GameState* thisx);
|
||||
void FileSelect_SetupEraseConfirm1(GameState* thisx);
|
||||
void FileSelect_SetupEraseConfirm2(GameState* thisx);
|
||||
void FileSelect_EraseConfirm(GameState* thisx);
|
||||
void FileSelect_ExitToEraseSelect1(GameState* thisx);
|
||||
void FileSelect_ExitToEraseSelect2(GameState* thisx);
|
||||
void FileSelect_EraseAnim1(GameState* thisx);
|
||||
void FileSelect_EraseWaitForFlashSave(GameState* thisx);
|
||||
void FileSelect_EraseAnim2(GameState* thisx);
|
||||
void FileSelect_EraseAnim3(GameState* thisx);
|
||||
void FileSelect_ExitEraseToMain(GameState* thisx);
|
||||
|
||||
// Entering Name
|
||||
void FileSelect_StartNameEntry(GameState* thisx);
|
||||
void FileSelect_UpdateKeyboardCursor(GameState* thisx);
|
||||
void FileSelect_NameEntryWaitForFlashSave(GameState* thisx);
|
||||
|
||||
// Selecting Options
|
||||
void FileSelect_StartOptions(GameState* thisx);
|
||||
void FileSelect_UpdateOptionsMenu(GameState* thisx);
|
||||
void FileSelect_OptionsWaitForFlashSave(GameState* thisx);
|
||||
|
||||
extern u8 D_808141F0[];
|
||||
extern s16 D_80814280[];
|
||||
|
||||
#endif
|
||||
@@ -171,7 +171,7 @@ void ConsoleLogo_Init(GameState* thisx) {
|
||||
gSaveContext.fileNum = 0xFF;
|
||||
}
|
||||
|
||||
gSaveContext.unk_3F3F = true;
|
||||
gSaveContext.flashSaveAvailable = true;
|
||||
Sram_Alloc(thisx, &this->sramCtx);
|
||||
this->ult = 0;
|
||||
this->timer = 20;
|
||||
|
||||
@@ -285,7 +285,7 @@ void KaleidoScope_DrawInventoryEditorText(Gfx** gfxp) {
|
||||
GfxPrint_SetPos(&printer, 23, 22);
|
||||
GfxPrint_Printf(&printer, "%s", "セイ");
|
||||
|
||||
// Life (double defence)
|
||||
// Life (double defense)
|
||||
GfxPrint_SetPos(&printer, 4, 25);
|
||||
GfxPrint_Printf(&printer, "%s", "イ");
|
||||
GfxPrint_SetPos(&printer, 4, 26);
|
||||
@@ -601,7 +601,7 @@ void KaleidoScope_DrawInventoryEditor(PlayState* play) {
|
||||
counterDigits[1] += 21;
|
||||
}
|
||||
|
||||
// Double Defence
|
||||
// Double Defense
|
||||
KaleidoScope_DrawDigit(play, gSaveContext.save.saveInfo.playerData.doubleDefense, 44, 202);
|
||||
|
||||
// Magic
|
||||
@@ -1048,16 +1048,13 @@ void KaleidoScope_UpdateInventoryEditor(PlayState* play) {
|
||||
// Dungeon Items
|
||||
slot = sCurSection - INV_EDITOR_SECTION_DUNGEON_ITEMS;
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_CLEFT)) {
|
||||
// Map
|
||||
gSaveContext.save.saveInfo.inventory.dungeonItems[slot] ^= 4;
|
||||
gSaveContext.save.saveInfo.inventory.dungeonItems[slot] ^= (1 << DUNGEON_MAP);
|
||||
}
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_CDOWN)) {
|
||||
// Compass
|
||||
gSaveContext.save.saveInfo.inventory.dungeonItems[slot] ^= 2;
|
||||
gSaveContext.save.saveInfo.inventory.dungeonItems[slot] ^= (1 << DUNGEON_COMPASS);
|
||||
}
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_CRIGHT)) {
|
||||
// Boss Key
|
||||
gSaveContext.save.saveInfo.inventory.dungeonItems[slot] ^= 1;
|
||||
gSaveContext.save.saveInfo.inventory.dungeonItems[slot] ^= (1 << DUNGEON_BOSS_KEY);
|
||||
}
|
||||
|
||||
} else if (sCurSection < INV_EDITOR_SECTION_DOUBLE_DEFENSE) {
|
||||
@@ -1077,7 +1074,7 @@ void KaleidoScope_UpdateInventoryEditor(PlayState* play) {
|
||||
}
|
||||
|
||||
} else {
|
||||
// Double Defence
|
||||
// Double Defense
|
||||
if (CHECK_BTN_ALL(input->press.button, BTN_CUP) || CHECK_BTN_ALL(input->press.button, BTN_CLEFT) ||
|
||||
CHECK_BTN_ALL(input->press.button, BTN_CDOWN) || CHECK_BTN_ALL(input->press.button, BTN_CRIGHT)) {
|
||||
gSaveContext.save.saveInfo.playerData.doubleDefense ^= 1;
|
||||
|
||||
@@ -3060,12 +3060,12 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
Play_SaveCycleSceneFlags(&play->state);
|
||||
gSaveContext.save.saveInfo.playerData.savedSceneId = play->sceneId;
|
||||
func_8014546C(sramCtx);
|
||||
if (gSaveContext.unk_3F3F == 0) {
|
||||
if (!gSaveContext.flashSaveAvailable) {
|
||||
pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_5;
|
||||
} else {
|
||||
func_80147008(sramCtx, D_801C67C8[gSaveContext.fileNum],
|
||||
D_801C67F0[gSaveContext.fileNum]);
|
||||
func_80147020(sramCtx);
|
||||
Sram_SetFlashPagesDefault(sramCtx, gFlashSaveStartPages[gSaveContext.fileNum],
|
||||
gFlashSaveNumPages[gSaveContext.fileNum]);
|
||||
Sram_StartWriteToFlashDefault(sramCtx);
|
||||
pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_4;
|
||||
}
|
||||
sDelayTimer = 90;
|
||||
@@ -3327,11 +3327,12 @@ void KaleidoScope_Update(PlayState* play) {
|
||||
gSaveContext.save.saveInfo.playerData.savedSceneId = play->sceneId;
|
||||
gSaveContext.save.saveInfo.playerData.health = 0x30;
|
||||
func_8014546C(sramCtx);
|
||||
if (gSaveContext.unk_3F3F == 0) {
|
||||
if (!gSaveContext.flashSaveAvailable) {
|
||||
pauseCtx->state = PAUSE_STATE_GAMEOVER_8;
|
||||
} else {
|
||||
func_80147008(sramCtx, D_801C67C8[gSaveContext.fileNum], D_801C67F0[gSaveContext.fileNum]);
|
||||
func_80147020(sramCtx);
|
||||
Sram_SetFlashPagesDefault(sramCtx, gFlashSaveStartPages[gSaveContext.fileNum],
|
||||
gFlashSaveNumPages[gSaveContext.fileNum]);
|
||||
Sram_StartWriteToFlashDefault(sramCtx);
|
||||
pauseCtx->state = PAUSE_STATE_GAMEOVER_7;
|
||||
}
|
||||
sDelayTimer = 90;
|
||||
|
||||
Reference in New Issue
Block a user