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 f546e2b..0000000 Binary files a/img/enemy.png and /dev/null differ diff --git a/img/player.png b/img/player.png deleted file mode 100644 index 29e5f1f..0000000 Binary files a/img/player.png and /dev/null differ diff --git a/tilesets/test_tileset.png b/tilesets/test_tileset.png deleted file mode 100644 index 205989d..0000000 Binary files a/tilesets/test_tileset.png and /dev/null differ