summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-01-18 22:33:03 -0500
committerDavid Thompson <dthompson2@worcester.edu>2015-01-18 22:33:03 -0500
commit01c2671b754e2f0c2a16d03102053b8aff8dda75 (patch)
treee14229932a9bc4f9c86ec4f48162a30e5877a5a5
parent6c6907fd9c8dbc6d9c7663bd40120720f29044c7 (diff)
render: tileset: Fix column calculation.
* sly/render/tileset.scm (split-texture): Use texture height in columns calculation, not width.
-rw-r--r--sly/render/tileset.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/sly/render/tileset.scm b/sly/render/tileset.scm
index 6802cbb..e8058e8 100644
--- a/sly/render/tileset.scm
+++ b/sly/render/tileset.scm
@@ -59,7 +59,7 @@ TEXTURE before the first tile begins."
(let* ((tw (texture-width texture))
(th (texture-height texture))
(rows (/ (- tw margin) (+ width spacing)))
- (columns (/ (- tw margin) (+ height spacing))))
+ (columns (/ (- th margin) (+ height spacing))))
(vector-ec (: y rows) (: x columns) (build-tile x y))))
(define* (make-tileset texture width height