summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--2d/sprite.scm12
1 files changed, 7 insertions, 5 deletions
diff --git a/2d/sprite.scm b/2d/sprite.scm
index 13bd496..aa86448 100644
--- a/2d/sprite.scm
+++ b/2d/sprite.scm
@@ -60,15 +60,17 @@
(set-sprite-scale-x! sprite scale)
(set-sprite-scale-y! sprite scale))
-(define* (make-sprite texture #:optional (x 0) (y 0) (scale-x 1) (scale-y 1)
- (rotation 0) (color '(1 1 1)))
+(define* (make-sprite texture #:optional #:key (x 0) (y 0)
+ (scale-x 1) (scale-y 1) (rotation 0) (color '(1 1 1)))
"Makes a new sprite object."
(%make-sprite texture x y scale-x scale-y rotation color))
-(define* (load-sprite filename #:optional (x 0) (y 0) (scale-x 1) (scale-y 1)
- (rotation 0) (color '(1 1 1)))
+(define* (load-sprite filename #:optional #:key (x 0) (y 0)
+ (scale-x 1) (scale-y 1) (rotation 0) (color '(1 1 1)))
"Loads a sprite from file."
- (make-sprite (load-texture filename) x y scale-x scale-y rotation color))
+ (make-sprite (load-texture filename) #:x x #:y y
+ #:scale-x scale-x #:scale-y scale-y
+ #:rotation rotation #:color color))
(define (draw-sprite sprite)
"Renders a sprite."