aboutsummaryrefslogtreecommitdiff
path: root/light-client/makefile
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-07-15 19:06:21 +0200
committermetamuffin <metamuffin@disroot.org>2024-07-15 19:06:21 +0200
commitc82a2bf203f3495865fd40527fa41a9e32f7aa9c (patch)
treece4c279923999a22e5cc4c5b6602041615931488 /light-client/makefile
parenta4541c50086cde2dda7a72025173e082dd56d8aa (diff)
downloadhurrycurry-c82a2bf203f3495865fd40527fa41a9e32f7aa9c.tar
hurrycurry-c82a2bf203f3495865fd40527fa41a9e32f7aa9c.tar.bz2
hurrycurry-c82a2bf203f3495865fd40527fa41a9e32f7aa9c.tar.zst
rename textures dir
Diffstat (limited to 'light-client/makefile')
-rw-r--r--light-client/makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/light-client/makefile b/light-client/makefile
new file mode 100644
index 00000000..39199caa
--- /dev/null
+++ b/light-client/makefile
@@ -0,0 +1,21 @@
+
+ALL_TA = $(shell find textures/tiles -name '*.ta')
+ALL_PNG = $(shell find textures/tiles -name '*.png')
+ALL_TA_IMPORT = $(patsubst %.import.png,%.ta,$(shell find textures/tiles -name '*.import.png'))
+ALL_PNG_EXPORT = $(patsubst %.ta,%.png,$(ALL_TA))
+
+.PHONY: tex_pack tex_export tex_import clean
+tex_pack: textures/atlas.ta
+tex_import: $(ALL_TA_IMPORT)
+tex_export: $(ALL_PNG_EXPORT)
+clean:
+ rm -f $(ALL_PNG)
+ rm -f textures/atlas.ta textures/atlas.meta.csv
+
+%.ta: %.import.png
+ ../target/release/tex_import $< $@
+%.png: %.ta
+ ../target/release/tex_export $< $@
+
+textures/atlas.ta textures/atlas.meta.csv: $(ALL_TA)
+ ../target/release/tex_pack textures/atlas.ta textures/atlas.meta.csv $^