aboutsummaryrefslogtreecommitdiff
path: root/data/Makefile
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-11-05 11:22:55 +0000
committerJuan J. Martinez <jjm@usebox.net>2023-11-05 11:31:28 +0000
commit2fbdf974338bde8576efdae40a819a76b2391033 (patch)
tree64d41a37470143f142344f9a439d96de3e7918c2 /data/Makefile
downloadkitsunes-curse-2fbdf974338bde8576efdae40a819a76b2391033.tar.gz
kitsunes-curse-2fbdf974338bde8576efdae40a819a76b2391033.zip
Initial import of the open source release
Diffstat (limited to 'data/Makefile')
-rw-r--r--data/Makefile94
1 files changed, 94 insertions, 0 deletions
diff --git a/data/Makefile b/data/Makefile
new file mode 100644
index 0000000..10d8d0d
--- /dev/null
+++ b/data/Makefile
@@ -0,0 +1,94 @@
+G=../generated
+GENERATED=$(G)/font.h $(G)/menubg.h $(G)/player.h $(G)/explo.h $(G)/splash.h \
+ $(G)/palette.h $(G)/tiles.h $(G)/stage.h $(G)/items.h \
+ $(G)/doors.h $(G)/platform.h $(G)/oni.h $(G)/ninja.h $(G)/spirit.h \
+ $(G)/vampire.h $(G)/flame.h $(G)/spider.h $(G)/demon.h $(G)/switch.h $(G)/fireball.h \
+ $(G)/cloud.h \
+ $(G)/songs_pak.h
+
+OUTPUT=../build
+
+export PATH:=../tools:$(PATH)
+
+all: $(OUTPUT)/loading.bin $(GENERATED)
+
+$(OUTPUT)/loading.bin: loading.png
+ png2crtc $< $(OUTPUT)/loading.scr 7 0
+ dump-pal.py $< $(OUTPUT)/pal.bin
+ echo -n "SCRX" > $(OUTPUT)/loading.bin
+ cat $(OUTPUT)/pal.bin >> $(OUTPUT)/loading.bin
+ apultra -v $(OUTPUT)/loading.scr $(OUTPUT)/loading.pak
+ cat $(OUTPUT)/loading.pak >> $(OUTPUT)/loading.bin
+
+$(G)/songs_pak.h: songs_pak.akl
+ apultra -v $< $(OUTPUT)/songs_pak.ap
+ bin2h.py $(OUTPUT)/songs_pak.ap songs_pak > $@
+
+$(G)/font.h: font.png
+ img2sprite.py --height 8 --width 4 -i spfont $< > $@
+
+$(G)/menubg.h: menu.png
+ img2sprite.py --height 50 --width 88 -b $< > $(OUTPUT)/menubg.bin
+ apultra -v $(OUTPUT)/menubg.bin $(OUTPUT)/menu.ap
+ bin2h.py $(OUTPUT)/menu.ap menubg > $@
+
+$(G)/player.h: player.png
+ img2sprite.py -i player --transparent-color 7 --height 24 $< > $@
+
+$(G)/explo.h: explo.png
+ img2sprite.py -i explo --transparent-color 7 --height 16 $< > $@
+
+$(G)/splash.h: splash.png
+ img2sprite.py -i splash --transparent-color 3 --height 16 $< > $@
+
+$(G)/tiles.h: tiles.png
+ img2sprite.py -i bgtiles --height 8 $< > $@
+
+$(G)/stage.h: stage.json
+ map.py --max-ents 9 --aplib $< map > $@
+
+$(G)/items.h: items.png
+ img2sprite.py -i items --transparent-color 7 --height 16 $< > $@
+
+$(G)/doors.h: doors.png
+ img2sprite.py -i doors --transparent-color 5 --height 8 $< > $@
+
+$(G)/platform.h: platform.png
+ img2sprite.py -i platform --transparent-color 1 --height 8 $< > $@
+
+$(G)/oni.h: oni.png
+ img2sprite.py -i oni --transparent-color 1 --height 16 $< > $@
+
+$(G)/ninja.h: ninja.png
+ img2sprite.py -i ninja --transparent-color 7 --height 24 $< > $@
+
+$(G)/spirit.h: spirit.png
+ img2sprite.py -i spirit --transparent-color 7 --height 24 $< > $@
+
+$(G)/vampire.h: vampire.png
+ img2sprite.py -i vampire --transparent-color 7 --height 16 $< > $@
+
+$(G)/flame.h: flame.png
+ img2sprite.py -i flame --transparent-color 7 --height 16 $< > $@
+
+$(G)/spider.h: spider.png
+ img2sprite.py -i spider --transparent-color 7 --height 8 $< > $@
+
+$(G)/demon.h: demon.png
+ img2sprite.py -i demon --transparent-color 11 --height 24 $< > $@
+
+$(G)/fireball.h: fireball.png
+ img2sprite.py -i fireball --transparent-color 7 --height 8 $< > $@
+
+$(G)/cloud.h: cloud.png
+ img2sprite.py -i cloud --transparent-color 7 --height 24 $< > $@
+
+$(G)/switch.h: switch.png
+ img2sprite.py -i switch_sprite --transparent-color 7 --height 16 $< > $@
+
+$(G)/palette.h: tiles.png
+ dump-pal.py --header --hardware $< pal_hw > $@
+
+.PHONY: clean all
+clean:
+ rm -f $(GENERATED)