aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-03-04 08:20:38 +0000
committerJuan J. Martinez <jjm@usebox.net>2023-03-04 08:20:38 +0000
commit08b8750ce53d9c6800a09026912eb261de3a36e5 (patch)
tree8662ed396a610bbbe9b15bb4dd42531627f1e11f /src
parent58384a345ba0972074aa5b73a5e598763de92468 (diff)
downloadspace-plat-hs-08b8750ce53d9c6800a09026912eb261de3a36e5.tar.gz
space-plat-hs-08b8750ce53d9c6800a09026912eb261de3a36e5.zip
Fix rendering for vertical scroll
There's still the issue of not doing clipping on the top of the screen.
Diffstat (limited to 'src')
-rw-r--r--src/Game/Map.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Game/Map.hs b/src/Game/Map.hs
index 8445a1b..3fb72f9 100644
--- a/src/Game/Map.hs
+++ b/src/Game/Map.hs
@@ -189,7 +189,7 @@ viewport renderer (Map mapData _) vx vy vw vh offs = do
newy = min (if fy + halfViewportHeight > mapHeight then mapHeight - vh else fy) (mapHeight - vh)
(offsx, offsy) = fromMaybe (0, 0) offs
- mapRect = U.rect (offsx - newx) (offsy - newy) (newx + vw) vh
+ mapRect = U.rect (offsx - newx) (offsy - newy) (newx + vw) (newy + vh)
-- | Render a map.
-- Requires a Viewport from viewport.