diff options
author | Colin Okay <okay@toyful.space> | 2020-04-02 09:50:13 -0500 |
---|---|---|
committer | Colin Okay <cbeok@protonmail.com> | 2020-10-12 09:37:42 -0500 |
commit | cbfd8734aaf009a2dc323d08866004ccb8f4c265 (patch) | |
tree | 9d3134f69a6583d5e6fff0083d9980ecb1b4da47 | |
parent | bd92d78bd17e4c5bf86ca5b29c9367c2f2ece01e (diff) |
adjustment to how names are formatted
-rwxr-xr-x | imbricate.ros | 26 |
1 files changed, 17 insertions, 9 deletions
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" |