2017-04-10 17:39:48 +00:00
|
|
|
|
2017-04-19 18:26:46 +00:00
|
|
|
all: baddies.c badspacerobots.tga tom-thumb.c swave.c.rom.h
|
2017-04-10 17:39:48 +00:00
|
|
|
|
2019-05-18 15:19:12 +00:00
|
|
|
clean:
|
|
|
|
rm -f baddies.[ch] *.gif *.tga *.tga.png tom-thumb.c swave.c.rom.h
|
|
|
|
|
2017-04-10 17:39:48 +00:00
|
|
|
%.h: %
|
|
|
|
cat $* | hexdump -v -e '"\n" 128/1 "0x%02x,"' > $@
|
|
|
|
|
2017-04-15 04:12:21 +00:00
|
|
|
# convert PCX (or PNG) file to Williams C sprite
|
|
|
|
%.c: %.pcx
|
2019-05-18 15:19:12 +00:00
|
|
|
python3 ../pcx2will.py $< > $@
|
2017-04-15 04:12:21 +00:00
|
|
|
|
|
|
|
# convert PNG into RLE-encoded TGA bitmap
|
2017-04-10 17:39:48 +00:00
|
|
|
%.tga: %.png
|
|
|
|
convert $< -resize 192 $<.gif
|
|
|
|
convert $<.gif +dither -type palette -depth 4 -compress RLE -colors 8 -flip $@
|
|
|
|
convert $@ $@.png
|
|
|
|
|
2017-04-15 04:12:21 +00:00
|
|
|
# convert PNG to 15-color PCX
|
2017-04-10 17:39:48 +00:00
|
|
|
%.pcx: %.png
|
|
|
|
convert $< -format raw -type palette -compress none -colors 15 +dither $@
|
2017-04-15 04:12:21 +00:00
|
|
|
|
|
|
|
#%.4.pcx: %.png
|
|
|
|
# convert $< -format raw -type palette -compress none -colors 4 +dither $@
|
|
|
|
|
|
|
|
# convert BDF font file to definitions
|
|
|
|
%.c: ../fonts/%.bdf
|
2019-05-18 15:19:12 +00:00
|
|
|
python3 ../parsebdf4bit.py -s 33 -e 97 $< > $@
|
2017-04-10 17:39:48 +00:00
|
|
|
|