diff options
-rw-r--r-- | starling/node-2d.scm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/starling/node-2d.scm b/starling/node-2d.scm index b9d5e2b..c71d4e8 100644 --- a/starling/node-2d.scm +++ b/starling/node-2d.scm @@ -80,7 +80,7 @@ <sprite> texture texcoords - rect + source-rect blend-mode tint @@ -470,12 +470,12 @@ (define-method (texcoords (sprite <base-sprite>)) (texture-gl-tex-rect (asset-ref (texture sprite)))) -(define-method (rect (sprite <base-sprite>)) +(define-method (source-rect (sprite <base-sprite>)) (texture-gl-rect (asset-ref (texture sprite)))) (define-method (render (sprite <base-sprite>) alpha) (let* ((tex (asset-ref (texture sprite))) - (rect (rect sprite)) + (rect (source-rect sprite)) (batch (batch sprite)) (tint (tint sprite)) (matrix (world-matrix sprite))) @@ -495,14 +495,14 @@ (define-class <sprite> (<base-sprite>) (texture #:accessor texture #:init-keyword #:texture) (texcoords #:init-keyword #:texcoords #:init-form #f) - (rect #:init-keyword #:rect #:init-form #f)) + (source-rect #:init-keyword #:source-rect #:init-form #f)) (define-method (texcoords (sprite <sprite>)) (or (slot-ref sprite 'texcoords) (next-method))) -(define-method (rect (sprite <sprite>)) - (or (slot-ref sprite 'rect) +(define-method (source-rect (sprite <sprite>)) + (or (slot-ref sprite 'source-rect) (next-method))) |