diff options
author | Boutade <thegoofist@protonmail.com> | 2020-04-02 09:50:13 -0500 |
---|---|---|
committer | Boutade <thegoofist@protonmail.com> | 2020-04-02 09:50:13 -0500 |
commit | c133e679f06c1151c466e5660fc82c4f56df7241 (patch) | |
tree | 9d3134f69a6583d5e6fff0083d9980ecb1b4da47 /imbricate.ros | |
parent | a8d2adf50c2b1c28c4bcf4564c49327b57cfed5b (diff) |
adjustment to how names are formatted
Diffstat (limited to 'imbricate.ros')
-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" |