summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Okay <cbeok@protonmail.com>2021-08-13 12:29:20 -0500
committerColin Okay <cbeok@protonmail.com>2021-08-13 12:29:20 -0500
commita439cb27a908d1013de67f180200ba27083c903a (patch)
tree047d02084e5951353eedfd6f226bc289c8693da5
parent71c0db335ee9801e56a8c18d7db6bcf40b8b2ac3 (diff)
fixed bug in height/width switching
-rw-r--r--build.lisp3
-rw-r--r--imbricate.lisp8
2 files changed, 6 insertions, 5 deletions
diff --git a/build.lisp b/build.lisp
index 4552239..e4ed845 100644
--- a/build.lisp
+++ b/build.lisp
@@ -9,7 +9,8 @@
#+sbcl
(progn
- (sb-ext:save-lisp-and-die #p"imbricate" :toplevel #'imbricate.run:main :executable t :compression t))
+ (sb-ext:save-lisp-and-die #p"imbricate" :toplevel #'imbricate.run:main :executable t; :compression t
+ ))
#+ecl
(progn
diff --git a/imbricate.lisp b/imbricate.lisp
index 7fe10a7..d1736a2 100644
--- a/imbricate.lisp
+++ b/imbricate.lisp
@@ -154,13 +154,13 @@ a compact logical 2d plane"
(defun render-sheet (plan)
"Generates and returns a single image from a plan."
- (let ((sheet (opticl:make-8-bit-rgba-image (rect-width plan) (rect-height plan))))
+ (let ((sheet (opticl:make-8-bit-rgba-image (rect-height plan) (rect-width plan))))
(dolist (tile (positioned plan) sheet)
(with-slots (x y width height data) tile
(dotimes (px width)
(dotimes (py height)
- (setf (opticl:pixel sheet (+ x px) (+ y py) )
- (opticl:pixel data px py ))))))))
+ (setf (opticl:pixel sheet (+ y py) (+ x px) )
+ (opticl:pixel data py px ))))))))
(defun make-sheet-info (plan)
@@ -172,7 +172,7 @@ a compact logical 2d plane"
(opticl:convert-image-to-rgba
(opticl:read-png-file path))))
- (opticl:with-image-bounds (w h) data
+ (opticl:with-image-bounds (h w) data
(make-instance 'tile
:path path
:data data