diff options
author | David Thompson <dthompson2@worcester.edu> | 2013-07-21 22:22:23 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2013-07-21 22:22:23 -0400 |
commit | 3ae0550bc73ab825a65d98eeda1c2d2431c4ecfb (patch) | |
tree | 3bc4efe58f617c5f36d598579722a32e03ad6eab | |
parent | 1690105218d8ec77abc31bcbecfc6794a9be0a14 (diff) |
Update examples to reflect changes in keyboard events.
-rw-r--r-- | examples/animation.scm | 3 | ||||
-rw-r--r-- | examples/coroutine.scm | 4 | ||||
-rw-r--r-- | examples/particles.scm | 4 | ||||
-rw-r--r-- | examples/simple.scm | 6 | ||||
-rw-r--r-- | examples/tilemap.scm | 4 |
5 files changed, 6 insertions, 15 deletions
diff --git a/examples/animation.scm b/examples/animation.scm index df713c5..b27d07f 100644 --- a/examples/animation.scm +++ b/examples/animation.scm @@ -2,7 +2,6 @@ (2d game-loop) (2d window) (2d vector) - (2d input) (2d helpers)) (init-2d) @@ -12,7 +11,7 @@ (define sprite #f) (define (key-down key mod unicode) - (cond ((any-equal? key (keycode escape) (keycode q)) + (cond ((any-equal? key 'escape 'q) (close-window) (quit)))) diff --git a/examples/coroutine.scm b/examples/coroutine.scm index bb3f6ab..d2a53d3 100644 --- a/examples/coroutine.scm +++ b/examples/coroutine.scm @@ -6,8 +6,6 @@ (2d sprite) (2d game-loop) (2d window) - (2d vector) - (2d input) (2d helpers) (2d agenda) (2d coroutine)) @@ -19,7 +17,7 @@ (define sprite #f) (define (key-down key mod unicode) - (cond ((any-equal? key (keycode escape) (keycode q)) + (cond ((any-equal? key 'escape 'q) (close-window) (quit)))) diff --git a/examples/particles.scm b/examples/particles.scm index 8e6d11e..555e185 100644 --- a/examples/particles.scm +++ b/examples/particles.scm @@ -2,14 +2,12 @@ (use-modules ((sdl sdl) #:prefix SDL:) (figl gl) (srfi srfi-1) - (srfi srfi-2) (srfi srfi-9) (ice-9 format) (2d sprite) (2d game-loop) (2d window) (2d vector) - (2d input) (2d helpers)) (set! *random-state* (random-state-from-platform)) @@ -69,7 +67,7 @@ (set-key-down-callback (lambda (key mod unicode) (key-down key mod unicode))) (define (key-down key mod unicode) - (cond ((any-equal? key (keycode escape) (keycode q)) + (cond ((any-equal? key 'escape 'q) (close-window) (quit)))) diff --git a/examples/simple.scm b/examples/simple.scm index c5d25f1..ad98548 100644 --- a/examples/simple.scm +++ b/examples/simple.scm @@ -3,9 +3,7 @@ (2d sprite) (2d game-loop) (2d window) - (2d input) - (2d helpers) - (ice-9 format)) + (2d helpers)) (init-2d) @@ -14,7 +12,7 @@ (define sprite #f) (define (key-down key mod unicode) - (cond ((any-equal? key (keycode escape) (keycode q)) + (cond ((any-equal? key 'escape 'q) (close-window) (quit)))) diff --git a/examples/tilemap.scm b/examples/tilemap.scm index 49106b0..cbe6e86 100644 --- a/examples/tilemap.scm +++ b/examples/tilemap.scm @@ -2,12 +2,10 @@ (srfi srfi-1) (srfi srfi-9) (srfi srfi-42) - (ice-9 format) (2d sprite) (2d game-loop) (2d window) (2d vector) - (2d input) (2d helpers)) (init-2d) @@ -77,7 +75,7 @@ (list->array 2 sprites))) (define (key-down key mod unicode) - (cond ((any-equal? key (keycode escape) (keycode q)) + (cond ((any-equal? key 'escape 'q) (close-window) (quit)))) |