diff options
| author | engineer124 <47598039+engineer124@users.noreply.github.com> | 2022-07-23 15:30:19 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-23 15:30:19 -0400 |
| commit | 6472f6832328c12492a73afb99d9f951b6d85ee8 (patch) | |
| tree | 269af2a13a4141401f5e9a3184ba00a25be9804f /src/code | |
| parent | f3f147cc3d92dcfd2a8f9332833245db421266ba (diff) | |
Map Select: Docs and Cleanup (#962)
* Add Map Select Docs
* cleanup
* brackets
* Another typo
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/graph.c | 2 | ||||
| -rw-r--r-- | src/code/z_bgcheck.c | 2 | ||||
| -rw-r--r-- | src/code/z_common_data.c | 2 | ||||
| -rw-r--r-- | src/code/z_demo.c | 2 | ||||
| -rw-r--r-- | src/code/z_game_dlftbls.c | 2 | ||||
| -rw-r--r-- | src/code/z_scene.c | 27 |
6 files changed, 17 insertions, 20 deletions
diff --git a/src/code/graph.c b/src/code/graph.c index 28327c35f..f625cb7b6 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -67,7 +67,7 @@ GameStateOverlay* Graph_GetNextGameState(GameState* gameState) { if (gameStateInit == (GameStateFunc)TitleSetup_Init) { return &gGameStateOverlayTable[0]; } - if (gameStateInit == (GameStateFunc)Select_Init) { + if (gameStateInit == (GameStateFunc)MapSelect_Init) { return &gGameStateOverlayTable[1]; } if (gameStateInit == (GameStateFunc)Title_Init) { diff --git a/src/code/z_bgcheck.c b/src/code/z_bgcheck.c index 7aaae22bc..812f68c0d 100644 --- a/src/code/z_bgcheck.c +++ b/src/code/z_bgcheck.c @@ -1191,7 +1191,7 @@ void BgCheck_GetSubdivisionMinBounds(CollisionContext* colCtx, Vec3f* pos, s32* /** * Get positive bias subdivision indices - * increments indicies if `pos` is within BGCHECK_SUBDIV_OVERLAP units of the postive subdivision boundary + * increments indices if `pos` is within BGCHECK_SUBDIV_OVERLAP units of the positive subdivision boundary * `sx`, `sy`, `sz` returns the subdivision x, y, z indices */ void BgCheck_GetSubdivisionMaxBounds(CollisionContext* colCtx, Vec3f* pos, s32* sx, s32* sy, s32* sz) { diff --git a/src/code/z_common_data.c b/src/code/z_common_data.c index 7c8b7cf99..955f54870 100644 --- a/src/code/z_common_data.c +++ b/src/code/z_common_data.c @@ -13,7 +13,7 @@ void SaveContext_Init(void) { gSaveContext.cutsceneTrigger = 0; gSaveContext.unk_3F4D = 0; gSaveContext.nextDayTime = 0xFFFF; - gSaveContext.environmentTime = 0; + gSaveContext.skyboxTime = 0; gSaveContext.dogIsLost = true; gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT; gSaveContext.unk_3F26 = 50; diff --git a/src/code/z_demo.c b/src/code/z_demo.c index 80e30e69c..383f8928a 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -554,7 +554,7 @@ void Cutscene_Command_SetTime(PlayState* play, CutsceneContext* csCtx, CsCmdDayT nextTime = hourAsMinutes + minutes; gSaveContext.save.time = nextTime; - gSaveContext.environmentTime = nextTime; + gSaveContext.skyboxTime = nextTime; } } diff --git a/src/code/z_game_dlftbls.c b/src/code/z_game_dlftbls.c index 26a17a84a..2df62a054 100644 --- a/src/code/z_game_dlftbls.c +++ b/src/code/z_game_dlftbls.c @@ -15,7 +15,7 @@ GameStateOverlay gGameStateOverlayTable[] = { GAMESTATE_OVERLAY_INTERNAL(TitleSetup_Init, TitleSetup_Destroy, sizeof(GameState)), - GAMESTATE_OVERLAY(select, Select_Init, Select_Destroy, sizeof(SelectContext)), + GAMESTATE_OVERLAY(select, MapSelect_Init, MapSelect_Destroy, sizeof(MapSelectState)), GAMESTATE_OVERLAY(title, Title_Init, Title_Destroy, sizeof(TitleContext)), GAMESTATE_OVERLAY_INTERNAL(Play_Init, Play_Fini, sizeof(PlayState)), GAMESTATE_OVERLAY(opening, Opening_Init, Opening_Destroy, sizeof(OpeningContext)), diff --git a/src/code/z_scene.c b/src/code/z_scene.c index c6e896447..1d4217ee3 100644 --- a/src/code/z_scene.c +++ b/src/code/z_scene.c @@ -376,7 +376,7 @@ void Scene_HeaderCmdSkyboxDisables(PlayState* play, SceneCmd* cmd) { // SceneTableEntry Header Command 0x10: Time Settings void Scene_HeaderCmdTimeSettings(PlayState* play, SceneCmd* cmd) { if (cmd->timeSettings.hour != 0xFF && cmd->timeSettings.min != 0xFF) { - gSaveContext.environmentTime = gSaveContext.save.time = + gSaveContext.skyboxTime = gSaveContext.save.time = (u16)(((cmd->timeSettings.hour + (cmd->timeSettings.min / 60.0f)) * 60.0f) / 0.021972656f); } @@ -398,20 +398,17 @@ void Scene_HeaderCmdTimeSettings(PlayState* play, SceneCmd* cmd) { play->envCtx.unk_8 = (Math_CosS(((void)0, gSaveContext.save.time) - 0x8000) * 120.0f) * 25.0f; play->envCtx.unk_C = (Math_CosS(((void)0, gSaveContext.save.time) - 0x8000) * 20.0f) * 25.0f; - if (play->envCtx.timeIncrement == 0 && gSaveContext.save.cutscene < 0xFFF0) { - gSaveContext.environmentTime = gSaveContext.save.time; - - if (gSaveContext.environmentTime >= CLOCK_TIME(4, 0) && gSaveContext.environmentTime < CLOCK_TIME(6, 30)) { - gSaveContext.environmentTime = CLOCK_TIME(5, 0); - } else if (gSaveContext.environmentTime >= CLOCK_TIME(6, 30) && - gSaveContext.environmentTime < CLOCK_TIME(8, 0)) { - gSaveContext.environmentTime = CLOCK_TIME(8, 0); - } else if (gSaveContext.environmentTime >= CLOCK_TIME(16, 0) && - gSaveContext.environmentTime < CLOCK_TIME(17, 0)) { - gSaveContext.environmentTime = CLOCK_TIME(17, 0); - } else if (gSaveContext.environmentTime >= CLOCK_TIME(18, 0) && - gSaveContext.environmentTime < CLOCK_TIME(19, 0)) { - gSaveContext.environmentTime = CLOCK_TIME(19, 0); + if ((play->envCtx.timeIncrement == 0) && (gSaveContext.save.cutscene < 0xFFF0)) { + gSaveContext.skyboxTime = gSaveContext.save.time; + + if ((gSaveContext.skyboxTime >= CLOCK_TIME(4, 0)) && (gSaveContext.skyboxTime < CLOCK_TIME(6, 30))) { + gSaveContext.skyboxTime = CLOCK_TIME(5, 0); + } else if ((gSaveContext.skyboxTime >= CLOCK_TIME(6, 30)) && (gSaveContext.skyboxTime < CLOCK_TIME(8, 0))) { + gSaveContext.skyboxTime = CLOCK_TIME(8, 0); + } else if ((gSaveContext.skyboxTime >= CLOCK_TIME(16, 0)) && (gSaveContext.skyboxTime < CLOCK_TIME(17, 0))) { + gSaveContext.skyboxTime = CLOCK_TIME(17, 0); + } else if ((gSaveContext.skyboxTime >= CLOCK_TIME(18, 0)) && (gSaveContext.skyboxTime < CLOCK_TIME(19, 0))) { + gSaveContext.skyboxTime = CLOCK_TIME(19, 0); } } } |
