Skip to content

Commit

Permalink
Make [INFO] lowercase in logs to avoid shouting
Browse files Browse the repository at this point in the history
  • Loading branch information
yutotakano committed Aug 10, 2024
1 parent f0dfefe commit c00da81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Game.hs
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ data Bullet = Bullet
-- To see where this is called, check out Main.hs.
init :: IO GameState
init = do
putStrLn "[INFO] Game initialisation! Loading assets..."
putStrLn "[info] Game initialisation! Loading assets..."

-- We load the player texture from a BMP file. We *could* do this in the
-- draw function when we need it (on demand), but it'll be laggy!!
-- (Because accessing files is slow compared to how fast a game runs)
surface <- SDL.loadBMP "assets/char0.bmp"

putStrLn "[INFO] Game initialisation complete!"
putStrLn "[info] Game initialisation complete!"

-- Get the current milliseconds since SDL was initialised as a Word32
ticks <- SDL.getTicks
Expand Down
12 changes: 6 additions & 6 deletions src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ import Game
-- It then enters the application loop.
main :: IO ()
main = do
putStrLn "[INFO] Starting SDL2, the window and graphics library"
putStrLn "[info] Starting SDL2, the window and graphics library"
SDL.initializeAll

putStrLn "[INFO] Creating a window"
putStrLn "[info] Creating a window"
window <- SDL.createWindow (Text.pack "My Game Window") SDL.defaultWindow
putStrLn "[INFO] Creating a renderer"
putStrLn "[info] Creating a renderer"
renderer <- SDL.createRenderer window (-1) SDL.defaultRenderer

putStrLn "[INFO] Initialising the game"
putStrLn "[info] Initialising the game"
gameState <- Game.init

putStrLn "[INFO] Starting the app loop"
putStrLn "[info] Starting the app loop"
Game.gameLoop renderer gameState

putStrLn "[INFO] Exiting"
putStrLn "[info] Exiting"
SDL.destroyWindow window

0 comments on commit c00da81

Please sign in to comment.