summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2013-11-03 17:38:22 -0500
committerDavid Thompson <dthompson2@worcester.edu>2013-11-03 17:38:22 -0500
commit14eb9443af61ed8f601fbe6e8fe3fc075629c4fa (patch)
tree6b8ea230f5230e5ca6bc5d9d58738b15c0f78223
parentd1ecb21fca03cdd0e9360a4f1b88c7e05a9354e2 (diff)
Revert "Export scene type tag."
This reverts commit d1ecb21fca03cdd0e9360a4f1b88c7e05a9354e2.
-rw-r--r--examples/animation.scm17
1 files changed, 9 insertions, 8 deletions
diff --git a/examples/animation.scm b/examples/animation.scm
index a262d9e..92da549 100644
--- a/examples/animation.scm
+++ b/examples/animation.scm
@@ -8,7 +8,7 @@
(2d vector2)
(2d window))
-(define (make-demo-animation)
+(define (demo-animation)
"Load a texture, split it into 64x64 tiles, and build an animated
sprite out of it."
(let* ((tiles (load-tileset "images/princess.png" 64 64))
@@ -22,17 +22,18 @@ sprite out of it."
(tileset-ref tiles 26))))
(make-animation frames 6 #t)))
-(define animation-scene
+(define-stage-variable sprite
+ (make-sprite (demo-animation)
+ #:position (vector2 320 240)))
+
+(define demo-scene
(make-scene
- "Animation"
- #:init (lambda ()
- (make-sprite (make-demo-animation)
- #:position (vector2 320 240)))
- #:draw draw-sprite))
+ #:draw (lambda ()
+ (draw-sprite (sprite)))))
(define animation-demo
(make-game
#:title "Animation"
- #:first-scene animation-scene))
+ #:first-scene demo-scene))
(run-game animation-demo)