diff options
author | David Thompson <dthompson2@worcester.edu> | 2013-11-03 20:02:44 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2013-11-03 20:02:44 -0500 |
commit | 49f93e5fe7261dd520a0013508fd02086af6ae17 (patch) | |
tree | 47c7fd2d368974bd1975e497e1b7108cf79b5803 /2d/game-loop.scm | |
parent | 77a17d8a5514a0eb920a9d81bf5bf42a192d4266 (diff) |
Pass scene state to all observer event handlers.
Diffstat (limited to '2d/game-loop.scm')
-rw-r--r-- | 2d/game-loop.scm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/2d/game-loop.scm b/2d/game-loop.scm index a6cd669..a14459e 100644 --- a/2d/game-loop.scm +++ b/2d/game-loop.scm @@ -130,10 +130,11 @@ time in milliseconds that has passed since the last game update." ;; By default, pressing the escape key will pop the current scene, and ;; closing the window will quit the game. -(default-events `((key-down . ,(lambda (key mod unicode) +(default-events `((key-down . ,(lambda (state key mod unicode) (when (eq? key 'escape) (pop-scene)))) - (quit . ,quit-game))) + (quit . ,(lambda (state) + (quit-game))))) (define handle-events (let ((e (SDL:make-event))) |