From 4a7d9c49f3454a01487ab3661e9d9cd9d6850a7e Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 17 Jan 2018 13:32:00 -0500 Subject: render: texture: Fix split-texture. * chickadee/render/texture.scm (split-texture): Width and height variables need to contain exact numbers. --- chickadee/render/texture.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chickadee/render/texture.scm b/chickadee/render/texture.scm index 5c8ea7b..63f5eaa 100644 --- a/chickadee/render/texture.scm +++ b/chickadee/render/texture.scm @@ -289,8 +289,8 @@ around its border. This type of texture atlas layout is very common for tile map terrain." (let* ((r (texture-rect texture)) - (w (rect-width r)) - (h (rect-height r)) + (w (inexact->exact (rect-width r))) + (h (inexact->exact (rect-height r))) (sw (/ tile-width w)) (th (/ tile-height h)) (rows (/ (- h margin) (+ tile-height spacing))) -- cgit v1.2.3