From 6ac84e6ac7e83ea840a92747706bc0771cc4c829 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 24 Jan 2016 20:01:27 -0500 Subject: sprite: Add null-sprite. * sly/render/sprite.scm (null-sprite): New variable. --- sly/render/sprite.scm | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.3