shithub: pokecrystal

Download patch

ref: d6bf2468a18cf66bb169b947798428301c53fae0
parent: 6cce67350186d4a0c37766eb5534e76adaad5a48
author: yenatch <[email protected]>
date: Sun May 28 19:23:11 EDT 2017

Add targets for the pokemon animation edge cases.

--- a/Makefile
+++ b/Makefile
@@ -43,8 +43,6 @@
 tools/%: tools/%.c
 	$(CC) -o $@ $<
 
-%.asm: ;
-
 $(crystal11_obj): dep = $(shell tools/scan_includes $(@D)/$*.asm)
 $(crystal11_obj): %11.o: %.asm $$(dep)
 	rgbasm -D CRYSTAL11 -o $@ $<
@@ -125,3 +123,23 @@
 
 gfx/trainers/%.2bpp: gfx/trainers/%.png
 	rgbgfx -h -o $@ $<
+
+
+# Terrible hacks to match animations. Delete these rules if you don't care about matching.
+
+# Dewgong has an unused tile id in its last frame. The tile itself is missing.
+gfx/pics/dewgong/frames.asm: gfx/pics/dewgong/front.animated.tilemap gfx/pics/dewgong/front.dimensions
+	tools/pokemon_animation -f $^ > $@
+	echo "	db \$$4d" >> $@
+
+# Lugia has two unused tile ids in its last frame. The tiles themselves are missing.
+gfx/pics/lugia/frames.asm: gfx/pics/lugia/front.animated.tilemap gfx/pics/lugia/front.dimensions
+	tools/pokemon_animation -f $^ > $@
+	echo "	db \$$5e, \$$59" >> $@
+
+# Girafarig has a redundant tile after the end. It is used in two frames, so it must be injected into the generated graphics.
+# This is more involved, so it's hacked into pokemon_animation_graphics.
+gfx/pics/girafarig/front.animated.2bpp: gfx/pics/girafarig/front.2bpp gfx/pics/girafarig/front.dimensions
+	tools/pokemon_animation_graphics --girafarig -o $@ $^
+gfx/pics/girafarig/front.animated.tilemap: gfx/pics/girafarig/front.2bpp gfx/pics/girafarig/front.dimensions
+	tools/pokemon_animation_graphics --girafarig -t $@ $^