Make sprites for NAT entries with images

This commit is contained in:
2021-09-18 16:42:28 -06:00
parent 547dad9e66
commit b8372420f0
6 changed files with 83 additions and 4 deletions

View File

@@ -0,0 +1,11 @@
(loadFrom "nat-archive-tool" "src/nat/Lib.kiss")
(defNew [:String positionKey
&prop :Archive archive
&prop :Entry e]
(let [images (readComponent archive e Images)]
(case (dictGet (readComponent archive e Positions) positionKey)
((object x x y y z z)
(super x y)))
(.onComplete (BitmapData.loadFromFile (joinPath archive.archiveDir "files" (nth images.imageFiles images.pinnedImageIndex)))
->bitmapData (loadGraphic bitmapData))))