summaryrefslogtreecommitdiff
path: root/examples/coroutine.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@member.fsf.org>2013-08-27 18:22:06 -0400
committerDavid Thompson <dthompson@member.fsf.org>2013-08-27 18:22:06 -0400
commit5841889f53465b4096830f3778b209063e1fe8bc (patch)
tree724087d4dbfeb08349401d7ff19e0f099a550667 /examples/coroutine.scm
parente719d1e988617f623fac29c1bd347785833c5f71 (diff)
Replace old vector module with new vector2 module.
Diffstat (limited to 'examples/coroutine.scm')
-rw-r--r--examples/coroutine.scm11
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/coroutine.scm b/examples/coroutine.scm
index 250cdbb..0a4d000 100644
--- a/examples/coroutine.scm
+++ b/examples/coroutine.scm
@@ -3,7 +3,8 @@
(2d window)
(2d helpers)
(2d agenda)
- (2d coroutine))
+ (2d coroutine)
+ (2d vector2))
(define window-width 800)
(define window-height 600)
@@ -13,8 +14,8 @@
(define sprite
(load-sprite "images/sprite.png"
- #:position (vector (/ window-width 2)
- (/ window-height 2))))
+ #:position (vector2 (/ window-width 2)
+ (/ window-height 2))))
(define (key-down key mod unicode)
(cond ((any-equal? key 'escape 'q)
@@ -34,8 +35,8 @@
(agenda-schedule
(colambda ()
(while #t
- (set-sprite-position! sprite (vector (random window-width)
- (random window-height)))
+ (set-sprite-position! sprite (vector2 (random window-width)
+ (random window-height)))
(wait 60))))
(run-game-loop)