render: sprite: Use set-vec2! where convenient.
authorDavid Thompson <dthompson2@worcester.edu>
Thu, 13 Dec 2018 13:17:29 +0000 (08:17 -0500)
committerDavid Thompson <dthompson2@worcester.edu>
Thu, 13 Dec 2018 13:17:29 +0000 (08:17 -0500)
* chickadee/render/sprite (sprite-batch-add!): Use new set-vec2!
procedure.

chickadee/render/sprite.scm

index 0f6419c..ccb731c 100644 (file)
@@ -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)