ref: cc0fd6e12c0afe9b70f55114eb3123014318e107
parent: a8cf8979d9acf66d1bdf4ea115ab6a0faa8f9d34
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Tue Jan 9 12:26:40 EST 2018
CRYSTAL11 → _CRYSTAL11
--- a/FAQ.md
+++ b/FAQ.md
@@ -14,7 +14,7 @@
## What is pokecrystal11.gbc?
-Version 1.1 of Pokémon Crystal, which fixed some issues with the initial international release. `make crystal11` defines `CRYSTAL11` so the assembly builds the changed version.
+Version 1.1 of Pokémon Crystal, which fixed some issues with the initial international release. `make crystal11` defines `_CRYSTAL11` so the assembly builds the changed version.
## Can't build ROM; "ERROR: `UNION` already defined"
--- a/Makefile
+++ b/Makefile
@@ -53,7 +53,7 @@
$(crystal_obj): RGBASMFLAGS = -D _CRYSTAL
-$(crystal11_obj): RGBASMFLAGS = -D _CRYSTAL -D CRYSTAL11
+$(crystal11_obj): RGBASMFLAGS = -D _CRYSTAL -D _CRYSTAL11
# The dep rules have to be explicit or else missing files won't be reported.
# As a side effect, they're evaluated immediately instead of when the rule is invoked.
--- a/data/battle_tower/classes.asm
+++ b/data/battle_tower/classes.asm
@@ -23,7 +23,7 @@
db "KAUFMAN@@@", SWIMMERM
db "LANCASTER@", SKIER
db "McMAHILL@@", CAMPER
-if !DEF(CRYSTAL11)
+if !DEF(_CRYSTAL11)
BattleTowerTrainersEnd:
endc
; The following can only be sampled in Crystal 1.1.
@@ -76,7 +76,7 @@
db "DYKSTRA@@@", SWIMMERF
db "EATON@@@@@", BIKER
db "WONG@@@@@@", FIREBREATHER
-if DEF(CRYSTAL11)
+if DEF(_CRYSTAL11)
BattleTowerTrainersEnd:
endc
; 1f8450
--- a/engine/events/battle_tower/load_trainer.asm
+++ b/engine/events/battle_tower/load_trainer.asm
@@ -26,7 +26,7 @@
ld a, [hRandomAdd]
add b
ld b, a ; b contains the nr of the trainer
-if DEF(CRYSTAL11)
+if DEF(_CRYSTAL11)
and $7f
else
and $1f
--- a/engine/events/battle_tower/trainer_text.asm
+++ b/engine/events/battle_tower/trainer_text.asm
@@ -7,7 +7,7 @@
push af
ld a, BANK(BT_OTTrainerClass)
ld [rSVBK], a
-if DEF(CRYSTAL11)
+if DEF(_CRYSTAL11)
ld hl, BT_OTTrainerClass
else
; BUG ALERT
@@ -16,7 +16,7 @@
; uses it to get the gender of the trainer.
; As a consequence, the enemy trainer's dialog will
; always be sampled from the female array.
- ld hl, BT_OTName + 5
+ ld hl, BT_OTName + NAME_LENGTH_JAPANESE - 1
endc
ld a, [hl]
dec a
--- a/main.asm
+++ b/main.asm
@@ -645,7 +645,7 @@
SECTION "Mobile Stadium 2", ROMX
-if DEF(CRYSTAL11)
+if DEF(_CRYSTAL11)
INCBIN "mobile/stadium/stadium2_2.bin"
else
INCBIN "mobile/stadium/stadium2_1.bin"
--- a/mobile/mobile_5c.asm
+++ b/mobile/mobile_5c.asm
@@ -936,7 +936,7 @@
INCBIN "gfx/trade/game_boy_n64.2bpp"
Tilemap_1733af:
-if DEF(CRYSTAL11)
+if DEF(_CRYSTAL11)
INCBIN "gfx/unknown/1733af_corrupt.tilemap"
else
INCBIN "gfx/unknown/1733af.tilemap"
--- a/wram.asm
+++ b/wram.asm
@@ -827,7 +827,7 @@
wBackupDexListingCursor:: db
wBackupDexListingPage:: db
wDexCurrentLocation:: db
-if DEF(CRYSTAL11)
+if DEF(_CRYSTAL11)
wPokedexStatus:: db
wPokedexDataEnd::
else
@@ -1312,7 +1312,7 @@
NEXTU ; cf64
; pokedex
wDexEntryPrevJumptableIndex:: db
-if !DEF(CRYSTAL11)
+if !DEF(_CRYSTAL11)
wPokedexStatus:: db
endc