summaryrefslogtreecommitdiff
path: root/examples/text.scm
diff options
context:
space:
mode:
Diffstat (limited to 'examples/text.scm')
-rw-r--r--examples/text.scm12
1 files changed, 4 insertions, 8 deletions
diff --git a/examples/text.scm b/examples/text.scm
index 37ac22c..fd299b7 100644
--- a/examples/text.scm
+++ b/examples/text.scm
@@ -15,12 +15,8 @@
(draw-text font "The quick brown fox jumps over the lazy dog"
(vec2 100.0 100.0)))
-(add-hook! load-hook load)
-(add-hook! draw-hook draw)
-(add-hook! quit-hook abort-game)
-(add-hook! key-press-hook
- (lambda (key scan modifiers repeat?)
- (when (eq? key 'q)
- (abort-game))))
+(define (key-press key scan modifiers repeat?)
+ (when (eq? key 'q)
+ (abort-game)))
-(run-game)
+(run-game/sdl #:load load #:draw draw #:key-press key-press)