diff options
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, |
