diff options
| author | Jameriquiah <42100286+Jameriquiah@users.noreply.github.com> | 2026-08-22 12:39:52 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-22 16:39:52 +0000 |
| commit | e8b943968bb242aed049cc8d69cde16db098871b (patch) | |
| tree | 1d3c12fbb0b9e444e273a6e5427d9d9e4e1725a9 | |
| parent | 27b71b1a54c77711caf2a4fbe76961df6504b960 (diff) | |
Disable2DBackgrounds Fixes (#7102)
| -rw-r--r-- | soh/soh/Enhancements/Graphics/Disable2DBackgrounds.cpp | 36 | ||||
| -rw-r--r-- | soh/soh/resource/type/scenecommand/SetTimeSettings.h | 1 |
2 files changed, 12 insertions, 25 deletions
diff --git a/soh/soh/Enhancements/Graphics/Disable2DBackgrounds.cpp b/soh/soh/Enhancements/Graphics/Disable2DBackgrounds.cpp index 59d66bab7..9bf42d5c7 100644 --- a/soh/soh/Enhancements/Graphics/Disable2DBackgrounds.cpp +++ b/soh/soh/Enhancements/Graphics/Disable2DBackgrounds.cpp @@ -1,5 +1,8 @@ #include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h" #include "soh/ShipInit.hpp" +#include "soh/resource/type/scenecommand/SetTimeSettings.h" + +bool Scene_CommandTimeSettings(PlayState* play, SOH::ISceneCommand* cmd); extern "C" { #include "variables.h" @@ -23,25 +26,6 @@ std::set<SceneID> fogControlList = { SCENE_TEMPLE_OF_TIME_EXTERIOR_DAY, SCENE_TEMPLE_OF_TIME_EXTERIOR_NIGHT, SCENE_TEMPLE_OF_TIME_EXTERIOR_RUINS, - SCENE_KNOW_IT_ALL_BROS_HOUSE, - SCENE_TWINS_HOUSE, - SCENE_MIDOS_HOUSE, - SCENE_SARIAS_HOUSE, - SCENE_BACK_ALLEY_HOUSE, - SCENE_BAZAAR, - SCENE_KOKIRI_SHOP, - SCENE_GORON_SHOP, - SCENE_ZORA_SHOP, - SCENE_POTION_SHOP_KAKARIKO, - SCENE_POTION_SHOP_MARKET, - SCENE_BOMBCHU_SHOP, - SCENE_HAPPY_MASK_SHOP, - SCENE_LINKS_HOUSE, - SCENE_DOG_LADY_HOUSE, - SCENE_STABLE, - SCENE_IMPAS_HOUSE, - SCENE_CARPENTERS_TENT, - SCENE_GRAVEKEEPERS_HUT, }; std::set<SceneID> skyboxSceneControlList = { @@ -84,6 +68,12 @@ std::set<SkyboxId> skyboxIdControlList = { SKYBOX_HOUSE_ALLEY, }; +static void SyncSkyboxTimeToCurrentTime() { + SOH::SetTimeSettings cmd; + cmd.settings = { 0xFF, 0xFF, static_cast<uint8_t>(gPlayState->envCtx.timeIncrement) }; + Scene_CommandTimeSettings(gPlayState, &cmd); +} + void Register3DPreRenderedScenes() { // Runs after the scene commands have set play->skyboxId, but before Play_InitEnvironment builds the // skybox. Overriding the id here means Skybox_Setup loads a real sky; overriding it any later would @@ -98,11 +88,13 @@ void Register3DPreRenderedScenes() { gPlayState->envCtx.skyboxDisabled = false; // Replace skybox with normal sky + SyncSkyboxTimeToCurrentTime(); gPlayState->skyboxId = SKYBOX_NORMAL_SKY; // Apply the always cloudy skybox as an adult for Temple of Time and the Market if (sceneNum == SCENE_TEMPLE_OF_TIME_EXTERIOR_RUINS || sceneNum == SCENE_MARKET_RUINS || sceneNum == SCENE_MARKET_ENTRANCE_RUINS) { gWeatherMode = 3; + gSaveContext.retainWeatherMode = 1; } }); @@ -114,12 +106,8 @@ void Register3DPreRenderedScenes() { if ((HREG(80) != 10) || (HREG(82) != 0)) { // Furthest possible fog and zFar gPlayState->view.zFar = 12800; - gPlayState->lightCtx.fogNear = 996; // Set to 1000 to complete disable fog entirely + gPlayState->lightCtx.fogNear = 1000; gPlayState->lightCtx.fogFar = 12800; - // General gray fog color - gPlayState->lightCtx.fogColor[0] = 100; - gPlayState->lightCtx.fogColor[1] = 100; - gPlayState->lightCtx.fogColor[2] = 100; } }); diff --git a/soh/soh/resource/type/scenecommand/SetTimeSettings.h b/soh/soh/resource/type/scenecommand/SetTimeSettings.h index 13dc2c636..53c5dd79a 100644 --- a/soh/soh/resource/type/scenecommand/SetTimeSettings.h +++ b/soh/soh/resource/type/scenecommand/SetTimeSettings.h @@ -1,7 +1,6 @@ #pragma once #include <stdint.h> -#include <memory> #include "SceneCommand.h" namespace SOH { |
