summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-09-26 21:10:14 -0400
committerDavid Thompson <dthompson2@worcester.edu>2014-09-26 21:10:14 -0400
commit11a5fa552c9fe39f0978a3df2aeb59cb171f37cf (patch)
tree75af9b5aa3153dd2355e81adfc17984a55700b43
parent18dea2e0191c1fa87a29d637f2f769c2d310c4d3 (diff)
sprite: Add anchor and color parameters to load-sprite.
* sly/sprite.scm (load-sprite): Add 'anchor' and 'color' parameters.
-rw-r--r--sly/sprite.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/sly/sprite.scm b/sly/sprite.scm
index b1f57bb..e717133 100644
--- a/sly/sprite.scm
+++ b/sly/sprite.scm
@@ -77,10 +77,12 @@ custom SHADER can be specified."
(vector s2 t2)
(vector s1 t2)))))))
-(define* (load-sprite file-name #:optional #:key (shader (load-default-shader)))
+(define* (load-sprite file-name #:optional #:key (shader (load-default-shader))
+ (anchor 'center) (color white))
"Return a sprite mesh for the texture loaded from FILE-NAME.
Optionally, a custom SHADER can be specified."
- (make-sprite (load-texture file-name) #:shader shader))
+ (make-sprite (load-texture file-name) #:shader shader
+ #:anchor anchor #:color color))
(define* (make-animated-sprite textures frame-duration #:optional #:key
(loop? #t)