summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2017-01-22 21:13:35 -0500
committerDavid Thompson <dthompson2@worcester.edu>2017-01-22 21:13:35 -0500
commit7a9b075864a8fe7025bc5de867583ed97c4a22ba (patch)
tree0111fb2d027cb61ee8e2cd31e8e0ab3df8b08a36 /README
parent44ba82badf9425dcd66440c3701d683d8b64a994 (diff)
README: Fix example code.
Diffstat (limited to 'README')
-rw-r--r--README12
1 files changed, 8 insertions, 4 deletions
diff --git a/README b/README
index daa87c3..45c3d33 100644
--- a/README
+++ b/README
@@ -7,17 +7,21 @@
Chickadee is a game development toolkit for Guile Scheme.
#+BEGIN_SRC scheme
- (use-modules (chickadee))
+ (use-modules (chickadee)
+ (chickadee math vector))
(define sprite #f)
(define (load)
(set! sprite (load-image "chickadee.png")))
- (define (render alpha)
- (draw-sprite sprite (vector2 320 240)))
+ (define (draw alpha)
+ (draw-sprite sprite (vec2 320.0 240.0)))
- (run-game #:load load #:render render)
+ (add-hook! load-hook load)
+ (add-hook! draw-hook draw)
+
+ (run-game)
#+END_SRC
* Features