summaryrefslogtreecommitdiffstats
path: root/HTanks.hs
diff options
context:
space:
mode:
Diffstat (limited to 'HTanks.hs')
-rw-r--r--HTanks.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/HTanks.hs b/HTanks.hs
index b600a3d..d5536b2 100644
--- a/HTanks.hs
+++ b/HTanks.hs
@@ -22,6 +22,8 @@ main = do
when (initialized gl) $ do
time <- getClockTime
+
+ setup 800 600
runGame gameState $ mainLoop gl time
deinitGL gl
@@ -44,7 +46,7 @@ mainLoop gl time = do
newTime <- liftIO getClockTime
- liftIO $ print $ timeDiff newTime time
+ --liftIO $ print $ timeDiff newTime time
when run $ mainLoop gl newTime
@@ -65,4 +67,7 @@ handleEvents gl = do
handleEvent :: SomeEvent -> IO Bool
handleEvent ev
| Just QuitEvent <- fromEvent ev = return False
+ | Just (ResizeEvent w h) <- fromEvent ev = do
+ resize w h
+ return True
| otherwise = return True