summaryrefslogtreecommitdiff
path: root/examples/particles.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/particles.scm
parente719d1e988617f623fac29c1bd347785833c5f71 (diff)
Replace old vector module with new vector2 module.
Diffstat (limited to 'examples/particles.scm')
-rw-r--r--examples/particles.scm12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/particles.scm b/examples/particles.scm
index 5251ac0..dfe3322 100644
--- a/examples/particles.scm
+++ b/examples/particles.scm
@@ -5,7 +5,7 @@
(2d helpers)
(2d sprite)
(2d texture)
- (2d vector)
+ (2d vector2)
(2d window))
(set! *random-state* (random-state-from-platform))
@@ -35,7 +35,7 @@
(open-window window-width window-height)
-(define stars (load-sprite "images/stars.png" #:anchor #(0 0)))
+(define stars (load-sprite "images/stars.png" #:anchor null-vector2))
(define particle-image (load-texture "images/bullet.png"))
(define particle-width (texture-width particle-image))
(define particle-height (texture-height particle-image))
@@ -44,10 +44,10 @@
(list-tabulate particle-count
(lambda (n)
(make-particle (make-sprite particle-image)
- (vector (random window-width)
- (random window-height))
- (vector (* (random:normal) 1)
- (* (random:normal) 1))))))
+ (vector2 (random window-width)
+ (random window-height))
+ (vector2 (* (random:normal) 1)
+ (* (random:normal) 1))))))
(define batch (make-sprite-batch (* particle-count 4)))
(define (draw-particles particles)