diff options
| author | PurpleHato <linkvssangoku.jr@gmail.com> | 2025-10-01 04:03:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-30 19:03:55 -0700 |
| commit | e10b882c0811c1d2c08ea400f4e9313c765c0757 (patch) | |
| tree | 48b28b5d098cef1fdbd0d6b5368d0e326b54cf6f /soh/src/code | |
| parent | 5ed3db0a7ebe21b8adb6f9cda1e4a92b4f8e8fcb (diff) | |
[ADD] - 3D Scenes for pre-render areas (#5804)
* Hard removal 2D ones for now
* override some scene values for prerender tests (#46)
* Adult Link Cloudy
* Fix: Child Link Night ToT Exterior
* Fix for real now
* Tweak: Skybox castle courtyard
* WIP - adjusting for patterns
* Hooked all code, needs testing
* Hookified
* Clean up
* Update Fog Control
* clang
* Fix skybox override to only affect 3D pre-rendered scenes
Prevent the 3D scene renderer from overriding skyboxes on all scenes
Previously, the function was applying skybox changes to every scene, overriding the intended skyboxes throughout the game (Example: Kokiri Forest with a blue sky instead of it's original "greyish" one)
Now it only applies custom skybox settings to scenes in the skyboxControlList, preserving original skyboxes for other scenes
* Remove commentary and forgot to add Zelda's courtyard skybox
* Move code to shipInit.
* Early return for VB_SHOULD.
* clang
* Fix missing !
* Feedback fixes.
* clang
* Fix CVAR
* Modify Skybox for scenes with multiple viewpoints.
* setting position change to blend in the "modder stuff can do"
* Adressed review
* tooltip space missing, oops
* InitFunc
---------
Co-authored-by: Archez <Archez@users.noreply.github.com>
Co-authored-by: Caladius <clatini88@gmail.com>
Diffstat (limited to 'soh/src/code')
| -rw-r--r-- | soh/src/code/z_play.c | 2 | ||||
| -rw-r--r-- | soh/src/code/z_room.c | 4 | ||||
| -rw-r--r-- | soh/src/code/z_vr_box.c | 17 |
3 files changed, 19 insertions, 4 deletions
diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c index dfc832fc7..b1a714dcb 100644 --- a/soh/src/code/z_play.c +++ b/soh/src/code/z_play.c @@ -1390,6 +1390,8 @@ void Play_Draw(PlayState* play) { Gfx_SetupFrame(gfxCtx, 0, 0, 0); if ((HREG(80) != 10) || (HREG(82) != 0)) { + GameInteractor_ExecuteOnPlayDrawBegin(); + POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP); POLY_XLU_DISP = Play_SetFog(play, POLY_XLU_DISP); diff --git a/soh/src/code/z_room.c b/soh/src/code/z_room.c index 60fa3f0ff..493752555 100644 --- a/soh/src/code/z_room.c +++ b/soh/src/code/z_room.c @@ -5,6 +5,7 @@ #include "global.h" #include "vt.h" #include "soh/Enhancements/game-interactor/GameInteractor.h" +#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h" #include <string.h> #include <assert.h> @@ -256,6 +257,9 @@ s32 swapAndConvertJPEG(void* data) { void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 height, u8 fmt, u8 siz, u16 tlutMode, u16 tlutCount, f32 offsetX, f32 offsetY) { + if (!GameInteractor_Should(VB_DRAW_2D_BACKGROUND, true)) { + return; + } Gfx* gfx = *gfxP; uObjBg* bg; diff --git a/soh/src/code/z_vr_box.c b/soh/src/code/z_vr_box.c index c11db1605..f03f9dc7f 100644 --- a/soh/src/code/z_vr_box.c +++ b/soh/src/code/z_vr_box.c @@ -71,6 +71,9 @@ #include "assets/textures/skyboxes/vr_holy1_static.h" #include "assets/textures/skyboxes/vr_holy1_pal_static.h" +#include "soh/Enhancements/game-interactor/GameInteractor.h" +#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h" + u32 D_8012AC90[4] = { 0x00000000, 0x00010000, @@ -449,17 +452,23 @@ void func_800AF178(SkyboxContext* skyboxCtx, s32 arg1) { void LoadSkyboxTex(SkyboxContext* skyboxCtx, int segmentIndex, int imageIndex, char* tex, int width, int height, int offsetW, int offsetH) { - skyboxCtx->textures[segmentIndex][imageIndex] = tex; + if (GameInteractor_Should(VB_LOAD_SKYBOX, true)) { + skyboxCtx->textures[segmentIndex][imageIndex] = tex; + } } void LoadSkyboxTexAtOffset(SkyboxContext* skyboxCtx, int segmentIndex, int imageIndex, char* tex, int width, int height, int offset) { - skyboxCtx->textures[segmentIndex][imageIndex] = tex; + if (GameInteractor_Should(VB_LOAD_SKYBOX, true)) { + skyboxCtx->textures[segmentIndex][imageIndex] = tex; + } } void LoadSkyboxPalette(SkyboxContext* skyboxCtx, int paletteIndex, char* palTex, int width, int height) { - skyboxCtx->palettes[paletteIndex] = palTex; - skyboxCtx->palette_size = width * height; + if (GameInteractor_Should(VB_LOAD_SKYBOX, true)) { + skyboxCtx->palettes[paletteIndex] = palTex; + skyboxCtx->palette_size = width * height; + } } static const char* sSBVRFine0Tex[] = { gSunriseSkybox1Tex, gSunriseSkybox2Tex, gSunriseSkybox3Tex, gSunriseSkybox4Tex, |
