From 01c2671b754e2f0c2a16d03102053b8aff8dda75 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 18 Jan 2015 22:33:03 -0500 Subject: render: tileset: Fix column calculation. * sly/render/tileset.scm (split-texture): Use texture height in columns calculation, not width. --- sly/render/tileset.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3