diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-02-25 15:58:30 +0000 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-02-25 15:58:30 +0000 |
commit | 838a460c1be7260986d272306ce92776e0b489db (patch) | |
tree | 843fae959b01f7de18ef7170348ecea0f1fd6852 /src | |
parent | 1740d53c9f0942dfeb8a33612e8118cd03086773 (diff) | |
download | space-plat-hs-838a460c1be7260986d272306ce92776e0b489db.tar.gz space-plat-hs-838a460c1be7260986d272306ce92776e0b489db.zip |
Keep the hud in the game over screen
Diffstat (limited to 'src')
-rw-r--r-- | src/Game.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Game.hs b/src/Game.hs index 4f84ad1..0b72f3c 100644 --- a/src/Game.hs +++ b/src/Game.hs @@ -210,12 +210,14 @@ gameLoop = do SDL.rendererDrawBlendMode renderer $= SDL.BlendAlphaBlend SDL.rendererDrawColor renderer $= V4 0 0 0 (fromIntegral (255 - i * (255 `div` gameOverDelay))) - SDL.fillRect renderer Nothing + SDL.fillRect renderer (Just $ U.rect 0 0 320 176) gameOverLoop :: Env -> IO () gameOverLoop env = do let renderer = env.renderer sprites = env.sprites + hud = env.hud + H.render renderer hud title <- S.get sprites "game-over" S.render renderer title 112 80 0 0 |