diff --git a/Makefile b/Makefile index 261b58c24..c5fad3779 100644 --- a/Makefile +++ b/Makefile @@ -10,43 +10,26 @@ gfx := $(PYTHON) gfx.py includes := $(PYTHON) $(poketools)/scan_includes.py -crystal11_obj := \ -wram11.o \ -crystal11.o \ -lib/mobile/main.o \ -home.o \ -audio.o \ -maps_crystal.o \ -engine/events_crystal.o \ -engine/credits_crystal.o \ -data/egg_moves_crystal.o \ -data/evos_attacks_crystal.o \ -data/pokedex/entries_crystal.o \ -misc/crystal_misc.o \ -text/common_text.o \ -gfx/pics.o - crystal_obj := \ wram.o \ main.o \ lib/mobile/main.o \ home.o \ audio.o \ -maps_crystal.o \ -engine/events_crystal.o \ -engine/credits_crystal.o \ -data/egg_moves_crystal.o \ -data/evos_attacks_crystal.o \ -data/pokedex/entries_crystal.o \ +maps.o \ +engine/events.o \ +engine/credits.o \ +data/egg_moves.o \ +data/evos_attacks.o \ +data/pokedex/entries.o \ misc/crystal_misc.o \ text/common_text.o \ gfx/pics.o -all_obj := $(crystal_obj) crystal11.o wram11.o +crystal11_obj := $(crystal_obj:.o=11.o) -# object dependencies -$(foreach obj, $(all_obj), \ - $(eval $(obj:.o=)_dep := $(shell $(includes) $(obj:.o=.asm))) \ +$(foreach obj, $(crystal_obj:.o=), \ + $(eval $(obj)_dep := $(shell $(includes) $(obj).asm)) \ ) @@ -54,17 +37,18 @@ roms := pokecrystal.gbc all: $(roms) crystal: pokecrystal.gbc - crystal11: pokecrystal11.gbc clean: - rm -f $(roms) $(all_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) + rm -f $(roms) $(crystal_obj) $(crystal11_obj) $(roms:.gbc=.map) $(roms:.gbc=.sym) compare: pokecrystal.gbc pokecrystal11.gbc @$(MD5) roms.md5 %.asm: ; -$(all_obj): $$*.asm $$($$*_dep) +$(crystal11_obj): %11.o: %.asm $$(%_dep) + rgbasm -D CRYSTAL11 -o $@ $< +$(crystal_obj): %.o: %.asm $$(%_dep) rgbasm -o $@ $< pokecrystal11.gbc: $(crystal11_obj) diff --git a/crystal11.asm b/crystal11.asm deleted file mode 100644 index c4c7712e8..000000000 --- a/crystal11.asm +++ /dev/null @@ -1,4 +0,0 @@ -CRYSTAL11 = 1 -CORRUPT_TILES = 1 - -INCLUDE "main.asm" diff --git a/data/egg_moves_crystal.asm b/data/egg_moves_crystal.asm deleted file mode 100644 index 50fbb1471..000000000 --- a/data/egg_moves_crystal.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "pokecrystal.asm" -INCLUDE "data/egg_moves.asm" diff --git a/data/evos_attacks_crystal.asm b/data/evos_attacks_crystal.asm deleted file mode 100644 index 22ec9d84c..000000000 --- a/data/evos_attacks_crystal.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "pokecrystal.asm" -INCLUDE "data/evos_attacks.asm" diff --git a/engine/credits_crystal.asm b/engine/credits_crystal.asm deleted file mode 100644 index 51265434b..000000000 --- a/engine/credits_crystal.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "pokecrystal.asm" -INCLUDE "engine/credits.asm" diff --git a/engine/events_crystal.asm b/engine/events_crystal.asm deleted file mode 100644 index 56cb7a200..000000000 --- a/engine/events_crystal.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "pokecrystal.asm" -INCLUDE "engine/events.asm" diff --git a/extras b/extras index adbc204d7..9644160b8 160000 --- a/extras +++ b/extras @@ -1 +1 @@ -Subproject commit adbc204d741bec7a68c1e6cd67751f226d0347cb +Subproject commit 9644160b87e706f3a6ae20fe09e9c469f628c06d diff --git a/includes.asm b/includes.asm index 456623d9f..1b3d6bed5 100644 --- a/includes.asm +++ b/includes.asm @@ -1,2 +1,3 @@ +INCLUDE "version.asm" INCLUDE "contents.asm" INCLUDE "constants.asm" diff --git a/maps_crystal.asm b/maps_crystal.asm deleted file mode 100644 index 7bb87d329..000000000 --- a/maps_crystal.asm +++ /dev/null @@ -1,2 +0,0 @@ -INCLUDE "pokecrystal.asm" -INCLUDE "maps.asm" diff --git a/misc/mobile_5c.asm b/misc/mobile_5c.asm index b8710a78a..8ecd35edf 100755 --- a/misc/mobile_5c.asm +++ b/misc/mobile_5c.asm @@ -934,7 +934,7 @@ GFX_172f1f: INCBIN "gfx/unknown/172f1f.2bpp" Tilemap_1733af: -IF DEF(CORRUPT_TILES) +IF DEF(CRYSTAL11) INCBIN "gfx/unknown/1733af_corrupt.tilemap" ELSE INCBIN "gfx/unknown/1733af.tilemap" diff --git a/pokecrystal.asm b/version.asm similarity index 100% rename from pokecrystal.asm rename to version.asm diff --git a/wram11.asm b/wram11.asm deleted file mode 100644 index 4d3303fd0..000000000 --- a/wram11.asm +++ /dev/null @@ -1,3 +0,0 @@ -CRYSTAL11 = 1 - -INCLUDE "wram.asm"