aboutsummaryrefslogtreecommitdiff
path: root/src/Game/Hud.hs
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-02-26 00:26:54 +0000
committerJuan J. Martinez <jjm@usebox.net>2023-02-26 00:26:54 +0000
commit9b04633e09a80d33456f545baf1fa910f0986db7 (patch)
tree28554c66d557cb16b1281f07abb9c083aca12589 /src/Game/Hud.hs
parentb3e0ace3ca198cacd8d77c6ca0f2c457826dee63 (diff)
downloadspace-plat-hs-9b04633e09a80d33456f545baf1fa910f0986db7.tar.gz
space-plat-hs-9b04633e09a80d33456f545baf1fa910f0986db7.zip
Draw the HUB on the top of the screen
Diffstat (limited to 'src/Game/Hud.hs')
-rw-r--r--src/Game/Hud.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Game/Hud.hs b/src/Game/Hud.hs
index dd72bb3..1e51993 100644
--- a/src/Game/Hud.hs
+++ b/src/Game/Hud.hs
@@ -19,6 +19,6 @@ render :: SDL.Renderer -> Hud -> IO ()
render renderer hud = do
state <- readIORef hud.stateRef
let xs = [0 .. state.totalBatteries - 1]
- in mapM_ (\x -> S.render renderer hud.sprite (4 + x * 8) 178 0 (if state.batteries <= x then 0 else 1)) xs
+ in mapM_ (\x -> S.render renderer hud.sprite (4 + x * 8) 4 0 (if state.batteries <= x then 0 else 1)) xs
let xs = [0 .. state.totalLives - 1]
- in mapM_ (\x -> S.render renderer hud.sprite (320 - 4 - state.totalLives * 8 + x * 8) 178 0 (if state.lives <= x then 2 else 3)) xs
+ in mapM_ (\x -> S.render renderer hud.sprite (320 - 4 - state.totalLives * 8 + x * 8) 4 0 (if state.lives <= x then 2 else 3)) xs