diff options
-rw-r--r-- | .travis.yml | 16 | ||||
-rw-r--r-- | Makefile | 275 | ||||
-rw-r--r-- | asm/battle_1.s | 2 | ||||
-rw-r--r-- | asm/battle_9.s | 2 | ||||
-rw-r--r-- | asm/battle_anim_812C144.s | 2 | ||||
-rw-r--r-- | asm/battle_anim_813F0F4.s | 2 | ||||
-rwxr-xr-x | asm/battle_intro.s | 2 | ||||
-rw-r--r-- | asm/contest_ai.s | 2 | ||||
-rw-r--r-- | asm/contest_effect.s | 2 | ||||
-rw-r--r-- | asm/contest_link_80C2020.s | 2 | ||||
-rw-r--r-- | asm/contest_link_80C857C.s | 2 | ||||
-rwxr-xr-x | asm/current.s | 2 | ||||
-rw-r--r-- | asm/cute_sketch.s | 2 | ||||
-rwxr-xr-x | asm/dark.s | 2 | ||||
-rwxr-xr-x | asm/fight.s | 2 | ||||
-rwxr-xr-x | asm/flying.s | 2 | ||||
-rwxr-xr-x | asm/ghost.s | 2 | ||||
-rwxr-xr-x | asm/ground.s | 2 | ||||
-rwxr-xr-x | asm/ice.s | 2 | ||||
-rw-r--r-- | asm/m4a_3.s | 2 | ||||
-rwxr-xr-x | asm/normal.s | 2 | ||||
-rwxr-xr-x | asm/pc_screen_effect.s | 2 | ||||
-rw-r--r-- | asm/pokedex_area_screen.s | 2 | ||||
-rw-r--r-- | asm/pokedex_cry_screen.s | 2 | ||||
-rw-r--r-- | asm/pokemon_item_effect.s | 2 | ||||
-rw-r--r-- | asm/pokemon_storage_system.s | 2 | ||||
-rw-r--r-- | asm/pokenav.s | 2 | ||||
-rwxr-xr-x | asm/psychic.s | 2 | ||||
-rwxr-xr-x | asm/rock.s | 2 | ||||
-rwxr-xr-x | asm/unk_text_8095904.s | 2 | ||||
-rwxr-xr-x | asm/water.s | 2 | ||||
-rw-r--r-- | config.mk | 44 | ||||
-rw-r--r-- | data-de/event_scripts.s | 4 | ||||
-rw-r--r-- | data-de/strings2.s | 2 | ||||
-rw-r--r-- | data/battle_ai_scripts.s | 4 | ||||
-rw-r--r-- | data/battle_anim.s | 2 | ||||
-rw-r--r-- | data/battle_anim_80A7E7C.s | 2 | ||||
-rw-r--r-- | data/battle_anim_80CA710.s | 2 | ||||
-rw-r--r-- | data/battle_anim_812C144.s | 2 | ||||
-rw-r--r-- | data/battle_anim_813F0F4.s | 2 | ||||
-rw-r--r-- | data/battle_anim_scripts.s | 4 | ||||
-rw-r--r-- | data/battle_interface.s | 2 | ||||
-rw-r--r-- | data/battle_moves.s | 2 | ||||
-rw-r--r-- | data/battle_scripts_1.s | 4 | ||||
-rw-r--r-- | data/battle_scripts_2.s | 4 | ||||
-rw-r--r-- | data/contest.s | 2 | ||||
-rw-r--r-- | data/contest_ai.s | 2 | ||||
-rw-r--r-- | data/contest_ai_scripts.s | 4 | ||||
-rw-r--r-- | data/contest_effect.s | 2 | ||||
-rw-r--r-- | data/contest_link_80C2020.s | 2 | ||||
-rw-r--r-- | data/cute_sketch.s | 2 | ||||
-rw-r--r-- | data/data2a.s | 2 | ||||
-rw-r--r-- | data/data2b.s | 2 | ||||
-rw-r--r-- | data/data_8393054.s | 2 | ||||
-rw-r--r-- | data/easy_chat.s | 2 | ||||
-rw-r--r-- | data/event_scripts.s | 4 | ||||
-rw-r--r-- | data/field_effect_scripts.s | 4 | ||||
-rw-r--r-- | data/map_events.s | 2 | ||||
-rw-r--r-- | data/maps.s | 2 | ||||
-rwxr-xr-x | data/pc_screen_effect.s | 2 | ||||
-rw-r--r-- | data/pokedex_area_screen.s | 2 | ||||
-rw-r--r-- | data/pokedex_cry_screen.s | 2 | ||||
-rw-r--r-- | data/pokemon_storage_system.s | 2 | ||||
-rw-r--r-- | data/pokenav.s | 2 | ||||
-rw-r--r-- | data/roulette.s | 2 | ||||
-rw-r--r-- | data/sound_data.s | 4 | ||||
-rw-r--r-- | data/strings2.s | 2 | ||||
-rw-r--r-- | data/tilesets.s | 2 | ||||
-rw-r--r-- | fonts.mk | 2 | ||||
-rw-r--r-- | include/MPlayDef.s (renamed from sound/MPlayDef.s) | 0 | ||||
-rw-r--r-- | include/macros.inc (renamed from asm/macros.inc) | 12 | ||||
-rw-r--r-- | include/macros/asm.inc (renamed from asm/macros/asm.inc) | 0 | ||||
-rw-r--r-- | include/macros/battle_ai_script.inc (renamed from asm/macros/battle_ai_script.inc) | 0 | ||||
-rw-r--r-- | include/macros/battle_anim.inc (renamed from asm/macros/battle_anim.inc) | 0 | ||||
-rw-r--r-- | include/macros/battle_script.inc (renamed from asm/macros/battle_script.inc) | 0 | ||||
-rw-r--r-- | include/macros/contest_ai_script.inc (renamed from asm/macros/contest_ai_script.inc) | 0 | ||||
-rw-r--r-- | include/macros/ec.inc (renamed from asm/macros/ec.inc) | 0 | ||||
-rw-r--r-- | include/macros/event.inc (renamed from asm/macros/event.inc) | 0 | ||||
-rw-r--r-- | include/macros/field_effect_script.inc (renamed from asm/macros/field_effect_script.inc) | 0 | ||||
-rw-r--r-- | include/macros/function.inc (renamed from asm/macros/function.inc) | 0 | ||||
-rw-r--r-- | include/macros/m4a.inc (renamed from asm/macros/m4a.inc) | 0 | ||||
-rw-r--r-- | include/macros/map.inc (renamed from asm/macros/map.inc) | 0 | ||||
-rw-r--r-- | include/macros/movement.inc (renamed from asm/macros/movement.inc) | 0 | ||||
-rw-r--r-- | include/macros/music_voice.inc (renamed from asm/macros/music_voice.inc) | 0 | ||||
-rw-r--r-- | include/macros/pokemon_data.inc (renamed from asm/macros/pokemon_data.inc) | 0 | ||||
-rw-r--r-- | ld_script.txt | 8 | ||||
-rw-r--r-- | misc.mk | 284 | ||||
-rw-r--r-- | override-de.mk | 10 | ||||
-rw-r--r-- | src/crt0.s (renamed from asm/crt0.s) | 0 | ||||
-rw-r--r-- | src/libs/libagbsyscall.s (renamed from asm/libagbsyscall.s) | 2 | ||||
-rw-r--r-- | src/libs/libgcnmultiboot.s (renamed from asm/libgcnmultiboot.s) | 2 | ||||
-rw-r--r-- | src/libs/m4a_1.s (renamed from asm/m4a_1.s) | 2 | ||||
-rw-r--r-- | sym_bss.txt | 2 | ||||
-rw-r--r-- | tilesets.mk | 216 |
94 files changed, 480 insertions, 543 deletions
diff --git a/.travis.yml b/.travis.yml index 04b2597b6..9a196819b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,12 +25,12 @@ matrix: env: _="Build" script: - ./build_tools.sh - - make -j2 compare_ruby - - make -j2 compare_ruby_rev1 - - make -j2 compare_ruby_rev2 - - make -j2 compare_sapphire - - make -j2 compare_sapphire_rev1 - - make -j2 compare_sapphire_rev2 + - make -j2 ruby + - make -j2 ruby_rev1 + - make -j2 ruby_rev2 + - make -j2 sapphire + - make -j2 sapphire_rev1 + - make -j2 sapphire_rev2 - os: linux env: _="Formatting" addons: @@ -53,7 +53,7 @@ matrix: - rsync -avhI graphics-de/ graphics/ script: - ./build_tools.sh - - make -j2 compare_ruby_de - - make -j2 compare_sapphire_de + - make -j2 ruby_de + - make -j2 sapphire_de allow_failures: - env: _="Formatting" @@ -1,73 +1,147 @@ -SHELL := /bin/bash -o pipefail -AS := $(DEVKITARM)/bin/arm-none-eabi-as -ASFLAGS := -mcpu=arm7tdmi +include config.mk -CC1 := tools/agbcc/bin/agbcc -override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Wunused -Werror -O2 -fhex-asm -CPP := $(DEVKITARM)/bin/arm-none-eabi-cpp -CPPFLAGS := -I tools/agbcc/include -iquote include -nostdinc -undef -Werror -Wno-trigraphs +#### Tools #### -LD := $(DEVKITARM)/bin/arm-none-eabi-ld +SHELL := /bin/bash -o pipefail +AS := $(DEVKITARM)/bin/arm-none-eabi-as +CC1 := tools/agbcc/bin/agbcc +CPP := $(DEVKITARM)/bin/arm-none-eabi-cpp +LD := $(DEVKITARM)/bin/arm-none-eabi-ld +OBJCOPY := $(DEVKITARM)/bin/arm-none-eabi-objcopy +SHA1SUM := sha1sum -c +GBAGFX := tools/gbagfx/gbagfx +RSFONT := tools/rsfont/rsfont +AIF2PCM := tools/aif2pcm/aif2pcm +MID2AGB := tools/mid2agb/mid2agb +PREPROC := tools/preproc/preproc +SCANINC := tools/scaninc/scaninc +RAMSCRGEN := tools/ramscrgen/ramscrgen -OBJCOPY := $(DEVKITARM)/bin/arm-none-eabi-objcopy +ASFLAGS := -mcpu=arm7tdmi -I include --defsym $(VERSION)=1 --defsym REVISION=$(REVISION) --defsym $(LANGUAGE)=1 +CC1FLAGS := -mthumb-interwork -Wimplicit -Wparentheses -Wunused -Werror -O2 -fhex-asm +CPPFLAGS := -I tools/agbcc/include -iquote include -nostdinc -undef -Werror -Wno-trigraphs -D $(VERSION) -D REVISION=$(REVISION) -D $(LANGUAGE) + + +#### Files #### + +ROM := poke$(BUILD_NAME).gba +MAP := $(ROM:%.gba=%.map) + +SUBDIRS := \ + sound \ + sound/songs \ + asm \ + data \ + src \ + src/battle \ + src/battle/anim \ + src/field \ + src/debug \ + src/scene \ + src/pokemon \ + src/engine \ + src/libs +BUILD_DIR := build/$(BUILD_NAME) + +C_SOURCES := $(foreach dir, $(SUBDIRS), $(wildcard $(dir)/*.c)) +ASM_SOURCES := $(foreach dir, $(SUBDIRS), $(wildcard $(dir)/*.s)) + +C_OBECTS := $(addprefix $(BUILD_DIR)/, $(C_SOURCES:%.c=%.o)) +ASM_OBJECTS := $(addprefix $(BUILD_DIR)/, $(ASM_SOURCES:%.s=%.o)) +ALL_OBJECTS := $(C_OBJECTS) $(ASM_OBJECTS) -LIBGCC := tools/agbcc/lib/libgcc.a LIBC := tools/agbcc/lib/libc.a +LIBGCC := tools/agbcc/lib/libgcc.a -SHA1 := sha1sum -c +LD_SCRIPT := $(BUILD_DIR)/ld_script.ld -GFX := tools/gbagfx/gbagfx -AIF := tools/aif2pcm/aif2pcm -MID := tools/mid2agb/mid2agb -SCANINC := tools/scaninc/scaninc -PREPROC := tools/preproc/preproc -RAMSCRGEN := tools/ramscrgen/ramscrgen +# Special configurations required for lib files +%src/libs/siirtc.o: CC1FLAGS := -mthumb-interwork +%src/libs/agb_flash.o: CC1FLAGS := -O1 -mthumb-interwork +%src/libs/agb_flash_1m.o: CC1FLAGS := -O1 -mthumb-interwork +%src/libs/agb_flash_mx.o: CC1FLAGS := -O1 -mthumb-interwork +%src/libs/m4a_2.o: CC1 := tools/agbcc/bin/old_agbcc +%src/libs/m4a_4.o: CC1 := tools/agbcc/bin/old_agbcc -REVISION := 0 -VERSIONS := ruby sapphire ruby_rev1 sapphire_rev1 ruby_rev2 sapphire_rev2 ruby_de sapphire_de +#### Main Rules #### -# Clear the default suffixes. -.SUFFIXES: +# Disable dependency scanning when NODEP is used for quick building +ifeq ($(NODEP),) + $(BUILD_DIR)/src/%.o: C_FILE = $(*D)/$(*F).c + $(BUILD_DIR)/src/%.o: C_DEP = $(shell $(SCANINC) -I include $(wildcard $(C_FILE:$(BUILD_DIR)/=))) + $(BUILD_DIR)/asm/%.o: ASM_DEP = $(shell $(SCANINC) asm/$(*F).s) + $(BUILD_DIR)/data/%.o: ASM_DEP = $(shell $(SCANINC) data/$(*F).s) +endif # Secondary expansion is required for dependency variables in object rules. .SECONDEXPANSION: +# Clear the default suffixes +.SUFFIXES: +# Don't delete intermediate files +.SECONDARY: + +# Create build subdirectories +$(shell mkdir -p $(addprefix $(BUILD_DIR)/, $(SUBDIRS))) + +all: $(ROM) +ifeq ($(COMPARE),1) + @$(SHA1SUM) $(BUILD_NAME).sha1 +endif -.PRECIOUS: %.1bpp %.4bpp %.8bpp %.gbapal %.lz %.rl %.pcm %.bin sound/direct_sound_samples/cry_%.bin +clean: tidy + $(RM) sound/direct_sound_samples/*.bin + $(RM) $(ALL_OBJECTS) + find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.rl' \) -exec rm {} + -.PHONY: all clean tidy all_versions compare compare_all \ -$(VERSIONS) $(VERSIONS:%=compare_%) +tidy: + $(RM) poke$(BUILD_NAME){.gba,.elf,.map} + $(RM) -r build +%.gba: %.elf + $(OBJCOPY) -O binary --gap-fill 0xFF --pad-to 0x9000000 $< $@ -$(shell mkdir -p build/ $(VERSIONS:%=build/%/{,asm,data,src{,/battle{,/anim},/field,/debug,/scene,/pokemon,/engine,/libs}})) +%.elf: $(LD_SCRIPT) $(ALL_OBJECTS) + cd $(BUILD_DIR) && $(LD) -T ld_script.ld -Map ../../$(MAP) -o ../../$@ ../../$(LIBGCC) ../../$(LIBC) -C_SRCS := $(shell find src -iname "*.c") -ASM_SRCS := $(wildcard asm/*.s) -DATA_ASM_SRCS := $(wildcard data/*.s) +$(LD_SCRIPT): $(BUILD_DIR)/sym_bss.ld $(BUILD_DIR)/sym_common.ld $(BUILD_DIR)/sym_ewram.ld + cd $(BUILD_DIR) && sed -f ../../ld_script.sed ../../ld_script.txt | sed "s#tools/#../../tools/#g" >ld_script.ld +$(BUILD_DIR)/sym_bss.ld: sym_bss.txt + cd $(BUILD_DIR) && ../../$(RAMSCRGEN) .bss ../../sym_bss.txt $(LANGUAGE) >sym_bss.ld +$(BUILD_DIR)/sym_common.ld: sym_common.txt $(C_OBECTS) $(wildcard common_syms/*.txt) + cd $(BUILD_DIR) && ../../$(RAMSCRGEN) COMMON ../../sym_common.txt $(LANGUAGE) -c src,../../common_syms >sym_common.ld +$(BUILD_DIR)/sym_ewram.ld: sym_ewram.txt + cd $(BUILD_DIR) && ../../$(RAMSCRGEN) ewram_data ../../sym_ewram.txt $(LANGUAGE) >sym_ewram.ld -SONG_SRCS := $(wildcard sound/songs/*.s) -SONG_OBJS := $(SONG_SRCS:%.s=%.o) +$(BUILD_DIR)/%.o: %.c $$(C_DEP) + $(CPP) $(CPPFLAGS) $< -o $(BUILD_DIR)/$*.i + $(PREPROC) $(BUILD_DIR)/$*.i charmap.txt | $(CC1) $(CC1FLAGS) -o $(BUILD_DIR)/$*.s + @printf ".text\n\t.align\t2, 0\n" >> $(BUILD_DIR)/$*.s + @$(AS) $(ASFLAGS) -o $@ $(BUILD_DIR)/$*.s -all: ruby - @: +# Only .s files in data need preproc +$(BUILD_DIR)/data/%.o: data/%.s $$(ASM_DEP) + $(PREPROC) $< charmap.txt | $(CPP) -I include | $(AS) $(ASFLAGS) -o $@ -all_versions: $(VERSIONS) - @: +$(BUILD_DIR)/%.o: %.s $$(ASM_DEP) + $(AS) $(ASFLAGS) $< -o $@ -# For contributors to make sure a change didn't affect the contents of the ROM. -compare: compare_ruby -compare_all: $(VERSIONS:%=compare_%) +# "friendly" target names for convenience sake +ruby: ; @$(MAKE) --no-print-directory VERSION=RUBY +ruby_rev1: ; @$(MAKE) --no-print-directory VERSION=RUBY REVISION=1 +ruby_rev2: ; @$(MAKE) --no-print-directory VERSION=RUBY REVISION=2 +sapphire: ; @$(MAKE) --no-print-directory VERSION=SAPPHIRE +sapphire_rev1: ; @$(MAKE) --no-print-directory VERSION=SAPPHIRE REVISION=1 +sapphire_rev2: ; @$(MAKE) --no-print-directory VERSION=SAPPHIRE REVISION=2 +ruby_de: ; @$(MAKE) --no-print-directory VERSION=RUBY LANGUAGE=GERMAN +sapphire_de: ; @$(MAKE) --no-print-directory VERSION=SAPPHIRE LANGUAGE=GERMAN -clean: tidy - rm -f sound/direct_sound_samples/*.bin - rm -f $(SONG_OBJS) - find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.rl' \) -exec rm {} + -tidy: - rm -f $(VERSIONS:%=poke%{.gba,.elf,.map}) - rm -r build/* +#### Graphics Rules #### + +GFX_OPTS := include castform.mk include tilesets.mk @@ -75,107 +149,22 @@ include fonts.mk include misc.mk include override.mk -%.s: ; -%.png: ; -%.pal: ; -%.aif: ; - -%.1bpp: %.png ; $(GFX) $< $@ -%.4bpp: %.png ; $(GFX) $< $@ -%.8bpp: %.png ; $(GFX) $< $@ -%.gbapal: %.pal ; $(GFX) $< $@ -%.gbapal: %.png ; $(GFX) $< $@ -%.lz: % ; $(GFX) $< $@ -%.rl: % ; $(GFX) $< $@ -sound/direct_sound_samples/cry_%.bin: sound/direct_sound_samples/cry_%.aif ; $(AIF) $< $@ --compress -%.bin: %.aif ; $(AIF) $< $@ -sound/songs/%.s: sound/songs/%.mid - cd $(@D) && ../../$(MID) $(<F) +%.1bpp: %.png ; $(GBAGFX) $< $@ $(GFX_OPTS) +%.4bpp: %.png ; $(GBAGFX) $< $@ $(GFX_OPTS) +%.8bpp: %.png ; $(GBAGFX) $< $@ $(GFX_OPTS) +%.gbapal: %.pal ; $(GBAGFX) $< $@ $(GFX_OPTS) +%.gbapal: %.png ; $(GBAGFX) $< $@ $(GFX_OPTS) +%.lz: % ; $(GBAGFX) $< $@ $(GFX_OPTS) +%.rl: % ; $(GBAGFX) $< $@ $(GFX_OPTS) -%src/libs/siirtc.o: CFLAGS := -mthumb-interwork -%src/libs/agb_flash.o: CFLAGS := -O -mthumb-interwork -%src/libs/agb_flash_1m.o: CFLAGS := -O -mthumb-interwork -%src/libs/agb_flash_mx.o: CFLAGS := -O -mthumb-interwork - -%src/libs/m4a_2.o: CC1 := tools/agbcc/bin/old_agbcc -%src/libs/m4a_4.o: CC1 := tools/agbcc/bin/old_agbcc - -$(SONG_OBJS): %.o: %.s - $(AS) $(ASFLAGS) -I sound -o $@ $< +#### Sound Rules #### +sound/direct_sound_samples/cry_%.bin: sound/direct_sound_samples/cry_%.aif + $(AIF2PCM) $< $@ --compress -define VERSION_RULES +sound/%.bin: sound/%.aif + $(AIF2PCM) $< $@ -$1_C_OBJS := $$(C_SRCS:%.c=build/$1/%.o) -$1_ASM_OBJS := $$(ASM_SRCS:%.s=build/$1/%.o) -$1_DATA_ASM_OBJS := $$(DATA_ASM_SRCS:%.s=build/$1/%.o) - -ifeq ($$(NODEP),) -build/$1/src/%.o: c_path = $$(*D)/$$(*F).c -build/$1/src/%.o: c_dep = $$(shell $$(SCANINC) -I include $$(wildcard $$(c_path:build/$1/=))) -build/$1/asm/%.o: asm_dep = $$(shell $$(SCANINC) asm/$$(*F).s) -build/$1/data/%.o: asm_dep = $$(shell $$(SCANINC) data/$$(*F).s) -endif - -$1_OBJS := $$($1_C_OBJS) $$($1_ASM_OBJS) $$($1_DATA_ASM_OBJS) $$(SONG_OBJS) -$1_OBJS_REL := $$($1_OBJS:build/$1/%=%) -$1_OBJS_REL := $$($1_OBJS_REL:sound/%=../../sound/%) - -$$($1_C_OBJS): VERSION := $2 -$$($1_C_OBJS): REVISION := $3 -$$($1_C_OBJS): LANGUAGE := $4 -build/$1/%.o : %.c $$$$(c_dep) - @$$(CPP) $$(CPPFLAGS) -D $$(VERSION) -D REVISION=$$(REVISION) -D $$(LANGUAGE) $$< -o build/$1/$$*.i - @$$(PREPROC) build/$1/$$*.i charmap.txt | $$(CC1) $$(CFLAGS) -o build/$1/$$*.s - @printf ".text\n\t.align\t2, 0\n" >> build/$1/$$*.s - $$(AS) $$(ASFLAGS) -o $$@ build/$1/$$*.s - -$$($1_ASM_OBJS): VERSION := $2 -$$($1_ASM_OBJS): REVISION := $3 -$$($1_ASM_OBJS): LANGUAGE := $4 -build/$1/asm/%.o: asm/%.s $$$$(asm_dep) - $$(AS) $$(ASFLAGS) --defsym $$(VERSION)=1 --defsym REVISION=$$(REVISION) --defsym $$(LANGUAGE)=1 -o $$@ $$< - -$$($1_DATA_ASM_OBJS): VERSION := $2 -$$($1_DATA_ASM_OBJS): REVISION := $3 -$$($1_DATA_ASM_OBJS): LANGUAGE := $4 -build/$1/data/%.o: data/%.s $$$$(asm_dep) - $$(PREPROC) $$< charmap.txt | $$(CPP) -I include | $$(AS) $$(ASFLAGS) --defsym $$(VERSION)=1 --defsym REVISION=$$(REVISION) --defsym $$(LANGUAGE)=1 -o $$@ - -build/$1/sym_bss.ld: LANGUAGE := $4 -build/$1/sym_bss.ld: sym_bss.txt - cd build/$1 && ../../$$(RAMSCRGEN) .bss ../../sym_bss.txt $$(LANGUAGE) >sym_bss.ld - -build/$1/sym_common.ld: LANGUAGE := $4 -build/$1/sym_common.ld: sym_common.txt $$($1_C_OBJS) $$(wildcard common_syms/*.txt) - cd build/$1 && ../../$$(RAMSCRGEN) COMMON ../../sym_common.txt $$(LANGUAGE) -c src,../../common_syms >sym_common.ld - -build/$1/sym_ewram.ld: LANGUAGE := $4 -build/$1/sym_ewram.ld: sym_ewram.txt - cd build/$1 && ../../$$(RAMSCRGEN) ewram_data ../../sym_ewram.txt $$(LANGUAGE) >sym_ewram.ld - -build/$1/ld_script.ld: ld_script.txt build/$1/sym_bss.ld build/$1/sym_common.ld build/$1/sym_ewram.ld - cd build/$1 && sed -f ../../ld_script.sed ../../ld_script.txt | sed "s#tools/#../../tools/#g" | sed "s#sound/#../../sound/#g" >ld_script.ld - -poke$1.elf: build/$1/ld_script.ld $$($1_OBJS) - cd build/$1 && $$(LD) -T ld_script.ld -Map ../../poke$1.map -o ../../$$@ $$($1_OBJS_REL) ../../$$(LIBGCC) ../../$$(LIBC) - -poke$1.gba: %.gba: %.elf - $$(OBJCOPY) -O binary --gap-fill 0xFF --pad-to 0x9000000 $$< $$@ - -compare_$1: poke$1.gba - @$$(SHA1) $1.sha1 - -$1: poke$1.gba - @: -endef - -$(eval $(call VERSION_RULES,ruby,RUBY,0,ENGLISH)) -$(eval $(call VERSION_RULES,ruby_rev1,RUBY,1,ENGLISH)) -$(eval $(call VERSION_RULES,ruby_rev2,RUBY,2,ENGLISH)) -$(eval $(call VERSION_RULES,sapphire,SAPPHIRE,0,ENGLISH)) -$(eval $(call VERSION_RULES,sapphire_rev1,SAPPHIRE,1,ENGLISH)) -$(eval $(call VERSION_RULES,sapphire_rev2,SAPPHIRE,2,ENGLISH)) -$(eval $(call VERSION_RULES,ruby_de,RUBY,0,GERMAN)) -$(eval $(call VERSION_RULES,sapphire_de,SAPPHIRE,0,GERMAN)) +sound/songs/%.s: sound/songs/%.mid + cd $(@D) && ../../$(MID2AGB) $(<F) diff --git a/asm/battle_1.s b/asm/battle_1.s index da604c6b6..980bd6a65 100644 --- a/asm/battle_1.s +++ b/asm/battle_1.s @@ -1,6 +1,6 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/battle_9.s b/asm/battle_9.s index b86914ca6..fc4cbcf4b 100644 --- a/asm/battle_9.s +++ b/asm/battle_9.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/battle_anim_812C144.s b/asm/battle_anim_812C144.s index 8a6a8fffa..03ffc0eda 100644 --- a/asm/battle_anim_812C144.s +++ b/asm/battle_anim_812C144.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/battle_anim_813F0F4.s b/asm/battle_anim_813F0F4.s index fb9c25a82..ccb4854af 100644 --- a/asm/battle_anim_813F0F4.s +++ b/asm/battle_anim_813F0F4.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/battle_intro.s b/asm/battle_intro.s index 3f3c58a65..5b29f56a4 100755 --- a/asm/battle_intro.s +++ b/asm/battle_intro.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/contest_ai.s b/asm/contest_ai.s index 94347f2ad..709b289c2 100644 --- a/asm/contest_ai.s +++ b/asm/contest_ai.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/contest_effect.s b/asm/contest_effect.s index d06789976..341cb0903 100644 --- a/asm/contest_effect.s +++ b/asm/contest_effect.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/contest_link_80C2020.s b/asm/contest_link_80C2020.s index 6eac528df..af239f3f7 100644 --- a/asm/contest_link_80C2020.s +++ b/asm/contest_link_80C2020.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/contest_link_80C857C.s b/asm/contest_link_80C857C.s index 13d01d5a9..b29e03583 100644 --- a/asm/contest_link_80C857C.s +++ b/asm/contest_link_80C857C.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/current.s b/asm/current.s index e77218cc9..4ef537dc3 100755 --- a/asm/current.s +++ b/asm/current.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/cute_sketch.s b/asm/cute_sketch.s index da5dea0ce..8cb6cdbd8 100644 --- a/asm/cute_sketch.s +++ b/asm/cute_sketch.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/dark.s b/asm/dark.s index 9e09d8fbe..9f6ad3278 100755 --- a/asm/dark.s +++ b/asm/dark.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/fight.s b/asm/fight.s index 1969aee14..e8e3299af 100755 --- a/asm/fight.s +++ b/asm/fight.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/flying.s b/asm/flying.s index 99cb11913..ce3fb050b 100755 --- a/asm/flying.s +++ b/asm/flying.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/ghost.s b/asm/ghost.s index daf7cd9a5..2934f6dbd 100755 --- a/asm/ghost.s +++ b/asm/ghost.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/ground.s b/asm/ground.s index e846d1c70..3d4b69a9f 100755 --- a/asm/ground.s +++ b/asm/ground.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/m4a_3.s b/asm/m4a_3.s index a842ae925..82b6a2467 100644 --- a/asm/m4a_3.s +++ b/asm/m4a_3.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/gba_constants.inc" .include "constants/m4a_constants.inc" diff --git a/asm/normal.s b/asm/normal.s index 8465e2c2b..fffbc3870 100755 --- a/asm/normal.s +++ b/asm/normal.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/pc_screen_effect.s b/asm/pc_screen_effect.s index 665978d19..9d36df66c 100755 --- a/asm/pc_screen_effect.s +++ b/asm/pc_screen_effect.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/pokedex_area_screen.s b/asm/pokedex_area_screen.s index fd5555524..779a5a0ed 100644 --- a/asm/pokedex_area_screen.s +++ b/asm/pokedex_area_screen.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/pokedex_cry_screen.s b/asm/pokedex_cry_screen.s index 5eea28b99..00f8cfe14 100644 --- a/asm/pokedex_cry_screen.s +++ b/asm/pokedex_cry_screen.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/pokemon_item_effect.s b/asm/pokemon_item_effect.s index a8b8fa401..6995dc62b 100644 --- a/asm/pokemon_item_effect.s +++ b/asm/pokemon_item_effect.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/pokemon_storage_system.s b/asm/pokemon_storage_system.s index d878821cb..2ac873fcd 100644 --- a/asm/pokemon_storage_system.s +++ b/asm/pokemon_storage_system.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/pokenav.s b/asm/pokenav.s index 67b4ece33..ca65b2e06 100644 --- a/asm/pokenav.s +++ b/asm/pokenav.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/psychic.s b/asm/psychic.s index 7dbedd08f..f91ce950e 100755 --- a/asm/psychic.s +++ b/asm/psychic.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/rock.s b/asm/rock.s index 2f878db2c..98afb53e6 100755 --- a/asm/rock.s +++ b/asm/rock.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/unk_text_8095904.s b/asm/unk_text_8095904.s index f144eab26..00c81faca 100755 --- a/asm/unk_text_8095904.s +++ b/asm/unk_text_8095904.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/asm/water.s b/asm/water.s index 56e552241..45fb7f82a 100755 --- a/asm/water.s +++ b/asm/water.s @@ -1,5 +1,5 @@ .include "constants/gba_constants.inc" - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified diff --git a/config.mk b/config.mk new file mode 100644 index 000000000..f0ad39f5b --- /dev/null +++ b/config.mk @@ -0,0 +1,44 @@ +### Build Configuration ### + +# Default variables +VERSION ?= RUBY +REVISION ?= 0 +LANGUAGE ?= ENGLISH +COMPARE ?= 1 + +# Version +ifeq ($(VERSION), RUBY) + BUILD_NAME := ruby +else +ifeq ($(VERSION), SAPPHIRE) + BUILD_NAME := sapphire +else + $(error unknown version $(VERSION)) +endif +endif + +# Revision +ifeq ($(REVISION), 0) + BUILD_NAME := $(BUILD_NAME) +else +ifeq ($(REVISION), 1) + BUILD_NAME := $(BUILD_NAME)_rev1 +else +ifeq ($(REVISION), 2) + BUILD_NAME := $(BUILD_NAME)_rev2 +else + $(error unknown revision $(REVISION)) +endif +endif +endif + +# Language +ifeq ($(LANGUAGE), ENGLISH) + BUILD_NAME := $(BUILD_NAME) +else +ifeq ($(LANGUAGE), GERMAN) + BUILD_NAME := $(BUILD_NAME)_de +else + $(error unknown language $(LANGUAGE)) +endif +endif diff --git a/data-de/event_scripts.s b/data-de/event_scripts.s index 18fb0a64d..1569e87c6 100644 --- a/data-de/event_scripts.s +++ b/data-de/event_scripts.s @@ -10,8 +10,8 @@ #include "constants/species.h" #include "constants/weather.h" #include "constants/vars.h" - .include "asm/macros.inc" - .include "asm/macros/event.inc" + .include "include/macros.inc" + .include "include/macros/event.inc" .include "constants/constants.inc" .section script_data, "aw", %progbits diff --git a/data-de/strings2.s b/data-de/strings2.s index f15c039aa..52e964938 100644 --- a/data-de/strings2.s +++ b/data-de/strings2.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/battle_ai_scripts.s b/data/battle_ai_scripts.s index 270386359..17b27fae5 100644 --- a/data/battle_ai_scripts.s +++ b/data/battle_ai_scripts.s @@ -3,9 +3,9 @@ #include "constants/hold_effects.h" #include "constants/items.h" #include "constants/moves.h" - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" - .include "asm/macros/battle_ai_script.inc" + .include "include/macros/battle_ai_script.inc" .section script_data, "aw", %progbits diff --git a/data/battle_anim.s b/data/battle_anim.s index ed880ba77..270ba818a 100644 --- a/data/battle_anim.s +++ b/data/battle_anim.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/battle_anim_80A7E7C.s b/data/battle_anim_80A7E7C.s index d7da20315..395b2e0ab 100644 --- a/data/battle_anim_80A7E7C.s +++ b/data/battle_anim_80A7E7C.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/battle_anim_80CA710.s b/data/battle_anim_80CA710.s index 4430cd372..8f62d92f6 100644 --- a/data/battle_anim_80CA710.s +++ b/data/battle_anim_80CA710.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/battle_anim_812C144.s b/data/battle_anim_812C144.s index 188173252..dc0ebf9e3 100644 --- a/data/battle_anim_812C144.s +++ b/data/battle_anim_812C144.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/battle_anim_813F0F4.s b/data/battle_anim_813F0F4.s index de29622ad..fd24d95b6 100644 --- a/data/battle_anim_813F0F4.s +++ b/data/battle_anim_813F0F4.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index e0d11637d..2068db4ff 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -1,6 +1,6 @@ #include "constants/songs.h" - .include "asm/macros.inc" - .include "asm/macros/battle_anim.inc" + .include "include/macros.inc" + .include "include/macros/battle_anim.inc" .include "constants/constants.inc" .section script_data, "aw", %progbits diff --git a/data/battle_interface.s b/data/battle_interface.s index 040b1b9d3..3c79b9f4b 100644 --- a/data/battle_interface.s +++ b/data/battle_interface.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/battle_moves.s b/data/battle_moves.s index 2c65bd3a5..b56457a96 100644 --- a/data/battle_moves.s +++ b/data/battle_moves.s @@ -1,6 +1,6 @@ #include "constants/battle_constants.h" #include "constants/battle_move_effects.h" - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 41edcb514..b04ebefe5 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -2,8 +2,8 @@ #include "constants/battle_constants.h" #include "constants/moves.h" #include "constants/songs.h" - .include "asm/macros.inc" - .include "asm/macros/battle_script.inc" + .include "include/macros.inc" + .include "include/macros/battle_script.inc" .include "constants/constants.inc" .include "constants/battle_script_constants.inc" diff --git a/data/battle_scripts_2.s b/data/battle_scripts_2.s index e113513d6..2c5c391ad 100644 --- a/data/battle_scripts_2.s +++ b/data/battle_scripts_2.s @@ -1,8 +1,8 @@ #include "constants/battle_constants.h" #include "constants/items.h" #include "constants/songs.h" - .include "asm/macros.inc" - .include "asm/macros/battle_script.inc" + .include "include/macros.inc" + .include "include/macros/battle_script.inc" .include "constants/constants.inc" .include "constants/battle_script_constants.inc" diff --git a/data/contest.s b/data/contest.s index 0ffcfc636..63988987d 100644 --- a/data/contest.s +++ b/data/contest.s @@ -1,6 +1,6 @@ #include "constants/moves.h" #include "constants/species.h" - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/contest_ai.s b/data/contest_ai.s index 78f926df3..af13f50f8 100644 --- a/data/contest_ai.s +++ b/data/contest_ai.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/contest_ai_scripts.s b/data/contest_ai_scripts.s index 2c709ba09..b0b74c584 100644 --- a/data/contest_ai_scripts.s +++ b/data/contest_ai_scripts.s @@ -1,5 +1,5 @@ - .include "asm/macros.inc" - .include "asm/macros/contest_ai_script.inc" + .include "include/macros.inc" + .include "include/macros/contest_ai_script.inc" .include "constants/constants.inc" .section script_data, "aw", %progbits diff --git a/data/contest_effect.s b/data/contest_effect.s index 7bcb36bf1..cd960fb52 100644 --- a/data/contest_effect.s +++ b/data/contest_effect.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/contest_link_80C2020.s b/data/contest_link_80C2020.s index 0b74e5908..f0ad06a32 100644 --- a/data/contest_link_80C2020.s +++ b/data/contest_link_80C2020.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/cute_sketch.s b/data/cute_sketch.s index b59a4b804..e3e75753d 100644 --- a/data/cute_sketch.s +++ b/data/cute_sketch.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/data2a.s b/data/data2a.s index bd455ce29..c4d6343d8 100644 --- a/data/data2a.s +++ b/data/data2a.s @@ -3,7 +3,7 @@ #include "constants/items.h" #include "constants/moves.h" #include "constants/species.h" - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/data2b.s b/data/data2b.s index e82e221c1..c7cd4dfcf 100644 --- a/data/data2b.s +++ b/data/data2b.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/data_8393054.s b/data/data_8393054.s index 5d2f79e07..38ba47b63 100644 --- a/data/data_8393054.s +++ b/data/data_8393054.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/easy_chat.s b/data/easy_chat.s index d41ffccce..bece4a499 100644 --- a/data/easy_chat.s +++ b/data/easy_chat.s @@ -1,7 +1,7 @@ #include "constants/easy_chat.h" #include "constants/moves.h" #include "constants/species.h" - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" #define EC_DUPLICATES(count) (0xFF00 + (count)) diff --git a/data/event_scripts.s b/data/event_scripts.s index 1c8cff8d6..3b25ceab4 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -10,8 +10,8 @@ #include "constants/species.h" #include "constants/weather.h" #include "constants/vars.h" - .include "asm/macros.inc" - .include "asm/macros/event.inc" + .include "include/macros.inc" + .include "include/macros/event.inc" .include "constants/constants.inc" .section script_data, "aw", %progbits diff --git a/data/field_effect_scripts.s b/data/field_effect_scripts.s index 900cc7009..45f8ce648 100644 --- a/data/field_effect_scripts.s +++ b/data/field_effect_scripts.s @@ -1,5 +1,5 @@ - .include "asm/macros.inc" - .include "asm/macros/field_effect_script.inc" + .include "include/macros.inc" + .include "include/macros/field_effect_script.inc" .include "constants/constants.inc" .section script_data, "aw", %progbits diff --git a/data/map_events.s b/data/map_events.s index a06eb36d0..1531ec30e 100644 --- a/data/map_events.s +++ b/data/map_events.s @@ -5,7 +5,7 @@ #include "constants/secret_bases.h" #include "constants/vars.h" #include "constants/weather.h" - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/maps.s b/data/maps.s index 92f5544a1..727a48d0f 100644 --- a/data/maps.s +++ b/data/maps.s @@ -1,6 +1,6 @@ #include "constants/maps.h" #include "constants/songs.h" - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/pc_screen_effect.s b/data/pc_screen_effect.s index c33957945..1d6571149 100755 --- a/data/pc_screen_effect.s +++ b/data/pc_screen_effect.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/pokedex_area_screen.s b/data/pokedex_area_screen.s index 0d15169d0..410f0d4c5 100644 --- a/data/pokedex_area_screen.s +++ b/data/pokedex_area_screen.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/pokedex_cry_screen.s b/data/pokedex_cry_screen.s index 0908ddacb..14ea1cfb8 100644 --- a/data/pokedex_cry_screen.s +++ b/data/pokedex_cry_screen.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/pokemon_storage_system.s b/data/pokemon_storage_system.s index b765656f7..a3b7494dc 100644 --- a/data/pokemon_storage_system.s +++ b/data/pokemon_storage_system.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/pokenav.s b/data/pokenav.s index f84e45596..cb0e98472 100644 --- a/data/pokenav.s +++ b/data/pokenav.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/roulette.s b/data/roulette.s index 64b7b82e2..d19508fc3 100644 --- a/data/roulette.s +++ b/data/roulette.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/sound_data.s b/data/sound_data.s index cd33950e1..fff724e68 100644 --- a/data/sound_data.s +++ b/data/sound_data.s @@ -1,7 +1,7 @@ .section .rodata - .include "asm/macros/m4a.inc" - .include "asm/macros/music_voice.inc" + .include "include/macros/m4a.inc" + .include "include/macros/music_voice.inc" .include "sound/voice_groups.inc" .include "sound/keysplit_tables.inc" diff --git a/data/strings2.s b/data/strings2.s index cece71645..f73aba76f 100644 --- a/data/strings2.s +++ b/data/strings2.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata diff --git a/data/tilesets.s b/data/tilesets.s index 443686234..d9933dbf9 100644 --- a/data/tilesets.s +++ b/data/tilesets.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .section .rodata @@ -1,5 +1,3 @@ -RSFONT := tools/rsfont/rsfont - graphics/fonts/font0_jpn.1bpp: graphics/fonts/font0_jpn.png $(RSFONT) $< $@ 240 1 diff --git a/sound/MPlayDef.s b/include/MPlayDef.s index f5dd6484d..f5dd6484d 100644 --- a/sound/MPlayDef.s +++ b/include/MPlayDef.s diff --git a/asm/macros.inc b/include/macros.inc index 6d8657892..f34353079 100644 --- a/asm/macros.inc +++ b/include/macros.inc @@ -1,9 +1,9 @@ - .include "asm/macros/asm.inc" - .include "asm/macros/function.inc" - .include "asm/macros/movement.inc" - .include "asm/macros/pokemon_data.inc" - .include "asm/macros/ec.inc" - .include "asm/macros/map.inc" + .include "include/macros/asm.inc" + .include "include/macros/function.inc" + .include "include/macros/movement.inc" + .include "include/macros/pokemon_data.inc" + .include "include/macros/ec.inc" + .include "include/macros/map.inc" .macro region_map_location x, y, width, height, name .byte \x diff --git a/asm/macros/asm.inc b/include/macros/asm.inc index 26b2707ca..26b2707ca 100644 --- a/asm/macros/asm.inc +++ b/include/macros/asm.inc diff --git a/asm/macros/battle_ai_script.inc b/include/macros/battle_ai_script.inc index 679e30340..679e30340 100644 --- a/asm/macros/battle_ai_script.inc +++ b/include/macros/battle_ai_script.inc diff --git a/asm/macros/battle_anim.inc b/include/macros/battle_anim.inc index 4ff845032..4ff845032 100644 --- a/asm/macros/battle_anim.inc +++ b/include/macros/battle_anim.inc diff --git a/asm/macros/battle_script.inc b/include/macros/battle_script.inc index e4fa0c454..e4fa0c454 100644 --- a/asm/macros/battle_script.inc +++ b/include/macros/battle_script.inc diff --git a/asm/macros/contest_ai_script.inc b/include/macros/contest_ai_script.inc index 05d70e351..05d70e351 100644 --- a/asm/macros/contest_ai_script.inc +++ b/include/macros/contest_ai_script.inc diff --git a/asm/macros/ec.inc b/include/macros/ec.inc index d3fd45c2f..d3fd45c2f 100644 --- a/asm/macros/ec.inc +++ b/include/macros/ec.inc diff --git a/asm/macros/event.inc b/include/macros/event.inc index fcbd3a055..fcbd3a055 100644 --- a/asm/macros/event.inc +++ b/include/macros/event.inc diff --git a/asm/macros/field_effect_script.inc b/include/macros/field_effect_script.inc index d5895b0ef..d5895b0ef 100644 --- a/asm/macros/field_effect_script.inc +++ b/include/macros/field_effect_script.inc diff --git a/asm/macros/function.inc b/include/macros/function.inc index 67fb373a8..67fb373a8 100644 --- a/asm/macros/function.inc +++ b/include/macros/function.inc diff --git a/asm/macros/m4a.inc b/include/macros/m4a.inc index 6c5abc09b..6c5abc09b 100644 --- a/asm/macros/m4a.inc +++ b/include/macros/m4a.inc diff --git a/asm/macros/map.inc b/include/macros/map.inc index db37d9346..db37d9346 100644 --- a/asm/macros/map.inc +++ b/include/macros/map.inc diff --git a/asm/macros/movement.inc b/include/macros/movement.inc index 674ce7169..674ce7169 100644 --- a/asm/macros/movement.inc +++ b/include/macros/movement.inc diff --git a/asm/macros/music_voice.inc b/include/macros/music_voice.inc index b7a9e7f8d..b7a9e7f8d 100644 --- a/asm/macros/music_voice.inc +++ b/include/macros/music_voice.inc diff --git a/asm/macros/pokemon_data.inc b/include/macros/pokemon_data.inc index b0a5f22e3..b0a5f22e3 100644 --- a/asm/macros/pokemon_data.inc +++ b/include/macros/pokemon_data.inc diff --git a/ld_script.txt b/ld_script.txt index 4775e13d6..b668449e4 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -36,7 +36,7 @@ SECTIONS { .text : ALIGN(4) { - asm/crt0.o(.text); + src/crt0.o(.text); src/engine/main.o(.text); src/engine/sprite.o(.text); src/engine/text.o(.text); @@ -407,8 +407,8 @@ SECTIONS { lib_text : ALIGN(4) { - asm/libgcnmultiboot.o(.text); - asm/m4a_1.o(.text); + src/libs/libgcnmultiboot.o(.text); + src/libs/m4a_1.o(.text); src/libs/m4a_2.o(.text); asm/m4a_3.o(.text); src/libs/m4a_4.o(.text); @@ -416,7 +416,7 @@ SECTIONS { src/libs/agb_flash_1m.o(.text); src/libs/agb_flash_mx.o(.text); src/libs/siirtc.o(.text); - asm/libagbsyscall.o(.text); + src/libs/libagbsyscall.o(.text); tools/agbcc/lib/libgcc.a:_call_via_rX.o(.text); tools/agbcc/lib/libgcc.a:_divsi3.o(.text); tools/agbcc/lib/libgcc.a:_dvmd_tls.o(.text); @@ -1,143 +1,149 @@ -MENUGFXDIR := graphics/interface -TRADEGFXDIR := graphics/trade -INTROGFXDIR := graphics/intro -PSSGFXDIR := graphics/pokemon_storage -MISCGFXDIR := graphics/misc -PKNAVGFXDIR := graphics/pokenav -UNKNOWNGFXDIR := graphics/unknown -UNUSEDGFXDIR := graphics/unused -REELGFXDIR := graphics/slot_machine -ROULGFXDIR := graphics/roulette -BTLANMSPRGFXDIR := graphics/battle_anims/sprites -PICFRAMEGFXDIR := graphics/picture_frame -CONTESTGFXDIR := graphics/contest -MASKSGFXDIR := graphics/battle_anims/masks -BATTRANSGFXDIR := graphics/battle_transitions -TYPESGFXDIR := graphics/types -TITLEGFXDIR := graphics/title_screen +#### Pokemon Storage System #### -types := normal fight flying poison ground rock bug ghost steel mystery fire water grass electric psychic ice dragon dark -contest_types := cool beauty cute smart tough - -$(MENUGFXDIR)/menu.gbapal: $(MENUGFXDIR)/menu_0.gbapal $(MENUGFXDIR)/menu_1.gbapal - @cat $(MENUGFXDIR)/menu_0.gbapal $(MENUGFXDIR)/menu_1.gbapal >$@ - -$(INTROGFXDIR)/intro.4bpp: $(INTROGFXDIR)/intro1_waterdrops.4bpp $(INTROGFXDIR)/intro1_gamefreak.4bpp - @cat $(INTROGFXDIR)/intro1_waterdrops.4bpp $(INTROGFXDIR)/intro1_gamefreak.4bpp >$@ - -$(INTROGFXDIR)/introgfx.4bpp: $(INTROGFXDIR)/intro1_bg.4bpp $(INTROGFXDIR)/intro1_leaves.4bpp - @cat $(INTROGFXDIR)/intro1_bg.4bpp $(INTROGFXDIR)/intro1_leaves.4bpp >$@ +PSSGFXDIR := graphics/pokemon_storage -$(PKNAVGFXDIR)/region_map.8bpp: $(PKNAVGFXDIR)/region_map.png - $(GFX) $< $@ -num_tiles 233 +$(PSSGFXDIR)/header.4bpp: GFX_OPTS := -num_tiles 47 -$(PSSGFXDIR)/forest_frame.4bpp: $(PSSGFXDIR)/forest_frame.png - $(GFX) $< $@ -num_tiles 49 +$(PSSGFXDIR)/misc1.4bpp: GFX_OPTS := -num_tiles 91 +$(PSSGFXDIR)/forest_frame.4bpp: GFX_OPTS := -num_tiles 49 $(PSSGFXDIR)/forest.4bpp: $(PSSGFXDIR)/forest_frame.4bpp $(PSSGFXDIR)/forest_bg.4bpp @cat $(PSSGFXDIR)/forest_frame.4bpp $(PSSGFXDIR)/forest_bg.4bpp >$@ -$(PSSGFXDIR)/city_frame.4bpp: $(PSSGFXDIR)/city_frame.png - $(GFX) $< $@ -num_tiles 37 - +$(PSSGFXDIR)/city_frame.4bpp: GFX_OPTS := -num_tiles 37 $(PSSGFXDIR)/city.4bpp: $(PSSGFXDIR)/city_frame.4bpp $(PSSGFXDIR)/city_bg.4bpp @cat $(PSSGFXDIR)/city_frame.4bpp $(PSSGFXDIR)/city_bg.4bpp >$@ -$(PSSGFXDIR)/desert_frame.4bpp: $(PSSGFXDIR)/desert_frame.png - $(GFX) $< $@ -num_tiles 48 - +$(PSSGFXDIR)/desert_frame.4bpp: GFX_OPTS := -num_tiles 48 $(PSSGFXDIR)/desert.4bpp: $(PSSGFXDIR)/desert_frame.4bpp $(PSSGFXDIR)/desert_bg.4bpp @cat $(PSSGFXDIR)/desert_frame.4bpp $(PSSGFXDIR)/desert_bg.4bpp >$@ -$(PSSGFXDIR)/savanna_frame.4bpp: $(PSSGFXDIR)/savanna_frame.png - $(GFX) $< $@ -num_tiles 40 - +$(PSSGFXDIR)/savanna_frame.4bpp: GFX_OPTS := -num_tiles 40 $(PSSGFXDIR)/savanna.4bpp: $(PSSGFXDIR)/savanna_frame.4bpp $(PSSGFXDIR)/savanna_bg.4bpp @cat $(PSSGFXDIR)/savanna_frame.4bpp $(PSSGFXDIR)/savanna_bg.4bpp >$@ -$(PSSGFXDIR)/crag_frame.4bpp: $(PSSGFXDIR)/crag_frame.png - $(GFX) $< $@ -num_tiles 46 - +$(PSSGFXDIR)/crag_frame.4bpp: GFX_OPTS := -num_tiles 46 $(PSSGFXDIR)/crag.4bpp: $(PSSGFXDIR)/crag_frame.4bpp $(PSSGFXDIR)/crag_bg.4bpp @cat $(PSSGFXDIR)/crag_frame.4bpp $(PSSGFXDIR)/crag_bg.4bpp >$@ -$(PSSGFXDIR)/volcano_frame.4bpp: $(PSSGFXDIR)/volcano_frame.png - $(GFX) $< $@ -num_tiles 49 - +$(PSSGFXDIR)/volcano_frame.4bpp: GFX_OPTS := -num_tiles 49 $(PSSGFXDIR)/volcano.4bpp: $(PSSGFXDIR)/volcano_frame.4bpp $(PSSGFXDIR)/volcano_bg.4bpp @cat $(PSSGFXDIR)/volcano_frame.4bpp $(PSSGFXDIR)/volcano_bg.4bpp >$@ -$(PSSGFXDIR)/snow_frame.4bpp: $(PSSGFXDIR)/snow_frame.png - $(GFX) $< $@ -num_tiles 46 - +$(PSSGFXDIR)/snow_frame.4bpp: GFX_OPTS := -num_tiles 46 $(PSSGFXDIR)/snow.4bpp: $(PSSGFXDIR)/snow_frame.4bpp $(PSSGFXDIR)/snow_bg.4bpp @cat $(PSSGFXDIR)/snow_frame.4bpp $(PSSGFXDIR)/snow_bg.4bpp >$@ -$(PSSGFXDIR)/cave_frame.4bpp: $(PSSGFXDIR)/cave_frame.png - $(GFX) $< $@ -num_tiles 57 - +$(PSSGFXDIR)/cave_frame.4bpp: GFX_OPTS := -num_tiles 57 $(PSSGFXDIR)/cave.4bpp: $(PSSGFXDIR)/cave_frame.4bpp $(PSSGFXDIR)/cave_bg.4bpp @cat $(PSSGFXDIR)/cave_frame.4bpp $(PSSGFXDIR)/cave_bg.4bpp >$@ -$(PSSGFXDIR)/beach_frame.4bpp: $(PSSGFXDIR)/beach_frame.png - $(GFX) $< $@ -num_tiles 48 - +$(PSSGFXDIR)/beach_frame.4bpp: GFX_OPTS := -num_tiles 48 $(PSSGFXDIR)/beach.4bpp: $(PSSGFXDIR)/beach_frame.4bpp $(PSSGFXDIR)/beach_bg.4bpp @cat $(PSSGFXDIR)/beach_frame.4bpp $(PSSGFXDIR)/beach_bg.4bpp >$@ -$(PSSGFXDIR)/seafloor_frame.4bpp: $(PSSGFXDIR)/seafloor_frame.png - $(GFX) $< $@ -num_tiles 45 - +$(PSSGFXDIR)/seafloor_frame.4bpp: GFX_OPTS := -num_tiles 45 $(PSSGFXDIR)/seafloor.4bpp: $(PSSGFXDIR)/seafloor_frame.4bpp $(PSSGFXDIR)/seafloor_bg.4bpp @cat $(PSSGFXDIR)/seafloor_frame.4bpp $(PSSGFXDIR)/seafloor_bg.4bpp >$@ -$(PSSGFXDIR)/river_frame.4bpp: $(PSSGFXDIR)/river_frame.png - $(GFX) $< $@ -num_tiles 57 - +$(PSSGFXDIR)/river_frame.4bpp: GFX_OPTS := -num_tiles 57 $(PSSGFXDIR)/river.4bpp: $(PSSGFXDIR)/river_frame.4bpp $(PSSGFXDIR)/river_bg.4bpp @cat $(PSSGFXDIR)/river_frame.4bpp $(PSSGFXDIR)/river_bg.4bpp >$@ -$(PSSGFXDIR)/sky_frame.4bpp: $(PSSGFXDIR)/sky_frame.png - $(GFX) $< $@ -num_tiles 45 - +$(PSSGFXDIR)/sky_frame.4bpp: GFX_OPTS := -num_tiles 45 $(PSSGFXDIR)/sky.4bpp: $(PSSGFXDIR)/sky_frame.4bpp $(PSSGFXDIR)/sky_bg.4bpp @cat $(PSSGFXDIR)/sky_frame.4bpp $(PSSGFXDIR)/sky_bg.4bpp >$@ -$(PSSGFXDIR)/polkadot_frame.4bpp: $(PSSGFXDIR)/polkadot_frame.png - $(GFX) $< $@ -num_tiles 34 - +$(PSSGFXDIR)/polkadot_frame.4bpp: GFX_OPTS := -num_tiles 34 $(PSSGFXDIR)/polkadot.4bpp: $(PSSGFXDIR)/polkadot_frame.4bpp $(PSSGFXDIR)/polkadot_bg.4bpp @cat $(PSSGFXDIR)/polkadot_frame.4bpp $(PSSGFXDIR)/polkadot_bg.4bpp >$@ -$(PSSGFXDIR)/pokecenter_bg.4bpp: $(PSSGFXDIR)/pokecenter_bg.png - $(GFX) $< $@ -num_tiles 38 - +$(PSSGFXDIR)/pokecenter_bg.4bpp: GFX_OPTS := -num_tiles 38 $(PSSGFXDIR)/pokecenter.4bpp: $(PSSGFXDIR)/pokecenter_frame.4bpp $(PSSGFXDIR)/pokecenter_bg.4bpp @cat $(PSSGFXDIR)/pokecenter_frame.4bpp $(PSSGFXDIR)/pokecenter_bg.4bpp >$@ -$(PSSGFXDIR)/machine_frame.4bpp: $(PSSGFXDIR)/machine_frame.png - $(GFX) $< $@ -num_tiles 46 - +$(PSSGFXDIR)/machine_frame.4bpp: GFX_OPTS := -num_tiles 46 $(PSSGFXDIR)/machine.4bpp: $(PSSGFXDIR)/machine_frame.4bpp $(PSSGFXDIR)/machine_bg.4bpp @cat $(PSSGFXDIR)/machine_frame.4bpp $(PSSGFXDIR)/machine_bg.4bpp >$@ -$(PSSGFXDIR)/plain_frame.4bpp: $(PSSGFXDIR)/plain_frame.png - $(GFX) $< $@ -num_tiles 18 - +$(PSSGFXDIR)/plain_frame.4bpp: GFX_OPTS := -num_tiles 18 $(PSSGFXDIR)/plain.4bpp: $(PSSGFXDIR)/plain_frame.4bpp $(PSSGFXDIR)/plain_bg.4bpp @cat $(PSSGFXDIR)/plain_frame.4bpp $(PSSGFXDIR)/plain_bg.4bpp >$@ -$(PKNAVGFXDIR)/outline.4bpp: $(PKNAVGFXDIR)/outline.png - $(GFX) $< $@ -num_tiles 43 -$(REELGFXDIR)/reel_time.4bpp: $(REELGFXDIR)/reel_pikachu.4bpp $(REELGFXDIR)/reel_machine.4bpp - @cat $(REELGFXDIR)/reel_pikachu.4bpp $(REELGFXDIR)/reel_machine.4bpp >$@ +#### Intro #### -$(MISCGFXDIR)/birch_help.4bpp: $(MISCGFXDIR)/birch_bag.4bpp $(MISCGFXDIR)/birch_grass.4bpp - @cat $(MISCGFXDIR)/birch_bag.4bpp $(MISCGFXDIR)/birch_grass.4bpp >$@ +INTROGFXDIR := graphics/intro -$(MISCGFXDIR)/clock_misc.4bpp: $(MISCGFXDIR)/clock_hands.4bpp $(MISCGFXDIR)/clock_ampm.4bpp - @cat $(MISCGFXDIR)/clock_hands.4bpp $(MISCGFXDIR)/clock_ampm.4bpp >$@ +$(INTROGFXDIR)/intro.4bpp: $(INTROGFXDIR)/intro1_waterdrops.4bpp $(INTROGFXDIR)/intro1_gamefreak.4bpp + @cat $(INTROGFXDIR)/intro1_waterdrops.4bpp $(INTROGFXDIR)/intro1_gamefreak.4bpp >$@ + +$(INTROGFXDIR)/introgfx.4bpp: $(INTROGFXDIR)/intro1_bg.4bpp $(INTROGFXDIR)/intro1_leaves.4bpp + @cat $(INTROGFXDIR)/intro1_bg.4bpp $(INTROGFXDIR)/intro1_leaves.4bpp >$@ + +$(INTROGFXDIR)/intro3_misc.4bpp: $(INTROGFXDIR)/intro3_star.4bpp $(INTROGFXDIR)/intro3_attackgfx.4bpp $(INTROGFXDIR)/intro3_explosion.4bpp + @cat $(INTROGFXDIR)/intro3_star.4bpp $(INTROGFXDIR)/intro3_attackgfx.4bpp $(INTROGFXDIR)/intro3_explosion.4bpp >$@ + +$(INTROGFXDIR)/copyright.4bpp: GFX_OPTS := -num_tiles 43 + + +#### Title Screen #### + +TITLEGFXDIR := graphics/title_screen + +$(TITLEGFXDIR)/press_start.4bpp: GFX_OPTS := -num_tiles 41 + + +#### Interface #### + +MENUGFXDIR := graphics/interface + +$(MENUGFXDIR)/menu.gbapal: $(MENUGFXDIR)/menu_0.gbapal $(MENUGFXDIR)/menu_1.gbapal + @cat $(MENUGFXDIR)/menu_0.gbapal $(MENUGFXDIR)/menu_1.gbapal >$@ + +$(MENUGFXDIR)/wordgroup_frame.4bpp: GFX_OPTS := -num_tiles 65 + +$(MENUGFXDIR)/party_menu_misc.4bpp: GFX_OPTS := -num_tiles 116 + +$(MENUGFXDIR)/status_screen.4bpp: GFX_OPTS := -num_tiles 217 + +$(MENUGFXDIR)/hp_numbers.4bpp: $(MENUGFXDIR)/hpbar_anim.4bpp $(MENUGFXDIR)/numbers1.4bpp $(MENUGFXDIR)/numbers2.4bpp + @cat $(MENUGFXDIR)/hpbar_anim.4bpp $(MENUGFXDIR)/numbers1.4bpp $(MENUGFXDIR)/numbers2.4bpp >$@ + + +#### PokeNav #### + +PKNAVGFXDIR := graphics/pokenav + +$(PKNAVGFXDIR)/region_map.8bpp: GFX_OPTS := -num_tiles 233 + +$(PKNAVGFXDIR)/outline.4bpp: GFX_OPTS := -num_tiles 43 + +$(PKNAVGFXDIR)/menu_options.4bpp: $(PKNAVGFXDIR)/menu_hoennmap.4bpp $(PKNAVGFXDIR)/menu_condition.4bpp $(PKNAVGFXDIR)/menu_eyes.4bpp $(PKNAVGFXDIR)/menu_ribbons.4bpp $(PKNAVGFXDIR)/menu_off.4bpp + @cat $(PKNAVGFXDIR)/menu_hoennmap.4bpp $(PKNAVGFXDIR)/menu_condition.4bpp $(PKNAVGFXDIR)/menu_eyes.4bpp $(PKNAVGFXDIR)/menu_ribbons.4bpp $(PKNAVGFXDIR)/menu_off.4bpp >$@ + +$(PKNAVGFXDIR)/condition_menu_misc.4bpp: GFX_OPTS := -num_tiles 41 + +$(PKNAVGFXDIR)/condition_search.4bpp: $(PKNAVGFXDIR)/condition_search_cool.4bpp $(PKNAVGFXDIR)/condition_search_beauty.4bpp $(PKNAVGFXDIR)/condition_search_cute.4bpp $(PKNAVGFXDIR)/condition_search_smart.4bpp $(PKNAVGFXDIR)/condition_search_tough.4bpp $(PKNAVGFXDIR)/condition_search_cancel.4bpp + @cat $(PKNAVGFXDIR)/condition_search_cool.4bpp $(PKNAVGFXDIR)/condition_search_beauty.4bpp $(PKNAVGFXDIR)/condition_search_cute.4bpp $(PKNAVGFXDIR)/condition_search_smart.4bpp $(PKNAVGFXDIR)/condition_search_tough.4bpp $(PKNAVGFXDIR)/condition_search_cancel.4bpp >$@ + + +#### Trade #### + +TRADEGFXDIR := graphics/trade + +$(TRADEGFXDIR)/gba_affine.8bpp: GFX_OPTS := -num_tiles 129 + +$(TRADEGFXDIR)/menu.4bpp: GFX_OPTS := -num_tiles 148 + + +#### Casino #### + +REELGFXDIR := graphics/slot_machine +ROULGFXDIR := graphics/roulette + +$(REELGFXDIR)/reel_time.4bpp: $(REELGFXDIR)/reel_pikachu.4bpp $(REELGFXDIR)/reel_machine.4bpp + @cat $(REELGFXDIR)/reel_pikachu.4bpp $(REELGFXDIR)/reel_machine.4bpp >$@ $(ROULGFXDIR)/roulette_tilt.4bpp: $(ROULGFXDIR)/shroomish.4bpp $(ROULGFXDIR)/tailow.4bpp @cat $(ROULGFXDIR)/shroomish.4bpp $(ROULGFXDIR)/tailow.4bpp >$@ @@ -145,14 +151,11 @@ $(ROULGFXDIR)/roulette_tilt.4bpp: $(ROULGFXDIR)/shroomish.4bpp $(ROULGFXDIR)/tai $(ROULGFXDIR)/poke_icons2.4bpp: $(ROULGFXDIR)/wynaut.4bpp $(ROULGFXDIR)/azurill.4bpp $(ROULGFXDIR)/skitty.4bpp $(ROULGFXDIR)/makuhita.4bpp @cat $(ROULGFXDIR)/wynaut.4bpp $(ROULGFXDIR)/azurill.4bpp $(ROULGFXDIR)/skitty.4bpp $(ROULGFXDIR)/makuhita.4bpp >$@ -$(INTROGFXDIR)/intro3_misc.4bpp: $(INTROGFXDIR)/intro3_star.4bpp $(INTROGFXDIR)/intro3_attackgfx.4bpp $(INTROGFXDIR)/intro3_explosion.4bpp - @cat $(INTROGFXDIR)/intro3_star.4bpp $(INTROGFXDIR)/intro3_attackgfx.4bpp $(INTROGFXDIR)/intro3_explosion.4bpp >$@ -$(TRADEGFXDIR)/gba_affine.8bpp: $(TRADEGFXDIR)/gba_affine.png - $(GFX) $< $@ -num_tiles 129 +#### Battle Animations #### -$(TRADEGFXDIR)/menu.4bpp: $(TRADEGFXDIR)/menu.png - $(GFX) $< $@ -num_tiles 148 +BTLANMSPRGFXDIR := graphics/battle_anims/sprites +MASKSGFXDIR := graphics/battle_anims/masks $(BTLANMSPRGFXDIR)/001.4bpp: $(BTLANMSPRGFXDIR)/001_0.4bpp $(BTLANMSPRGFXDIR)/001_1.4bpp @cat $(BTLANMSPRGFXDIR)/001_0.4bpp $(BTLANMSPRGFXDIR)/001_1.4bpp >$@ @@ -169,47 +172,36 @@ $(BTLANMSPRGFXDIR)/141.4bpp: $(BTLANMSPRGFXDIR)/141_0.4bpp $(BTLANMSPRGFXDIR)/14 $(BTLANMSPRGFXDIR)/159.4bpp: $(BTLANMSPRGFXDIR)/159_0.4bpp $(BTLANMSPRGFXDIR)/159_1.4bpp @cat $(BTLANMSPRGFXDIR)/159_0.4bpp $(BTLANMSPRGFXDIR)/159_1.4bpp >$@ -$(PICFRAMEGFXDIR)/frame5.4bpp: $(PICFRAMEGFXDIR)/frame5.png - $(GFX) $< $@ -num_tiles 86 +$(MASKSGFXDIR)/unknown_D2EDFC.4bpp: GFX_OPTS := -num_tiles 14 -$(CONTESTGFXDIR)/nextturn.4bpp: $(CONTESTGFXDIR)/nextturn.png - $(GFX) $< $@ -num_tiles 8 -$(UNUSEDGFXDIR)/obi_palpak1.gbapal: $(UNUSEDGFXDIR)/old_pal1.gbapal $(UNUSEDGFXDIR)/old_pal2.gbapal $(UNUSEDGFXDIR)/old_pal3.gbapal - @cat $(UNUSEDGFXDIR)/old_pal1.gbapal $(UNUSEDGFXDIR)/old_pal2.gbapal $(UNUSEDGFXDIR)/old_pal3.gbapal >$@ +#### Battle Transition -$(UNUSEDGFXDIR)/obi_palpak3.gbapal: $(UNUSEDGFXDIR)/old_pal5.gbapal $(UNUSEDGFXDIR)/old_pal6.gbapal $(UNUSEDGFXDIR)/old_pal7.gbapal - @cat $(UNUSEDGFXDIR)/old_pal5.gbapal $(UNUSEDGFXDIR)/old_pal6.gbapal $(UNUSEDGFXDIR)/old_pal7.gbapal >$@ +BATTRANSGFXDIR := graphics/battle_transitions -$(UNUSEDGFXDIR)/obi1.4bpp: $(UNUSEDGFXDIR)/old_bulbasaur.4bpp $(UNUSEDGFXDIR)/old_charizard.4bpp - @cat $(UNUSEDGFXDIR)/old_bulbasaur.4bpp $(UNUSEDGFXDIR)/old_charizard.4bpp >$@ +$(BATTRANSGFXDIR)/vs_frame.4bpp: GFX_OPTS := -num_tiles 16 -$(UNUSEDGFXDIR)/obi2.4bpp: $(UNUSEDGFXDIR)/old_bulbasaur2.4bpp $(UNUSEDGFXDIR)/old_battle_interface_1.4bpp $(UNUSEDGFXDIR)/old_battle_interface_2.4bpp $(UNUSEDGFXDIR)/old_battle_interface_3.4bpp - @cat $(UNUSEDGFXDIR)/old_bulbasaur2.4bpp $(UNUSEDGFXDIR)/old_battle_interface_1.4bpp $(UNUSEDGFXDIR)/old_battle_interface_2.4bpp $(UNUSEDGFXDIR)/old_battle_interface_3.4bpp >$@ -$(MENUGFXDIR)/hp_numbers.4bpp: $(MENUGFXDIR)/hpbar_anim.4bpp $(MENUGFXDIR)/numbers1.4bpp $(MENUGFXDIR)/numbers2.4bpp - @cat $(MENUGFXDIR)/hpbar_anim.4bpp $(MENUGFXDIR)/numbers1.4bpp $(MENUGFXDIR)/numbers2.4bpp >$@ +#### Contest #### -$(UNUSEDGFXDIR)/redyellowgreen_frame.bin: $(UNUSEDGFXDIR)/red_frame.bin $(UNUSEDGFXDIR)/yellow_frame.bin $(UNUSEDGFXDIR)/green_frame.bin $(UNUSEDGFXDIR)/blank_frame.bin - @cat $(UNUSEDGFXDIR)/red_frame.bin $(UNUSEDGFXDIR)/yellow_frame.bin $(UNUSEDGFXDIR)/green_frame.bin $(UNUSEDGFXDIR)/blank_frame.bin >$@ +CONTESTGFXDIR := graphics/contest -$(UNUSEDGFXDIR)/color_frames.4bpp: $(UNUSEDGFXDIR)/color_frames.png - $(GFX) $< $@ -num_tiles 353 +$(CONTESTGFXDIR)/nextturn.4bpp: GFX_OPTS := -num_tiles 8 -$(UNUSEDGFXDIR)/old_contest.4bpp: $(UNUSEDGFXDIR)/old_contest_frame_1.4bpp $(UNUSEDGFXDIR)/old_contest_floor.4bpp $(UNUSEDGFXDIR)/old_contest_frame_2.4bpp $(UNUSEDGFXDIR)/old_contest_symbols.4bpp $(UNUSEDGFXDIR)/old_contest_meter.4bpp $(UNUSEDGFXDIR)/old_contest_classes.4bpp $(UNUSEDGFXDIR)/old_contest_numbers.4bpp - @cat $(UNUSEDGFXDIR)/old_contest_frame_1.4bpp $(UNUSEDGFXDIR)/old_contest_floor.4bpp $(UNUSEDGFXDIR)/old_contest_frame_2.4bpp $(UNUSEDGFXDIR)/old_contest_symbols.4bpp $(UNUSEDGFXDIR)/old_contest_meter.4bpp $(UNUSEDGFXDIR)/old_contest_classes.4bpp $(UNUSEDGFXDIR)/old_contest_numbers.4bpp >$@ -$(UNUSEDGFXDIR)/old_contest_2.4bpp: $(UNUSEDGFXDIR)/old_contest_2_1.4bpp $(UNUSEDGFXDIR)/old_contest_2_2.4bpp - @cat $(UNUSEDGFXDIR)/old_contest_2_1.4bpp $(UNUSEDGFXDIR)/old_contest_2_2.4bpp >$@ +#### Picture Frame #### -$(MASKSGFXDIR)/unknown_D2EDFC.4bpp: $(MASKSGFXDIR)/unknown_D2EDFC.png - $(GFX) $< $@ -num_tiles 14 +PICFRAMEGFXDIR := graphics/picture_frame + +$(PICFRAMEGFXDIR)/frame5.4bpp: GFX_OPTS := -num_tiles 86 -$(BATTRANSGFXDIR)/vs_frame.4bpp: $(BATTRANSGFXDIR)/vs_frame.png - $(GFX) $< $@ -num_tiles 16 -$(MENUGFXDIR)/party_menu_misc.4bpp: $(MENUGFXDIR)/party_menu_misc.png - $(GFX) $< $@ -num_tiles 116 +#### Move Types #### + +TYPESGFXDIR := graphics/types + +types := normal fight flying poison ground rock bug ghost steel mystery fire water grass electric psychic ice dragon dark +contest_types := cool beauty cute smart tough $(TYPESGFXDIR)/move_types.4bpp: $(types:%=$(TYPESGFXDIR)/%.4bpp) $(contest_types:%=$(TYPESGFXDIR)/contest_%.4bpp) @cat $^ >$@ @@ -217,35 +209,45 @@ $(TYPESGFXDIR)/move_types.4bpp: $(types:%=$(TYPESGFXDIR)/%.4bpp) $(contest_types $(TYPESGFXDIR)/move_types.gbapal: $(TYPESGFXDIR)/move_types_1.gbapal $(TYPESGFXDIR)/move_types_2.gbapal $(TYPESGFXDIR)/move_types_3.gbapal @cat $(TYPESGFXDIR)/move_types_1.gbapal $(TYPESGFXDIR)/move_types_2.gbapal $(TYPESGFXDIR)/move_types_3.gbapal >$@ -$(MENUGFXDIR)/status_screen.4bpp: $(MENUGFXDIR)/status_screen.png - $(GFX) $< $@ -num_tiles 217 -$(PKNAVGFXDIR)/menu_options.4bpp: $(PKNAVGFXDIR)/menu_hoennmap.4bpp $(PKNAVGFXDIR)/menu_condition.4bpp $(PKNAVGFXDIR)/menu_eyes.4bpp $(PKNAVGFXDIR)/menu_ribbons.4bpp $(PKNAVGFXDIR)/menu_off.4bpp - @cat $(PKNAVGFXDIR)/menu_hoennmap.4bpp $(PKNAVGFXDIR)/menu_condition.4bpp $(PKNAVGFXDIR)/menu_eyes.4bpp $(PKNAVGFXDIR)/menu_ribbons.4bpp $(PKNAVGFXDIR)/menu_off.4bpp >$@ +#### Miscellaneous #### -$(PKNAVGFXDIR)/condition_menu_misc.4bpp: $(PKNAVGFXDIR)/condition_menu_misc.png - $(GFX) $< $@ -num_tiles 41 +MISCGFXDIR := graphics/misc -$(PKNAVGFXDIR)/condition_search.4bpp: $(PKNAVGFXDIR)/condition_search_cool.4bpp $(PKNAVGFXDIR)/condition_search_beauty.4bpp $(PKNAVGFXDIR)/condition_search_cute.4bpp $(PKNAVGFXDIR)/condition_search_smart.4bpp $(PKNAVGFXDIR)/condition_search_tough.4bpp $(PKNAVGFXDIR)/condition_search_cancel.4bpp - @cat $(PKNAVGFXDIR)/condition_search_cool.4bpp $(PKNAVGFXDIR)/condition_search_beauty.4bpp $(PKNAVGFXDIR)/condition_search_cute.4bpp $(PKNAVGFXDIR)/condition_search_smart.4bpp $(PKNAVGFXDIR)/condition_search_tough.4bpp $(PKNAVGFXDIR)/condition_search_cancel.4bpp >$@ +$(MISCGFXDIR)/hof.4bpp: GFX_OPTS := -num_tiles 37 -$(PSSGFXDIR)/header.4bpp: $(PSSGFXDIR)/header.png - $(GFX) $< $@ -num_tiles 47 +$(MISCGFXDIR)/end_copyright.4bpp: GFX_OPTS := -num_tiles 90 -$(PSSGFXDIR)/misc1.4bpp: $(PSSGFXDIR)/misc1.png - $(GFX) $< $@ -num_tiles 91 +$(MISCGFXDIR)/birch_help.4bpp: $(MISCGFXDIR)/birch_bag.4bpp $(MISCGFXDIR)/birch_grass.4bpp + @cat $(MISCGFXDIR)/birch_bag.4bpp $(MISCGFXDIR)/birch_grass.4bpp >$@ -$(MISCGFXDIR)/hof.4bpp: $(MISCGFXDIR)/hof.png - $(GFX) $< $@ -num_tiles 37 +$(MISCGFXDIR)/clock_misc.4bpp: $(MISCGFXDIR)/clock_hands.4bpp $(MISCGFXDIR)/clock_ampm.4bpp + @cat $(MISCGFXDIR)/clock_hands.4bpp $(MISCGFXDIR)/clock_ampm.4bpp >$@ -$(MENUGFXDIR)/wordgroup_frame.4bpp: $(MENUGFXDIR)/wordgroup_frame.png - $(GFX) $< $@ -num_tiles 65 -$(INTROGFXDIR)/copyright.4bpp: $(INTROGFXDIR)/copyright.png - $(GFX) $< $@ -num_tiles 43 +#### Unused #### -$(TITLEGFXDIR)/press_start.4bpp: $(TITLEGFXDIR)/press_start.png - $(GFX) $< $@ -num_tiles 41 +UNUSEDGFXDIR := graphics/unused -$(MISCGFXDIR)/end_copyright.4bpp: $(MISCGFXDIR)/end_copyright.png - $(GFX) $< $@ -num_tiles 90 +$(UNUSEDGFXDIR)/redyellowgreen_frame.bin: $(UNUSEDGFXDIR)/red_frame.bin $(UNUSEDGFXDIR)/yellow_frame.bin $(UNUSEDGFXDIR)/green_frame.bin $(UNUSEDGFXDIR)/blank_frame.bin + @cat $(UNUSEDGFXDIR)/red_frame.bin $(UNUSEDGFXDIR)/yellow_frame.bin $(UNUSEDGFXDIR)/green_frame.bin $(UNUSEDGFXDIR)/blank_frame.bin >$@ + +$(UNUSEDGFXDIR)/color_frames.4bpp: GFX_OPTS := -num_tiles 353 + +$(UNUSEDGFXDIR)/old_contest.4bpp: $(UNUSEDGFXDIR)/old_contest_frame_1.4bpp $(UNUSEDGFXDIR)/old_contest_floor.4bpp $(UNUSEDGFXDIR)/old_contest_frame_2.4bpp $(UNUSEDGFXDIR)/old_contest_symbols.4bpp $(UNUSEDGFXDIR)/old_contest_meter.4bpp $(UNUSEDGFXDIR)/old_contest_classes.4bpp $(UNUSEDGFXDIR)/old_contest_numbers.4bpp + @cat $(UNUSEDGFXDIR)/old_contest_frame_1.4bpp $(UNUSEDGFXDIR)/old_contest_floor.4bpp $(UNUSEDGFXDIR)/old_contest_frame_2.4bpp $(UNUSEDGFXDIR)/old_contest_symbols.4bpp $(UNUSEDGFXDIR)/old_contest_meter.4bpp $(UNUSEDGFXDIR)/old_contest_classes.4bpp $(UNUSEDGFXDIR)/old_contest_numbers.4bpp >$@ + +$(UNUSEDGFXDIR)/old_contest_2.4bpp: $(UNUSEDGFXDIR)/old_contest_2_1.4bpp $(UNUSEDGFXDIR)/old_contest_2_2.4bpp + @cat $(UNUSEDGFXDIR)/old_contest_2_1.4bpp $(UNUSEDGFXDIR)/old_contest_2_2.4bpp >$@ + +$(UNUSEDGFXDIR)/obi_palpak1.gbapal: $(UNUSEDGFXDIR)/old_pal1.gbapal $(UNUSEDGFXDIR)/old_pal2.gbapal $(UNUSEDGFXDIR)/old_pal3.gbapal + @cat $(UNUSEDGFXDIR)/old_pal1.gbapal $(UNUSEDGFXDIR)/old_pal2.gbapal $(UNUSEDGFXDIR)/old_pal3.gbapal >$@ + +$(UNUSEDGFXDIR)/obi_palpak3.gbapal: $(UNUSEDGFXDIR)/old_pal5.gbapal $(UNUSEDGFXDIR)/old_pal6.gbapal $(UNUSEDGFXDIR)/old_pal7.gbapal + @cat $(UNUSEDGFXDIR)/old_pal5.gbapal $(UNUSEDGFXDIR)/old_pal6.gbapal $(UNUSEDGFXDIR)/old_pal7.gbapal >$@ + +$(UNUSEDGFXDIR)/obi1.4bpp: $(UNUSEDGFXDIR)/old_bulbasaur.4bpp $(UNUSEDGFXDIR)/old_charizard.4bpp + @cat $(UNUSEDGFXDIR)/old_bulbasaur.4bpp $(UNUSEDGFXDIR)/old_charizard.4bpp >$@ + +$(UNUSEDGFXDIR)/obi2.4bpp: $(UNUSEDGFXDIR)/old_bulbasaur2.4bpp $(UNUSEDGFXDIR)/old_battle_interface_1.4bpp $(UNUSEDGFXDIR)/old_battle_interface_2.4bpp $(UNUSEDGFXDIR)/old_battle_interface_3.4bpp + @cat $(UNUSEDGFXDIR)/old_bulbasaur2.4bpp $(UNUSEDGFXDIR)/old_battle_interface_1.4bpp $(UNUSEDGFXDIR)/old_battle_interface_2.4bpp $(UNUSEDGFXDIR)/old_battle_interface_3.4bpp >$@ diff --git a/override-de.mk b/override-de.mk index 02861fc6a..64a139efb 100644 --- a/override-de.mk +++ b/override-de.mk @@ -6,15 +6,15 @@ INTROGFXDIR := graphics/intro MISCGFXDIR := graphics/misc $(MENUGFXDIR)/wordgroup_frame.4bpp: $(MENUGFXDIR)/wordgroup_frame.png - $(GFX) $< $@ -num_tiles 76 + $(GBAGFX) $< $@ -num_tiles 76 $(MENUGFXDIR)/check_berry.4bpp: $(MENUGFXDIR)/check_berry.png - $(GFX) $< $@ -num_tiles 97 + $(GBAGFX) $< $@ -num_tiles 97 $(INTROGFXDIR)/copyright.4bpp: $(INTROGFXDIR)/copyright.png - $(GFX) $< $@ -num_tiles 47 + $(GBAGFX) $< $@ -num_tiles 47 $(MISCGFXDIR)/end_copyright.4bpp: $(MISCGFXDIR)/end_copyright.png - $(GFX) $< $@ -num_tiles 92 + $(GBAGFX) $< $@ -num_tiles 92 # # tilesets.mk @@ -22,4 +22,4 @@ $(MISCGFXDIR)/end_copyright.4bpp: $(MISCGFXDIR)/end_copyright.png TILESETDIR := data/tilesets $(TILESETDIR)/secondary/shop/tiles.4bpp: $(TILESETDIR)/secondary/shop/tiles.png - $(GFX) $< $@ -num_tiles 503 + $(GBAGFX) $< $@ -num_tiles 503 diff --git a/asm/crt0.s b/src/crt0.s index 049392be9..049392be9 100644 --- a/asm/crt0.s +++ b/src/crt0.s diff --git a/asm/libagbsyscall.s b/src/libs/libagbsyscall.s index de59d4c27..cdf6ca905 100644 --- a/asm/libagbsyscall.s +++ b/src/libs/libagbsyscall.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .syntax unified .text diff --git a/asm/libgcnmultiboot.s b/src/libs/libgcnmultiboot.s index 91bc1890c..8c8b94998 100644 --- a/asm/libgcnmultiboot.s +++ b/src/libs/libgcnmultiboot.s @@ -1,7 +1,7 @@ @ This library can be used to download and execute a multi-boot image from @ a GameCube using the JOY Bus protocol over the link cable. - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/constants.inc" .equiv GCMB_STRUCT_COUNTER1, 0x00 diff --git a/asm/m4a_1.s b/src/libs/m4a_1.s index 849cf5c2d..be8b44488 100644 --- a/asm/m4a_1.s +++ b/src/libs/m4a_1.s @@ -1,4 +1,4 @@ - .include "asm/macros.inc" + .include "include/macros.inc" .include "constants/gba_constants.inc" .include "constants/m4a_constants.inc" diff --git a/sym_bss.txt b/sym_bss.txt index d2d218ec4..531a700e9 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -34,7 +34,7 @@ .include "src/field/field_specials.o" .include "src/pokemon/learn_move.o" .include "src/field/player_pc.o" - .include "asm/m4a_1.o" + .include "src/libs/m4a_1.o" .include "src/libs/agb_flash.o" .include "src/libs/siirtc.o" .include "tools/agbcc/lib/libgcc.a:dp-bit.o" diff --git a/tilesets.mk b/tilesets.mk index 9bb9a1f3d..ae0e57c9b 100644 --- a/tilesets.mk +++ b/tilesets.mk @@ -1,185 +1,89 @@ TILESETDIR := data/tilesets -$(TILESETDIR)/secondary/petalburg/tiles.4bpp: $(TILESETDIR)/secondary/petalburg/tiles.png - $(GFX) $< $@ -num_tiles 159 - -$(TILESETDIR)/secondary/rustboro/tiles.4bpp: $(TILESETDIR)/secondary/rustboro/tiles.png - $(GFX) $< $@ -num_tiles 498 - -$(TILESETDIR)/secondary/dewford/tiles.4bpp: $(TILESETDIR)/secondary/dewford/tiles.png - $(GFX) $< $@ -num_tiles 343 - -$(TILESETDIR)/secondary/slateport/tiles.4bpp: $(TILESETDIR)/secondary/slateport/tiles.png - $(GFX) $< $@ -num_tiles 504 - -$(TILESETDIR)/secondary/mauville/tiles.4bpp: $(TILESETDIR)/secondary/mauville/tiles.png - $(GFX) $< $@ -num_tiles 450 - -$(TILESETDIR)/secondary/lavaridge/tiles.4bpp: $(TILESETDIR)/secondary/lavaridge/tiles.png - $(GFX) $< $@ -num_tiles 348 - -$(TILESETDIR)/secondary/fallarbor/tiles.4bpp: $(TILESETDIR)/secondary/fallarbor/tiles.png - $(GFX) $< $@ -num_tiles 374 - -$(TILESETDIR)/secondary/fortree/tiles.4bpp: $(TILESETDIR)/secondary/fortree/tiles.png - $(GFX) $< $@ -num_tiles 493 - -$(TILESETDIR)/secondary/mossdeep/tiles.4bpp: $(TILESETDIR)/secondary/mossdeep/tiles.png - $(GFX) $< $@ -num_tiles 499 - -$(TILESETDIR)/secondary/pacifidlog/tiles.4bpp: $(TILESETDIR)/secondary/pacifidlog/tiles.png - $(GFX) $< $@ -num_tiles 504 - -$(TILESETDIR)/secondary/sootopolis/tiles.4bpp: $(TILESETDIR)/secondary/sootopolis/tiles.png - $(GFX) $< $@ -num_tiles 180 - -$(TILESETDIR)/primary/building/tiles.4bpp: $(TILESETDIR)/primary/building/tiles.png - $(GFX) $< $@ -num_tiles 502 - -$(TILESETDIR)/secondary/shop/tiles.4bpp: $(TILESETDIR)/secondary/shop/tiles.png - $(GFX) $< $@ -num_tiles 502 - -$(TILESETDIR)/secondary/pokemon_center/tiles.4bpp: $(TILESETDIR)/secondary/pokemon_center/tiles.png - $(GFX) $< $@ -num_tiles 478 - -$(TILESETDIR)/secondary/cave/tiles.4bpp: $(TILESETDIR)/secondary/cave/tiles.png - $(GFX) $< $@ -num_tiles 420 - -$(TILESETDIR)/secondary/pokemon_school/tiles.4bpp: $(TILESETDIR)/secondary/pokemon_school/tiles.png - $(GFX) $< $@ -num_tiles 278 - -$(TILESETDIR)/secondary/pokemon_fan_club/tiles.4bpp: $(TILESETDIR)/secondary/pokemon_fan_club/tiles.png - $(GFX) $< $@ -num_tiles 319 - -$(TILESETDIR)/secondary/unused_1/tiles.4bpp: $(TILESETDIR)/secondary/unused_1/tiles.png - $(GFX) $< $@ -num_tiles 17 - -$(TILESETDIR)/secondary/meteor_falls/tiles.4bpp: $(TILESETDIR)/secondary/meteor_falls/tiles.png - $(GFX) $< $@ -num_tiles 422 - -$(TILESETDIR)/secondary/oceanic_museum/tiles.4bpp: $(TILESETDIR)/secondary/oceanic_museum/tiles.png - $(GFX) $< $@ -num_tiles 319 - -$(TILESETDIR)/secondary/cable_club/unknown_tiles.4bpp: $(TILESETDIR)/secondary/cable_club/unknown_tiles.png - $(GFX) $< $@ -num_tiles 120 - -$(TILESETDIR)/secondary/seashore_house/tiles.4bpp: $(TILESETDIR)/secondary/seashore_house/tiles.png - $(GFX) $< $@ -num_tiles 312 - -$(TILESETDIR)/secondary/pretty_petal_flower_shop/tiles.4bpp: $(TILESETDIR)/secondary/pretty_petal_flower_shop/tiles.png - $(GFX) $< $@ -num_tiles 345 - -$(TILESETDIR)/secondary/pokemon_day_care/tiles.4bpp: $(TILESETDIR)/secondary/pokemon_day_care/tiles.png - $(GFX) $< $@ -num_tiles 355 - -$(TILESETDIR)/secondary/facility/tiles.4bpp: $(TILESETDIR)/secondary/facility/tiles.png - $(GFX) $< $@ -num_tiles 503 - -$(TILESETDIR)/secondary/secret_base/brown_cave/tiles.4bpp: $(TILESETDIR)/secondary/secret_base/brown_cave/tiles.png - $(GFX) $< $@ -num_tiles 83 - -$(TILESETDIR)/secondary/secret_base/tree/tiles.4bpp: $(TILESETDIR)/secondary/secret_base/tree/tiles.png - $(GFX) $< $@ -num_tiles 83 - -$(TILESETDIR)/secondary/secret_base/shrub/tiles.4bpp: $(TILESETDIR)/secondary/secret_base/shrub/tiles.png - $(GFX) $< $@ -num_tiles 83 - -$(TILESETDIR)/secondary/secret_base/blue_cave/tiles.4bpp: $(TILESETDIR)/secondary/secret_base/blue_cave/tiles.png - $(GFX) $< $@ -num_tiles 83 - -$(TILESETDIR)/secondary/secret_base/yellow_cave/tiles.4bpp: $(TILESETDIR)/secondary/secret_base/yellow_cave/tiles.png - $(GFX) $< $@ -num_tiles 83 - -$(TILESETDIR)/secondary/secret_base/red_cave/tiles.4bpp: $(TILESETDIR)/secondary/secret_base/red_cave/tiles.png - $(GFX) $< $@ -num_tiles 83 - -$(TILESETDIR)/secondary/inside_of_truck/tiles.4bpp: $(TILESETDIR)/secondary/inside_of_truck/tiles.png - $(GFX) $< $@ -num_tiles 62 - -$(TILESETDIR)/secondary/contest/tiles.4bpp: $(TILESETDIR)/secondary/contest/tiles.png - $(GFX) $< $@ -num_tiles 430 - -$(TILESETDIR)/secondary/lilycove_museum/tiles.4bpp: $(TILESETDIR)/secondary/lilycove_museum/tiles.png - $(GFX) $< $@ -num_tiles 431 - -$(TILESETDIR)/secondary/lab/tiles.4bpp: $(TILESETDIR)/secondary/lab/tiles.png - $(GFX) $< $@ -num_tiles 500 - -$(TILESETDIR)/secondary/underwater/tiles.4bpp: $(TILESETDIR)/secondary/underwater/tiles.png - $(GFX) $< $@ -num_tiles 500 - -$(TILESETDIR)/secondary/generic_building/tiles.4bpp: $(TILESETDIR)/secondary/generic_building/tiles.png - $(GFX) $< $@ -num_tiles 509 - -$(TILESETDIR)/secondary/mauville_game_corner/tiles.4bpp: $(TILESETDIR)/secondary/mauville_game_corner/tiles.png - $(GFX) $< $@ -num_tiles 469 - -$(TILESETDIR)/secondary/unused_2/tiles.4bpp: $(TILESETDIR)/secondary/unused_2/tiles.png - $(GFX) $< $@ -num_tiles 150 - -$(TILESETDIR)/secondary/rustboro_gym/tiles.4bpp: $(TILESETDIR)/secondary/rustboro_gym/tiles.png - $(GFX) $< $@ -num_tiles 94 - -$(TILESETDIR)/secondary/dewford_gym/tiles.4bpp: $(TILESETDIR)/secondary/dewford_gym/tiles.png - $(GFX) $< $@ -num_tiles 88 - -$(TILESETDIR)/secondary/lavaridge_gym/tiles.4bpp: $(TILESETDIR)/secondary/lavaridge_gym/tiles.png - $(GFX) $< $@ -num_tiles 70 - -$(TILESETDIR)/secondary/fortree_gym/tiles.4bpp: $(TILESETDIR)/secondary/fortree_gym/tiles.png - $(GFX) $< $@ -num_tiles 84 - -$(TILESETDIR)/secondary/mossdeep_gym/tiles.4bpp: $(TILESETDIR)/secondary/mossdeep_gym/tiles.png - $(GFX) $< $@ -num_tiles 122 - -$(TILESETDIR)/secondary/sootopolis_gym/tiles.4bpp: $(TILESETDIR)/secondary/sootopolis_gym/tiles.png - $(GFX) $< $@ -num_tiles 484 - -$(TILESETDIR)/secondary/trick_house_puzzle/tiles.4bpp: $(TILESETDIR)/secondary/trick_house_puzzle/tiles.png - $(GFX) $< $@ -num_tiles 255 - -$(TILESETDIR)/secondary/ship/tiles.4bpp: $(TILESETDIR)/secondary/ship/tiles.png - $(GFX) $< $@ -num_tiles 342 - -$(TILESETDIR)/secondary/elite_four/tiles.4bpp: $(TILESETDIR)/secondary/elite_four/tiles.png - $(GFX) $< $@ -num_tiles 505 +$(TILESETDIR)/secondary/petalburg/tiles.4bpp: GFX_OPTS := -num_tiles 159 +$(TILESETDIR)/secondary/rustboro/tiles.4bpp: GFX_OPTS := -num_tiles 498 +$(TILESETDIR)/secondary/dewford/tiles.4bpp: GFX_OPTS := -num_tiles 343 +$(TILESETDIR)/secondary/slateport/tiles.4bpp: GFX_OPTS := -num_tiles 504 +$(TILESETDIR)/secondary/mauville/tiles.4bpp: GFX_OPTS := -num_tiles 450 +$(TILESETDIR)/secondary/lavaridge/tiles.4bpp: GFX_OPTS := -num_tiles 348 +$(TILESETDIR)/secondary/fallarbor/tiles.4bpp: GFX_OPTS := -num_tiles 374 +$(TILESETDIR)/secondary/fortree/tiles.4bpp: GFX_OPTS := -num_tiles 493 +$(TILESETDIR)/secondary/mossdeep/tiles.4bpp: GFX_OPTS := -num_tiles 499 +$(TILESETDIR)/secondary/pacifidlog/tiles.4bpp: GFX_OPTS := -num_tiles 504 +$(TILESETDIR)/secondary/sootopolis/tiles.4bpp: GFX_OPTS := -num_tiles 180 +$(TILESETDIR)/primary/building/tiles.4bpp: GFX_OPTS := -num_tiles 502 +$(TILESETDIR)/secondary/shop/tiles.4bpp: GFX_OPTS := -num_tiles 502 +$(TILESETDIR)/secondary/pokemon_center/tiles.4bpp: GFX_OPTS := -num_tiles 478 +$(TILESETDIR)/secondary/cave/tiles.4bpp: GFX_OPTS := -num_tiles 420 +$(TILESETDIR)/secondary/pokemon_school/tiles.4bpp: GFX_OPTS := -num_tiles 278 +$(TILESETDIR)/secondary/pokemon_fan_club/tiles.4bpp: GFX_OPTS := -num_tiles 319 +$(TILESETDIR)/secondary/unused_1/tiles.4bpp: GFX_OPTS := -num_tiles 17 +$(TILESETDIR)/secondary/meteor_falls/tiles.4bpp: GFX_OPTS := -num_tiles 422 +$(TILESETDIR)/secondary/oceanic_museum/tiles.4bpp: GFX_OPTS := -num_tiles 319 +$(TILESETDIR)/secondary/cable_club/unknown_tiles.4bpp: GFX_OPTS := -num_tiles 120 +$(TILESETDIR)/secondary/seashore_house/tiles.4bpp: GFX_OPTS := -num_tiles 312 +$(TILESETDIR)/secondary/pretty_petal_flower_shop/tiles.4bpp: GFX_OPTS := -num_tiles 345 +$(TILESETDIR)/secondary/pokemon_day_care/tiles.4bpp: GFX_OPTS := -num_tiles 355 +$(TILESETDIR)/secondary/facility/tiles.4bpp: GFX_OPTS := -num_tiles 503 +$(TILESETDIR)/secondary/secret_base/brown_cave/tiles.4bpp: GFX_OPTS := -num_tiles 83 +$(TILESETDIR)/secondary/secret_base/tree/tiles.4bpp: GFX_OPTS := -num_tiles 83 +$(TILESETDIR)/secondary/secret_base/shrub/tiles.4bpp: GFX_OPTS := -num_tiles 83 +$(TILESETDIR)/secondary/secret_base/blue_cave/tiles.4bpp: GFX_OPTS := -num_tiles 83 +$(TILESETDIR)/secondary/secret_base/yellow_cave/tiles.4bpp: GFX_OPTS := -num_tiles 83 +$(TILESETDIR)/secondary/secret_base/red_cave/tiles.4bpp: GFX_OPTS := -num_tiles 83 +$(TILESETDIR)/secondary/inside_of_truck/tiles.4bpp: GFX_OPTS := -num_tiles 62 +$(TILESETDIR)/secondary/contest/tiles.4bpp: GFX_OPTS := -num_tiles 430 +$(TILESETDIR)/secondary/lilycove_museum/tiles.4bpp: GFX_OPTS := -num_tiles 431 +$(TILESETDIR)/secondary/lab/tiles.4bpp: GFX_OPTS := -num_tiles 500 +$(TILESETDIR)/secondary/underwater/tiles.4bpp: GFX_OPTS := -num_tiles 500 +$(TILESETDIR)/secondary/generic_building/tiles.4bpp: GFX_OPTS := -num_tiles 509 +$(TILESETDIR)/secondary/mauville_game_corner/tiles.4bpp: GFX_OPTS := -num_tiles 469 +$(TILESETDIR)/secondary/unused_2/tiles.4bpp: GFX_OPTS := -num_tiles 150 +$(TILESETDIR)/secondary/rustboro_gym/tiles.4bpp: GFX_OPTS := -num_tiles 94 +$(TILESETDIR)/secondary/dewford_gym/tiles.4bpp: GFX_OPTS := -num_tiles 88 +$(TILESETDIR)/secondary/lavaridge_gym/tiles.4bpp: GFX_OPTS := -num_tiles 70 +$(TILESETDIR)/secondary/fortree_gym/tiles.4bpp: GFX_OPTS := -num_tiles 84 +$(TILESETDIR)/secondary/mossdeep_gym/tiles.4bpp: GFX_OPTS := -num_tiles 122 +$(TILESETDIR)/secondary/sootopolis_gym/tiles.4bpp: GFX_OPTS := -num_tiles 484 +$(TILESETDIR)/secondary/trick_house_puzzle/tiles.4bpp: GFX_OPTS := -num_tiles 255 +$(TILESETDIR)/secondary/ship/tiles.4bpp: GFX_OPTS := -num_tiles 342 +$(TILESETDIR)/secondary/elite_four/tiles.4bpp: GFX_OPTS := -num_tiles 505 # reproduce overflow quirk - $(TILESETDIR)/secondary/pokemon_school/tiles.4bpp.lz: $(TILESETDIR)/secondary/pokemon_school/tiles.4bpp - $(GFX) $< $@ -overflow 10 + $(GBAGFX) $< $@ -overflow 10 $(TILESETDIR)/secondary/pokemon_fan_club/tiles.4bpp.lz: $(TILESETDIR)/secondary/pokemon_fan_club/tiles.4bpp - $(GFX) $< $@ -overflow 12 + $(GBAGFX) $< $@ -overflow 12 $(TILESETDIR)/secondary/pretty_petal_flower_shop/tiles.4bpp.lz: $(TILESETDIR)/secondary/pretty_petal_flower_shop/tiles.4bpp - $(GFX) $< $@ -overflow 8 + $(GBAGFX) $< $@ -overflow 8 $(TILESETDIR)/secondary/pokemon_day_care/tiles.4bpp.lz: $(TILESETDIR)/secondary/pokemon_day_care/tiles.4bpp - $(GFX) $< $@ -overflow 14 + $(GBAGFX) $< $@ -overflow 14 $(TILESETDIR)/secondary/inside_of_truck/tiles.4bpp.lz: $(TILESETDIR)/secondary/inside_of_truck/tiles.4bpp - $(GFX) $< $@ -overflow 10 + $(GBAGFX) $< $@ -overflow 10 $(TILESETDIR)/secondary/battle_tower/tiles.4bpp.lz: $(TILESETDIR)/secondary/battle_tower/tiles.4bpp - $(GFX) $< $@ -overflow 16 + $(GBAGFX) $< $@ -overflow 16 # unused copies of secret base tiles $(TILESETDIR)/secondary/secret_base/brown_cave/unused_tiles.4bpp: $(TILESETDIR)/secondary/secret_base/brown_cave/tiles.png - $(GFX) $< $@ -num_tiles 82 + $(GBAGFX) $< $@ -num_tiles 82 $(TILESETDIR)/secondary/secret_base/tree/unused_tiles.4bpp: $(TILESETDIR)/secondary/secret_base/tree/tiles.png - $(GFX) $< $@ -num_tiles 82 + $(GBAGFX) $< $@ -num_tiles 82 $(TILESETDIR)/secondary/secret_base/shrub/unused_tiles.4bpp: $(TILESETDIR)/secondary/secret_base/shrub/tiles.png - $(GFX) $< $@ -num_tiles 82 + $(GBAGFX) $< $@ -num_tiles 82 $(TILESETDIR)/secondary/secret_base/blue_cave/unused_tiles.4bpp: $(TILESETDIR)/secondary/secret_base/blue_cave/tiles.png - $(GFX) $< $@ -num_tiles 82 + $(GBAGFX) $< $@ -num_tiles 82 $(TILESETDIR)/secondary/secret_base/yellow_cave/unused_tiles.4bpp: $(TILESETDIR)/secondary/secret_base/yellow_cave/tiles.png - $(GFX) $< $@ -num_tiles 82 + $(GBAGFX) $< $@ -num_tiles 82 $(TILESETDIR)/secondary/secret_base/red_cave/unused_tiles.4bpp: $(TILESETDIR)/secondary/secret_base/red_cave/tiles.png - $(GFX) $< $@ -num_tiles 82 + $(GBAGFX) $< $@ -num_tiles 82 |