diff options
author | David Thompson <dthompson2@worcester.edu> | 2017-01-22 21:13:35 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2017-01-22 21:13:35 -0500 |
commit | 7a9b075864a8fe7025bc5de867583ed97c4a22ba (patch) | |
tree | 0111fb2d027cb61ee8e2cd31e8e0ab3df8b08a36 | |
parent | 44ba82badf9425dcd66440c3701d683d8b64a994 (diff) |
README: Fix example code.
-rw-r--r-- | README | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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 |