diff options
| author | Random06457 <28494085+Random06457@users.noreply.github.com> | 2023-11-24 13:23:36 +0100 |
|---|---|---|
| committer | Random06457 <28494085+Random06457@users.noreply.github.com> | 2023-11-24 13:57:39 +0100 |
| commit | bf803995dae4d568a00ba40b79810f22c61a8b06 (patch) | |
| tree | 1034c5b755fbe9bf1cde9d8780abc364442f2335 | |
| parent | 6b2dd4e4b005476c16ce2fdb7d103457e5b7dece (diff) | |
add temporary skybox fix for SKYBOX_2 skybox id
| -rw-r--r-- | mm/src/code/z_vr_box.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mm/src/code/z_vr_box.c b/mm/src/code/z_vr_box.c index cf3968930..7e57c473b 100644 --- a/mm/src/code/z_vr_box.c +++ b/mm/src/code/z_vr_box.c @@ -255,6 +255,17 @@ void Skybox_Setup(GameState* gameState, SkyboxContext* skyboxCtx, s16 skyboxId) break; case SKYBOX_2: + // BENTODO: in the original code, this case does nothing + // however this causes skyboxCtx->staticSegments to be 0 which in turn causes + // the draw calls in func_80142440 to crash because of the texture address ends up being 0 + // I'm not sure if this is a mm bug or a 2s2h bug + for (size_t i = 0; i < ARRAY_COUNTU(sD2FineStaticTex); i++) { + skyboxCtx->staticSegments[0][i] = sD2FineStaticTex[i]; + } + for (size_t i = 0; i < ARRAY_COUNTU(sD2FineStaticTex); i++) { + skyboxCtx->staticSegments[1][i] = sD2CloudStaticTex[i]; + } + skyboxCtx->paletteStaticSegment = gClearSkyboxTlue; break; default: |
