From da7e1493a5c9abb4890e003afa8368b08f863e8d Mon Sep 17 00:00:00 2001 From: fgsfds Date: Wed, 25 Oct 2023 12:54:47 +0200 Subject: [PATCH] port: extend sky slightly beyond screen to push glitchy corners out of view --- src/game/sky.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/game/sky.c b/src/game/sky.c index 9e6e92e5c..026878d0e 100644 --- a/src/game/sky.c +++ b/src/game/sky.c @@ -307,10 +307,17 @@ Gfx *skyRender(Gfx *gdl) if (&tl3dpos); +#ifdef PLATFORM_N64 skyGetWorldPosFromScreenPos(0.0f, 0.0f, &tl3dpos); skyGetWorldPosFromScreenPos(camGetScreenWidth() - 0.1f, 0.0f, &tr3dpos); skyGetWorldPosFromScreenPos(0.0f, camGetScreenHeight() - 0.1f, &bl3dpos); skyGetWorldPosFromScreenPos(camGetScreenWidth() - 0.1f, camGetScreenHeight() - 0.1f, &br3dpos); +#else + skyGetWorldPosFromScreenPos(-4.0f, -4.0f, &tl3dpos); + skyGetWorldPosFromScreenPos(camGetScreenWidth() + 4.0f, -4.0f, &tr3dpos); + skyGetWorldPosFromScreenPos(-4.0f, camGetScreenHeight() + 4.0f, &bl3dpos); + skyGetWorldPosFromScreenPos(camGetScreenWidth() + 4.0f, camGetScreenHeight() + 4.0f, &br3dpos); +#endif tlcornerissky = skyIsScreenCornerInSky(&tl3dpos, &sp644, &sp58c); trcornerissky = skyIsScreenCornerInSky(&tr3dpos, &sp638, &sp588);