Skip to content

Commit

Permalink
port: extend sky slightly beyond screen
Browse files Browse the repository at this point in the history
to push glitchy corners out of view
  • Loading branch information
fgsfdsfgs committed Oct 25, 2023
1 parent 3680212 commit da7e149
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/game/sky.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit da7e149

Please sign in to comment.