aboutsummaryrefslogtreecommitdiff
path: root/Demos
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2024-12-30 12:48:31 -0800
committer3gg <3gg@shellblade.net>2024-12-30 12:48:31 -0800
commit34cac097d15cdd7ef0a0de8b9024db9acfe8618d (patch)
treefa573d4d4436abfa83b940938c385e929dbabd06 /Demos
parentd30b146ce320a48d58d37a8f191daa4ef29fbc67 (diff)
Move window setup to App.
Diffstat (limited to 'Demos')
-rw-r--r--Demos/Pong/Main.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/Demos/Pong/Main.hs b/Demos/Pong/Main.hs
index 66fa223..de8e6f2 100644
--- a/Demos/Pong/Main.hs
+++ b/Demos/Pong/Main.hs
@@ -26,14 +26,13 @@ data GameState = GameState
26 , world :: [GameObject] 26 , world :: [GameObject]
27 } 27 }
28 28
29options = defaultAppOptions { title = "Pong" }
29 30
30app = App defaultAppOptions step render resize 31app = App options initGame endGame step render resize
31 32
32 33
33main = 34main :: IO ()
34 withWindow (1920, 1200) (Just "Pong") initGame endGame $ 35main = runApp app
35 loop app
36
37 36
38initGame :: Window -> Game () GameState 37initGame :: Window -> Game () GameState
39initGame window = do 38initGame window = do