diff options
author | BigBrotherNii <nicochr1004@gmail.com> | 2024-07-16 23:47:51 +0200 |
---|---|---|
committer | BigBrotherNii <nicochr1004@gmail.com> | 2024-07-16 23:47:51 +0200 |
commit | cd679169f8e049b3f3ce890c97d62fa72a4e4eb5 (patch) | |
tree | 4efaf40f3c818d79be881f81b7d8fa254861731d /pixel-client/makefile | |
parent | 2f9e2758199ff5148d7f90478be45aa122d6c860 (diff) | |
parent | df418c0d3fec83fc1cbe0dabc6d4b9dfbdbcbabb (diff) | |
download | hurrycurry-cd679169f8e049b3f3ce890c97d62fa72a4e4eb5.tar hurrycurry-cd679169f8e049b3f3ce890c97d62fa72a4e4eb5.tar.bz2 hurrycurry-cd679169f8e049b3f3ce890c97d62fa72a4e4eb5.tar.zst |
trying to merch qwq
Diffstat (limited to 'pixel-client/makefile')
-rw-r--r-- | pixel-client/makefile | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/pixel-client/makefile b/pixel-client/makefile new file mode 100644 index 00000000..6a56fc62 --- /dev/null +++ b/pixel-client/makefile @@ -0,0 +1,37 @@ + +SPRITES = $(shell find assets/sprites -name '*.ta') +SPRITES_PNG = $(patsubst %.ta,%.png,$(SPRITES)) + +TEXTURES = $(shell find assets/textures -name '*.ta') +TEXTURES_PNG = $(patsubst %.ta,%.png,$(TEXTURES)) +TEXTURES_IMPORT_PNG = $(patsubst %.import.png,%.ta,$(shell find assets/textures -name '*.import.png')) + +PNG = $(shell find assets/textures -name '*.png') + +.PHONY: tex_pack tex_export tex_import clean +tex_pack: assets/atlas.ta +tex_import: $(TEXTURES_IMPORT_PNG) +tex_export: $(TEXTURES_PNG) $(SPRITES_PNG) assets/atlas.png +clean: + rm -f $(PNG) + rm -fr assets/sprites + rm -f assets/atlas.ta assets/atlas.meta.csv + + +IMPORT = ../target/release/tex_import +EXPORT = ../target/release/tex_export +PACK = ../target/release/tex_pack +COMPOSE = ../target/release/tex_compose + +%.ta: %.import.png + $(IMPORT) $< $@ +%.png: %.ta + ../target/release/tex_export $< $@ + +assets/sprites/%/all: assets/%.ini $(TEXTURES) + @mkdir -p $(basename $@) + ../target/release/tex_compose $< assets/textures $(basename $@) + @touch $@ + +assets/atlas.ta assets/atlas.meta.csv: assets/sprites/items/all assets/sprites/tiles/all assets/sprites/misc/all + ../target/release/tex_pack assets/atlas.ta assets/atlas.meta.csv $(SPRITES) |