From 1690105218d8ec77abc31bcbecfc6794a9be0a14 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 21 Jul 2013 22:19:01 -0400 Subject: Remove event-keycode and event-keymods. --- 2d/game-loop.scm | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to '2d') 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 ;;; -- cgit v1.2.3