From 3320c39a743c66b5b5e33d8b2c8b1823e3f71dd1 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 18 Jan 2015 22:40:06 -0500 Subject: render: tileset: Fix split-texture again. * sly/render/tileset.scm (split-texture): Swap rows and columns calculation. --- sly/render/tileset.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sly/render/tileset.scm b/sly/render/tileset.scm index e8058e8..9e136fb 100644 --- a/sly/render/tileset.scm +++ b/sly/render/tileset.scm @@ -58,8 +58,8 @@ TEXTURE before the first tile begins." (let* ((tw (texture-width texture)) (th (texture-height texture)) - (rows (/ (- tw margin) (+ width spacing))) - (columns (/ (- th margin) (+ height spacing)))) + (rows (/ (- th margin) (+ height spacing))) + (columns (/ (- tw margin) (+ width spacing)))) (vector-ec (: y rows) (: x columns) (build-tile x y)))) (define* (make-tileset texture width height -- cgit v1.2.3