diff options
author | David Thompson <dthompson2@worcester.edu> | 2016-01-24 20:01:27 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2016-01-24 20:01:27 -0500 |
commit | 6ac84e6ac7e83ea840a92747706bc0771cc4c829 (patch) | |
tree | e1926071c09f98993c83ab64aa7d7316a7a4f57b | |
parent | 2e7b9a36b369938bcc5a488449b9759a1f700024 (diff) |
sprite: Add null-sprite.
* sly/render/sprite.scm (null-sprite): New variable.
-rw-r--r-- | sly/render/sprite.scm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sly/render/sprite.scm b/sly/render/sprite.scm index c0ad5bb..40c2115 100644 --- a/sly/render/sprite.scm +++ b/sly/render/sprite.scm @@ -35,6 +35,7 @@ #:use-module (sly render utils) #:use-module (sly math vector) #:export (make-sprite + null-sprite load-sprite sprite? sprite-texture @@ -47,6 +48,9 @@ (texture sprite-texture) (mesh sprite-mesh)) +(define null-sprite + (%make-sprite null-texture null-mesh)) + (define* (make-sprite texture #:key (anchor 'center)) "Create a sprite that displays the image in TEXTURE. The size of the mesh is the size of TEXTURE in pixels. ANCHOR defines the origin |