mirror of
https://github.com/pret/poketcg.git
synced 2026-10-04 15:17:42 -04:00
9ec77a8f48
Most tools from pokemon-reverse-engineering-tools are meant for pokecrystal or pokered. Having only the subset of required tools without depending on a submodule makes it easier to submit custom changes exclusive poketcg and its structure. For example, the disasm tool can be made to use poketcg rom/sym files by default, read vram and hram as symbols, and can be modified in the future to for example guess text labels in applicable load instructions or to dump poketcg-specific scripts. gfx.py was also added, but without the not required pokecrystal lz (de)compression support
39 lines
841 B
Makefile
39 lines
841 B
Makefile
.PHONY: all compare clean
|
|
|
|
.SUFFIXES:
|
|
.SUFFIXES: .asm .o .gbc .png .2bpp .1bpp .pal
|
|
.SECONDEXPANSION:
|
|
|
|
OBJS = src/main.o src/gfx.o src/text.o src/audio.o src/wram.o src/hram.o
|
|
EXTRAS = tools
|
|
|
|
$(foreach obj, $(OBJS), \
|
|
$(eval $(obj:.o=)_dep = $(shell python $(EXTRAS)/scan_includes.py $(obj:.o=.asm))) \
|
|
)
|
|
|
|
all: tcg.gbc compare
|
|
|
|
compare: baserom.gbc tcg.gbc
|
|
cmp $^
|
|
|
|
$(OBJS): $$*.asm $$($$*_dep)
|
|
@python $(EXTRAS)/gfx.py 2bpp $(2bppq)
|
|
@python $(EXTRAS)/gfx.py 1bpp $(1bppq)
|
|
rgbasm -h -i src/ -o $@ $<
|
|
|
|
tcg.gbc: $(OBJS)
|
|
rgblink -n $*.sym -m $*.map -l $*.link -o $@ $^
|
|
rgbfix -cjsv -k 01 -l 0x33 -m 0x1b -p 0 -r 03 -t POKECARD -i AXQE $@
|
|
|
|
clean:
|
|
rm -f tcg.gbc $(OBJS) *.sym *.map
|
|
find . \( -iname '*.1bpp' -o -iname '*.2bpp' \) -exec rm {} +
|
|
|
|
%.2bpp: %.png
|
|
$(eval 2bppq += $<)
|
|
@rm -f $@
|
|
|
|
%.1bpp: %.png
|
|
$(eval 1bppq += $<)
|
|
@rm -f $@
|