summaryrefslogtreecommitdiff
path: root/2d/game-loop.scm
diff options
context:
space:
mode:
Diffstat (limited to '2d/game-loop.scm')
-rw-r--r--2d/game-loop.scm16
1 files changed, 4 insertions, 12 deletions
diff --git a/2d/game-loop.scm b/2d/game-loop.scm
index 92eff2a..ef650d5 100644
--- a/2d/game-loop.scm
+++ b/2d/game-loop.scm
@@ -92,12 +92,12 @@
"Calls the relevant callback for the event."
(case (SDL:event:type e)
((key-down)
- (key-down-callback (event-keycode e)
- (event-keymods e)
+ (key-down-callback (SDL:event:key:keysym:sym e)
+ (SDL:event:key:keysym:mod e)
(SDL:event:key:keysym:unicode e)))
((key-up)
- (key-up-callback (event-keycode e)
- (event-keymods e)
+ (key-up-callback (SDL:event:key:keysym:sym e)
+ (SDL:event:key:keysym:mod e)
(SDL:event:key:keysym:unicode e)))
((mouse-motion)
(mouse-motion-callback (SDL:event:motion:state e)
@@ -114,14 +114,6 @@
(SDL:event:button:x e)
(SDL:event:button:y e)))))
-(define (event-keycode e)
- "Returns an integer keycode from an SDL event."
- (SDL:enum->number 'keysym (SDL:event:key:keysym:sym e)))
-
-(define (event-keymods e)
- "Returns an integer bitmask of keymods from an SDL event"
- (SDL:flags->number 'keyboard-modifier (SDL:event:key:keysym:mod e)))
-
;;;
;;; Update and Render
;;;