From a54152cfea34f9411305d7ec783e6eb467616b00 Mon Sep 17 00:00:00 2001 From: Bill Rossi Date: Sat, 8 Mar 2025 13:30:17 -0500 Subject: [PATCH] Build images from scratch --- .gitignore | 4 +++- Makefile | 19 ++++++++++++++++--- img/enemy.png | Bin 793 -> 0 bytes img/player.png | Bin 1736 -> 0 bytes tilesets/test_tileset.png | Bin 201 -> 0 bytes 5 files changed, 19 insertions(+), 4 deletions(-) delete mode 100644 img/enemy.png delete mode 100644 img/player.png delete mode 100644 tilesets/test_tileset.png diff --git a/.gitignore b/.gitignore index 3e6e39a..a15c54b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ starship_futuretime_linux starship_futuretime_mac starship_futuretime_windows.exe *.zip -levels/*.csv \ No newline at end of file +levels/*.csv +img/*.png +tilesets/*.png \ No newline at end of file diff --git a/Makefile b/Makefile index 8523e15..8534bd1 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ WIN_LIB=-Llib -Iinclude -Wall -lraylib -lopengl32 -lgdi32 -lwinmm -lcomdlg32 -lo WIN_CFLAGS=-Wall -lraylib -lm -lpthread TILED=~/app/tiled +ASEPRITE=aseprite GAME=starship_futuretime @@ -15,9 +16,9 @@ ITCH_CHANNEL_LINUX=linux-x64 ITCH_CHANNEL_WINDOWS=windows-x64 ITCH_CHANNEL_MAC=mac -.PHONY: clean run butler_upload build_levels +.PHONY: clean run butler_upload build_levels build_images -run: $(GAME)_linux build_levels +run: $(GAME)_linux build_levels build_images SKIP_INTRO=1 ./$(GAME)_linux debug: $(GAME)_linux_dbg @@ -25,11 +26,21 @@ debug: $(GAME)_linux_dbg in_level_files := $(wildcard levels/*.tmx) out_level_files := $(foreach a, $(in_level_files), $(basename $(a)).csv) -build_levels: $(in_level_files) $(out_level_files) +build_levels: build_images $(in_level_files) $(out_level_files) levels/%.csv: levels/%.tmx tilesets/*.tsx $(TILED) --export-map $< $@ +in_images := $(wildcard img/*.aseprite) $(wildcard tilesets/*.aseprite) +out_images := $(foreach a, $(in_images), $(basename $(a)).png) +build_images: $(in_images) $(out_images) + +img/%.png: img/%.aseprite + $(ASEPRITE) -b $< --save-as $@ + +%.png: %.aseprite + $(ASEPRITE) -b $< --save-as $@ + $(GAME)_linux: *.c $(CC) *.c $(CFLAGS) -o $(GAME)_linux @@ -50,6 +61,8 @@ clean: rm -f ./$(GAME)_mac rm -f ./$(GAME)_mac.zip rm -f ./levels/*.csv + rm -f ./img/*.png + rm -f ./tilesets/*.png $(GAME)_linux.zip: $(GAME)_linux rm -f ./$(GAME)_linux.zip diff --git a/img/enemy.png b/img/enemy.png deleted file mode 100644 index f546e2b800ddcbd25db31cf351f095da122e22d5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 793 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZxy-8q?;3=B+{JzX3_ zD(1Ys6TNPgfe1suxs#HD$%QleS~Uyp^@P?e&s@>)_vW1Fq~s@f?tkzrRR;`7W>|m%w87rX6J&p z*Dl(5)k!?+3^2CZr}8Fu)*{Y5qM9tbJLR`=_lq9Ue7XKf`_Y+92G51eQa$f&WiaWP zx`^SxvG}^_D_$_&I%iTV(e~%XJ%wpc+PvJ;7+z<{s%2`OG`{}9HJhV)W79vC-}7$r z#adc1M@;Q|V}1QyemCorzhUqGoBW!;GcW(CU0=3f#IMKy>_kq9HdOx3n)+d*MQ`%? zgWMfAcC&cgoA!Ik#s3ctxhuYCzPX({ON6n5gWJLEqkUw7<_0b?PFo5%5=0nxZ9m7bZr&HwJ9aJUTemYd>VL8}*|WD? zwa%EKbN(Z{En0jNHOpVEKk?osZx#QAsb3ovz89|f*X-YWV(-sYZ`bzi?$rPJ^4{g( zA}{y5bM5cO?6oa9uB1@1rb^^&&%E$_{@9zuF3qT@bZVKFvMjZU-%>O^zh#;eSzlbHObm;b8pvcVZ&5af zWfYoO+8U*p)-)hXaZa(NLYJn~LeePZ48b56Zr2aH+h4FfcdvWyd7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