Allow png->lz compression in the build process

To enable, append '${IMGFILES}' to line 22:
pokecrystal.o: pokecrystal.asm constants.asm wram.asm ${TEXTFILES} ${IMGFILES}

Also append '${LZFILES}' to line 48:
	rm -f main.tx pokecrystal.o pokecrystal.gbc ${TEXTFILES} ${LZFILES}
This commit is contained in:
yenatch 2013-02-09 05:09:58 -05:00
parent 087e2556f2
commit 0b05325e07

View File

@ -1,4 +1,4 @@
.SUFFIXES: .asm .tx .o .gbc
.SUFFIXES: .asm .tx .o .gbc .png .2bpp .lz
TEXTFILES = text/sweethoney.tx \
text/phone/bill.tx \
@ -7,8 +7,18 @@ TEXTFILES = text/sweethoney.tx \
text/phone/trainers1.tx \
main.tx
VERTFILES = gfx/pics/%.png \
gfx/trainers/%.png
HORIZFILES = $(filter-out gfx/%.png, $(VERTFILES))
IMGFILES = ${VERTFILES} ${HORIZFILES}
LZFILES = gfx/%.lz
all: pokecrystal.gbc
pokecrystal.o: pokecrystal.asm constants.asm wram.asm ${TEXTFILES}
rgbasm -o pokecrystal.o pokecrystal.asm
@ -20,5 +30,20 @@ pokecrystal.gbc: pokecrystal.o
rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@
cmp baserom.gbc $@
front.png: tiles.png
python gfx.py png-to-lz --front $@ $(OBJECT_DIRECTORY)/tiles.2bpp
tiles.png:
python gfx.py png-to-2bpp $@
.png: ${VERTFILES}
python gfx.py png-to-lz --vert $@
.png: ${HORIZFILES}
python gfx.py png-to-lz $@
clean:
rm -f main.tx pokecrystal.o pokecrystal.gbc ${TEXTFILES}