diff options
author | David Thompson <dthompson2@worcester.edu> | 2018-01-17 13:32:00 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2018-01-17 13:32:00 -0500 |
commit | 4a7d9c49f3454a01487ab3661e9d9cd9d6850a7e (patch) | |
tree | 491777c612f8b45c4326c4a1962acaf12578de02 | |
parent | 5d68117d264bbaa0c138a656d44d4c684f532729 (diff) |
render: texture: Fix split-texture.
* chickadee/render/texture.scm (split-texture): Width and height
variables need to contain exact numbers.
-rw-r--r-- | chickadee/render/texture.scm | 4 |
1 files 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))) |