From cbfd8734aaf009a2dc323d08866004ccb8f4c265 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Thu, 2 Apr 2020 09:50:13 -0500 Subject: adjustment to how names are formatted --- imbricate.ros | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'imbricate.ros') diff --git a/imbricate.ros b/imbricate.ros index 961f958..3e014f9 100755 --- a/imbricate.ros +++ b/imbricate.ros @@ -73,7 +73,9 @@ exec ros -Q -- $0 "$@" (copy-into-img tilesheet img (getf spec :x) (getf spec :y)) - (error (e) (push (cons :bad-image-format (getf spec :path)) + (error (e) (push (list :bad-image-format + (array-dimensions img) + (getf spec :path)) *bad-images*))))) tilesheet))) @@ -90,14 +92,20 @@ exec ros -Q -- $0 "$@" (defun packlist->tile-index (packlist) - "renames the path1 in the packlist to a nicer name for referring toa tile location" - (mapcar #'(lambda (pl) - (remf pl :img) - (setf (getf pl :name) - (substitute #\. #\/ (namestring (getf pl :path)))) - (remf pl :path) - pl) - packlist)) + "renames the path in the packlist to a nicer name for referring toa tile location" + (let ((strip-index (1+ (length (sb-posix:getcwd))))) + (mapcar #'(lambda (pl) + (remf pl :img) + (setf (getf pl :name) + (substitute #\. #\/ (subseq (namestring (getf pl :path)) + strip-index))) + (setf (getf pl :name) + (subseq (getf pl :name) + 0 + (search "." (getf pl :name) :from-end t))) + (remf pl :path) + pl) + packlist))) (defun write-tile-index (tile-index file-path) "saves tile-index to file-path as a standard lisp object" -- cgit v1.2.3