From 377bd14ea67d6177250fb401e12d7dfcf44e2cf6 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Wed, 9 Jun 2021 22:54:21 -0500 Subject: Dungeon pokemon/Floor ID JSON Part 1 (#39) * move Thunderwave and Tiny Woods pokemon to json * rule tweaking to actually build tool before parsing JSON * delete .inc pokemon for tiny Woods and Thunderwave * silence git complaining about br_ips and ips_patch * use defines for species and pass the header file for species * convert sinister woods * convert MtThunderPeak * convert silent chasm * add trial floor_id w/ tiny woods * change make rule name to fix compile * MtSteel converted and bugfix * convert few floor headers and great canyon pokemon * code cleanup * unify unkData into UnkTextStruct2 * more code cleanup and some text decomp * doc more funcs and decomp/split some stuff * document more save stuff * more save work and move some data * pika sniped UpdateNatureTotal * decomp a litle and convert a few more dungeons * better scanning for json files * mt freeze and peak --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 536fd79..17a1eb7 100755 --- a/Makefile +++ b/Makefile @@ -55,6 +55,7 @@ MID2AGB := tools/mid2agb/mid2agb PREPROC := tools/preproc/preproc SCANINC := tools/scaninc/scaninc RAMSCRGEN := tools/ramscrgen/ramscrgen +DUNGEONJSON := tools/dungeonjson/dungeonjson TOOLDIRS := $(filter-out tools/agbcc tools/binutils,$(wildcard tools/*)) TOOLBASE = $(TOOLDIRS:tools/%=%) @@ -103,6 +104,7 @@ SUBDIRS := $(sort $(dir $(ALL_OBJECTS))) LD_SCRIPT := $(BUILD_DIR)/ld_script.ld + # Special configurations required for lib files $(C_BUILDDIR)/agb_flash.o : CC1FLAGS := -O -mthumb-interwork $(C_BUILDDIR)/agb_flash_1m.o: CC1FLAGS := -O -mthumb-interwork @@ -146,6 +148,9 @@ all: $(ROM) tools: $(TOOLDIRS) +include dungeon_pokemon.mk +include dungeon_floor.mk + $(TOOLDIRS): @$(MAKE) -C $@ CC=$(HOSTCC) CXX=$(HOSTCXX) @@ -169,7 +174,7 @@ $(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.c $$(C_DEP) @echo -e ".text\n\t.align\t2, 0\n" >> $(C_BUILDDIR)/$*.s $(AS) $(ASFLAGS) -o $@ $(C_BUILDDIR)/$*.s -$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s $$(ASM_DEP) +$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s $$(ASM_DEP) dungeon_pokemon dungeon_floor $(PREPROC) $< charmap.txt | $(CPP) -I include | $(AS) $(ASFLAGS) -o $@ $(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s $$(ASM_DEP) @@ -183,10 +188,10 @@ $(LD_SCRIPT): ld_script.txt $(BUILD_DIR)/sym_ewram.ld $(BUILD_DIR)/sym_ewram2.ld $(BUILD_DIR)/sym_%.ld: sym_%.txt $(CPP) -P $(CPPFLAGS) $< | sed -e "s#tools/#../../tools/#g" > $@ -$(ELF): $(LD_SCRIPT) $(ALL_OBJECTS) $(LIBC) libagbsyscall +$(ELF): $(LD_SCRIPT) $(ALL_OBJECTS) $(LIBC) libagbsyscall tools cd $(BUILD_DIR) && $(LD) -T ld_script.ld -Map ../../$(MAP) -o ../../$@ $(LIB) -$(ROM): %.gba: $(ELF) tools +$(ROM): %.gba: $(ELF) $(OBJCOPY) -O binary --gap-fill 0xFF --pad-to 0xA000000 $< $@ $(GBAFIX) $@ -p -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent -- cgit v1.2.3