summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2018-12-13 08:17:29 -0500
committerDavid Thompson <dthompson2@worcester.edu>2018-12-13 08:17:29 -0500
commit07afacff3dcf1a5dbe1c0ff87a03d56dee524fa3 (patch)
tree5552000085f25b4210721c682ce9f5d3b5f2d600
parent627ff41326679665589de5cf984f8eac3d4053a3 (diff)
render: sprite: Use set-vec2! where convenient.
* chickadee/render/sprite (sprite-batch-add!): Use new set-vec2! procedure.
-rw-r--r--chickadee/render/sprite.scm12
1 files changed, 4 insertions, 8 deletions
diff --git a/chickadee/render/sprite.scm b/chickadee/render/sprite.scm
index 0f6419c..ccb731c 100644
--- a/chickadee/render/sprite.scm
+++ b/chickadee/render/sprite.scm
@@ -254,14 +254,10 @@ void main (void) {
(t1 (rect-y texture-region))
(s2 (+ (rect-x texture-region) (rect-width texture-region)))
(t2 (+ (rect-y texture-region) (rect-height texture-region))))
- (set-vec2-x! world1 local-x1)
- (set-vec2-y! world1 local-y1)
- (set-vec2-x! world2 local-x2)
- (set-vec2-y! world2 local-y1)
- (set-vec2-x! world3 local-x2)
- (set-vec2-y! world3 local-y2)
- (set-vec2-x! world4 local-x1)
- (set-vec2-y! world4 local-y2)
+ (set-vec2! world1 local-x1 local-y1)
+ (set-vec2! world2 local-x2 local-y1)
+ (set-vec2! world3 local-x2 local-y2)
+ (set-vec2! world4 local-x1 local-y2)
(when world-matrix
(transform! world-matrix world1)
(transform! world-matrix world2)