summaryrefslogtreecommitdiff
path: root/examples/text.scm
diff options
context:
space:
mode:
Diffstat (limited to 'examples/text.scm')
-rw-r--r--examples/text.scm17
1 files changed, 4 insertions, 13 deletions
diff --git a/examples/text.scm b/examples/text.scm
index 0903a90..40b7653 100644
--- a/examples/text.scm
+++ b/examples/text.scm
@@ -3,21 +3,12 @@
(chickadee render font)
(chickadee sdl))
-(define font #f)
-
-(define (load)
- (set! font (load-font "fonts/good_neighbors_starling.xml")))
-
(define (draw alpha)
- (draw-text font "(draw-text font \"Hello, world!\" (vec2 100.0 200.0))"
+ (draw-text "(draw-text font \"Hello, world!\" (vec2 100.0 200.0))"
#v(100.0 200.0))
- (draw-text font "Chickadee is a game development toolkit for Guile Scheme."
+ (draw-text "Chickadee is a game development toolkit for Guile Scheme."
#v(100.0 150.0))
- (draw-text font "The quick brown fox jumps over the lazy dog"
+ (draw-text "The quick brown fox jumps over the lazy dog"
#v(100.0 100.0)))
-(define (key-press key scan modifiers repeat?)
- (when (eq? key 'q)
- (abort-game)))
-
-(run-game/sdl #:load load #:draw draw #:key-press key-press)
+(run-game/sdl #:draw draw)