From 5841889f53465b4096830f3778b209063e1fe8bc Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 27 Aug 2013 18:22:06 -0400 Subject: Replace old vector module with new vector2 module. --- examples/animation.scm | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'examples/animation.scm') diff --git a/examples/animation.scm b/examples/animation.scm index d00a9df..0e58b8e 100644 --- a/examples/animation.scm +++ b/examples/animation.scm @@ -2,8 +2,8 @@ (2d game-loop) (2d helpers) (2d sprite) - (2d texture) - (2d vector) + (2d tileset) + (2d vector2) (2d window)) (define window-width 800) @@ -28,21 +28,21 @@ ;; Load a texture, split it into 64x64 tiles, and build an animated ;; sprite out of it. (define animation - (let* ((tiles (split-texture (load-texture "images/princess.png") 64 64)) - (frames (vector (vector-ref tiles 19) - (vector-ref tiles 20) - (vector-ref tiles 21) - (vector-ref tiles 22) - (vector-ref tiles 23) - (vector-ref tiles 24) - (vector-ref tiles 25) - (vector-ref tiles 26)))) + (let* ((tiles (load-tileset "images/princess.png" 64 64)) + (frames (vector (tileset-ref tiles 19) + (tileset-ref tiles 20) + (tileset-ref tiles 21) + (tileset-ref tiles 22) + (tileset-ref tiles 23) + (tileset-ref tiles 24) + (tileset-ref tiles 25) + (tileset-ref tiles 26)))) (make-animation frames 6 #t))) (define sprite (make-sprite animation - #:position (vector (/ window-width 2) - (/ window-height 2)))) + #:position (vector2 (/ window-width 2) + (/ window-height 2)))) (run-game-loop) -- cgit v1.2.3