diff options
author | David Thompson <dthompson2@worcester.edu> | 2013-06-12 22:27:02 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2013-06-12 22:27:02 -0400 |
commit | a86ebd5bed737d5d705666d020953c0879ae1bdf (patch) | |
tree | bc85a97ff7c0c713b3a7de08ccde5d97763df0b1 | |
parent | de7af3c3fb5c7993bcf3da836362626219a0645e (diff) |
Add basic docstrings to sprite module.
-rw-r--r-- | 2d/sprite.scm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/2d/sprite.scm b/2d/sprite.scm index 78bad6a..0f18dd7 100644 --- a/2d/sprite.scm +++ b/2d/sprite.scm @@ -55,13 +55,16 @@ (rotation sprite-rotation set-sprite-rotation!)) (define (set-sprite-scale! sprite scale) + "Sets sprite scale-x and scale-y to the same value." (set-sprite-scale-x! sprite scale) (set-sprite-scale-y! sprite scale)) (define (load-sprite filename) + "Loads a sprite from file with default position, scaling, and rotation values." (make-sprite (load-texture filename) 0 0 1 1 0)) (define (draw-sprite sprite) + "Renders a sprite." (let* ((texture (sprite-texture sprite)) (w (texture-width texture)) (h (texture-height texture))) |