ref: 05382d3e3c03616d6edf21833e89a8264a8cd10a
parent: 8127d1fbcfccb7cd5c3e210699dd540e370b6634
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Sat Jan 20 07:25:55 EST 2018
PARTY_LENGTH; MON_NAME; sgb_border.bin
--- a/constants/battle_tower_constants.asm
+++ b/constants/battle_tower_constants.asm
@@ -1,11 +1,11 @@
-BATTLETOWER_PARTY_SIZE EQU 3
-BATTLETOWER_STREAK_SIZE EQU 7
+BATTLETOWER_PARTY_LENGTH EQU 3
+BATTLETOWER_STREAK_LENGTH EQU 7
BATTLETOWER_NUM_UNIQUE_PKMN EQU 21
BATTLETOWER_NUM_UNIQUE_TRAINERS EQU 70
BATTLETOWER_TRAINERDATALENGTH EQU $24
-BATTLE_TOWER_STRUCT_LENGTH EQU $e0 ; NAME_LENGTH + BATTLETOWER_PARTY_SIZE * (PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
+BATTLE_TOWER_STRUCT_LENGTH EQU $e0 ; NAME_LENGTH + BATTLETOWER_PARTY_LENGTH * (PARTYMON_STRUCT_LENGTH + MON_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
; BattleTowerAction writebyte arguments (see engine/events/battle_tower/battle_tower.asm)
const_def
--- a/constants/misc_constants.asm
+++ b/constants/misc_constants.asm
@@ -50,7 +50,7 @@
NUM_BOXES EQU 14
; hall of fame
-HOF_MON_LENGTH = 1 + 2 + 2 + 1 + (PKMN_NAME_LENGTH +- 1) ; species, id, dvs, level, nick
+HOF_MON_LENGTH = 1 + 2 + 2 + 1 + (MON_NAME_LENGTH +- 1) ; species, id, dvs, level, nick
HOF_LENGTH = 1 + HOF_MON_LENGTH * PARTY_LENGTH + 1 ; win count, party, terminator
NUM_HOF_TEAMS = 30
--- a/constants/radio_constants.asm
+++ b/constants/radio_constants.asm
@@ -94,12 +94,12 @@
const POKEDEX_SHOW_7 ; 56
const POKEDEX_SHOW_8 ; 57
-; PlayRadio arguments (see engine/pokegear.asm)
+; PlayRadio.StationPointers indexes (see engine/pokegear.asm)
const_def
const MAPRADIO_POKEMON_CHANNEL
const MAPRADIO_OAKS_MON_TALK
const MAPRADIO_POKEDEX_SHOW
- const MAPRADIO_PKMN_MUSIC
+ const MAPRADIO_POKEMON_MUSIC
const MAPRADIO_LUCKY_CHANNEL
const MAPRADIO_UNOWN
const MAPRADIO_PLACES_PEOPLE
--- a/constants/text_constants.asm
+++ b/constants/text_constants.asm
@@ -1,16 +1,16 @@
; name lengths
-NAME_LENGTH EQU 11
-PLAYER_NAME_LENGTH EQU 8
-BOX_NAME_LENGTH EQU 9
-PKMN_NAME_LENGTH EQU 11
-MOVE_NAME_LENGTH EQU 13
-ITEM_NAME_LENGTH EQU 13
+NAME_LENGTH EQU 11
+PLAYER_NAME_LENGTH EQU 8
+BOX_NAME_LENGTH EQU 9
+MON_NAME_LENGTH EQU 11
+MOVE_NAME_LENGTH EQU 13
+ITEM_NAME_LENGTH EQU 13
TRAINER_CLASS_NAME_LENGTH EQU 13
NAME_LENGTH_JAPANESE EQU 6
; GetName types (see home/names.asm)
const_value set 1
- const PKMN_NAME ; 1
+ const MON_NAME ; 1
const MOVE_NAME ; 2
const DUMMY_NAME ; 3
const ITEM_NAME ; 4
--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -746,7 +746,7 @@
CopyPokemonName_Buffer1_Buffer3: ; 746e
ld hl, StringBuffer1
ld de, StringBuffer3
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
jp CopyBytes
```
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -3989,7 +3989,7 @@
ld a, [CurBattleMon]
call SkipNames
ld de, BattleMonNick
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
ld hl, BattleMonAttack
ld de, PlayerStats
@@ -4074,7 +4074,7 @@
ld a, [CurPartyMon]
call SkipNames
ld de, EnemyMonNick
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
ld hl, EnemyMonAttack
ld de, EnemyStats
@@ -6578,7 +6578,7 @@
; Update enemy nick
ld hl, StringBuffer1
ld de, EnemyMonNick
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
; Saw this mon
@@ -7766,7 +7766,7 @@
call PrintPlayerHUD
ld hl, BattleMonNick
ld de, StringBuffer1
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
call TerminateExpBarSound
ld de, SFX_HIT_END_OF_EXP_BAR
--- a/engine/billspc.asm
+++ b/engine/billspc.asm
@@ -1331,11 +1331,11 @@
jr z, .boxfail
ld bc, sBoxMonNicknames - sBox
add hl, bc
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
ld a, e
call AddNTimes
ld de, StringBuffer1
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
call CloseSRAM
pop hl
@@ -1357,11 +1357,11 @@
and a
jr z, .partyfail
ld hl, PartyMonNicknames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
ld a, e
call AddNTimes
ld de, StringBuffer1
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
pop hl
ld de, StringBuffer1
@@ -1383,11 +1383,11 @@
and a
jr z, .sBoxFail
ld hl, sBoxMonNicknames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
ld a, e
call AddNTimes
ld de, StringBuffer1
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
call CloseSRAM
pop hl
@@ -2171,11 +2171,11 @@
ret
CopyNicknameToTemp: ; e3363 (38:7363)
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
ld a, [CurPartyMon]
call AddNTimes
ld de, wBufferMonNick
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
ret
--- a/engine/breeding.asm
+++ b/engine/breeding.asm
@@ -320,7 +320,7 @@
call PrintText
ld a, [CurPartyMon]
ld hl, PartyMonNicknames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call AddNTimes
ld d, h
ld e, l
@@ -345,7 +345,7 @@
.nonickname
ld hl, StringBuffer1
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
.next ; 1707d (5:707d)
--- a/engine/caught_data.asm
+++ b/engine/caught_data.asm
@@ -42,7 +42,7 @@
call GetPokemonName
ld hl, StringBuffer1
ld de, wMonOrItemNameBuffer
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
call GiveANickname_YesNo
jr c, .Party_SkipNickname
@@ -120,7 +120,7 @@
ld a, BANK(sBoxMonNicknames)
call GetSRAMBank
ld de, sBoxMonNicknames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
call CloseSRAM
--- a/engine/color.asm
+++ b/engine/color.asm
@@ -1195,7 +1195,8 @@
INCLUDE "gfx/sgb/predef.pal"
SGBBorderMap:
-INCBIN "gfx/sgb/sgb_border.tilemap"
+; interleaved tile ids and palette ids
+INCBIN "gfx/sgb/sgb_border.bin"
SGBBorderPalettes:
INCLUDE "gfx/sgb/sgb_border.pal"
--- a/engine/events/battle_tower/battle_tower.asm
+++ b/engine/events/battle_tower/battle_tower.asm
@@ -285,7 +285,7 @@
; Check the nicknames for illegal characters, and replace bad nicknames
; with their species names.
ld de, wBT_OTTempPkmn1Name ; $c643
- ld c, PKMN_NAME_LENGTH
+ ld c, MON_NAME_LENGTH
farcall CheckStringForErrors
jr nc, .skip_mon_1
@@ -295,12 +295,12 @@
ld l, e
ld h, d
ld de, wBT_OTTempPkmn1Name ; $c643
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
.skip_mon_1
ld de, wBT_OTTempPkmn2Name ; $c67e
- ld c, PKMN_NAME_LENGTH
+ ld c, MON_NAME_LENGTH
farcall CheckStringForErrors
jr nc, .skip_mon_2
ld a, [wBT_OTTempPkmn2] ; [$c64e]
@@ -309,12 +309,12 @@
ld l, e
ld h, d
ld de, wBT_OTTempPkmn2Name ; $c67e
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
.skip_mon_2
ld de, wBT_OTTempPkmn3Name ; $c686 + 51 = $c6b9
- ld c, PKMN_NAME_LENGTH
+ ld c, MON_NAME_LENGTH
farcall CheckStringForErrors
jr nc, .skip_mon_3
ld a, [wBT_OTTempPkmn3] ; [$c689]
@@ -323,7 +323,7 @@
ld l, e
ld h, d
ld de, wBT_OTTempPkmn3Name ; $c686 + 51 = $c6b9
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
.skip_mon_3
@@ -363,7 +363,7 @@
; Copy Pkmn into Memory from the address in hl
ld de, OTPartyMon1Species
ld bc, OTPartyCount
- ld a, BATTLETOWER_PARTY_SIZE
+ ld a, BATTLETOWER_PARTY_LENGTH
ld [bc], a
inc bc
.otpartymon_loop
@@ -379,7 +379,7 @@
ld e, a
ld a, [BGMapBuffer + 1]
ld d, a
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
ld a, e
ld [BGMapBuffer], a
@@ -399,7 +399,7 @@
ValidateBTParty: ; 170394
; Check for and fix errors in party data
ld hl, wBT_OTTempPkmn1Species
- ld d, BATTLETOWER_PARTY_SIZE
+ ld d, BATTLETOWER_PARTY_LENGTH
.pkmn_loop
push de
push hl
@@ -495,7 +495,7 @@
ld a, [hl]
ld [de], a
pop hl
- ld bc, PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH
+ ld bc, PARTYMON_STRUCT_LENGTH + MON_NAME_LENGTH
add hl, bc
pop de
dec d
@@ -509,7 +509,7 @@
Function17042c: ; 17042c
ld hl, w3_d202TrainerData
- ld a, BATTLETOWER_STREAK_SIZE
+ ld a, BATTLETOWER_STREAK_LENGTH
.loop
push af
push hl
@@ -956,7 +956,7 @@
ld a, $ff
ld hl, sBTTrainers
- ld bc, BATTLETOWER_STREAK_SIZE
+ ld bc, BATTLETOWER_STREAK_LENGTH
call ByteFill
xor a
--- a/engine/events/battle_tower/load_trainer.asm
+++ b/engine/events/battle_tower/load_trainer.asm
@@ -41,7 +41,7 @@
ld a, BANK(sBTTrainers)
call GetSRAMBank
- ld c, BATTLETOWER_STREAK_SIZE
+ ld c, BATTLETOWER_STREAK_LENGTH
ld hl, sBTTrainers
.next_trainer
ld a, [hli]
@@ -93,7 +93,7 @@
Function_LoadRandomBattleTowerPkmn: ; 1f8081
- ld c, BATTLETOWER_PARTY_SIZE
+ ld c, BATTLETOWER_PARTY_LENGTH
.loop
push bc
ld a, BANK(sBTPkmnPrevTrainer1)
@@ -123,7 +123,7 @@
; Check if Pkmn was already loaded before
; Check current and the 2 previous teams
; includes check if item is double at the current team
- ld bc, PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH
+ ld bc, PARTYMON_STRUCT_LENGTH + MON_NAME_LENGTH
call AddNTimes
ld a, [hli]
ld b, a
@@ -166,13 +166,13 @@
cp b
jr z, .FindARandomBattleTowerPkmn
- ld bc, PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH
+ ld bc, PARTYMON_STRUCT_LENGTH + MON_NAME_LENGTH
call CopyBytes
ld a, [wNamedObjectIndexBuffer]
push af
push de
- ld hl, - (PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH)
+ ld hl, - (PARTYMON_STRUCT_LENGTH + MON_NAME_LENGTH)
add hl, de
ld a, [hl]
ld [wNamedObjectIndexBuffer], a
@@ -183,7 +183,7 @@
ld h, d
ld l, e
pop de
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
pop de
--- a/engine/events/battle_tower/rules.asm
+++ b/engine/events/battle_tower/rules.asm
@@ -213,7 +213,7 @@
BattleTower_CheckPartyLengthIs3: ; 8b2bb
ld a, [PartyCount]
- cp BATTLETOWER_PARTY_SIZE
+ cp BATTLETOWER_PARTY_LENGTH
ret
; 8b2c1
@@ -235,13 +235,13 @@
cp b
ret z
ld a, b
- cp BATTLETOWER_PARTY_SIZE
+ cp BATTLETOWER_PARTY_LENGTH
ret
; 8b2da
Function_PartyCountEq3: ; 8b2da
ld a, [PartyCount]
- cp BATTLETOWER_PARTY_SIZE
+ cp BATTLETOWER_PARTY_LENGTH
ret z
scf
ret
--- a/engine/events/daycare.asm
+++ b/engine/events/daycare.asm
@@ -531,7 +531,7 @@
ld [hl], a
ld hl, PartyMonNicknames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call DayCare_GetCurrentPartyMember
ld hl, wEggNick
call CopyBytes
@@ -620,7 +620,7 @@
ld bc, wEggMonEnd - wEggMon
call ByteFill
ld hl, wEggNick
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call ByteFill
ld hl, wEggOT
ld bc, NAME_LENGTH
--- a/engine/events/halloffame.asm
+++ b/engine/events/halloffame.asm
@@ -208,9 +208,9 @@
push bc
ld a, c
ld hl, PartyMonNicknames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call AddNTimes
- ld bc, PKMN_NAME_LENGTH - 1
+ ld bc, MON_NAME_LENGTH - 1
call CopyBytes
pop bc
@@ -460,7 +460,7 @@
ld a, [hli]
ld [TempMonLevel], a
ld de, StringBuffer2
- ld bc, PKMN_NAME_LENGTH - 1
+ ld bc, MON_NAME_LENGTH - 1
call CopyBytes
ld a, "@"
ld [StringBuffer2 + 10], a
--- a/engine/events/name_rater.asm
+++ b/engine/events/name_rater.asm
@@ -45,13 +45,13 @@
jr c, .samename
; Copy the new name from StringBuffer2
ld hl, PartyMonNicknames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
ld a, [CurPartyMon]
call AddNTimes
ld e, l
ld d, h
ld hl, StringBuffer2
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
ld hl, NameRaterEvenBetterText
@@ -115,7 +115,7 @@
IsNewNameEmpty: ; fb7be
; Checks to see if the nickname loaded in StringBuffer2 is empty. If so, return carry.
ld hl, StringBuffer2
- ld c, PKMN_NAME_LENGTH - 1
+ ld c, MON_NAME_LENGTH - 1
.loop
ld a, [hli]
cp "@"
@@ -137,7 +137,7 @@
CompareNewToOld: ; fb7d3
; Compares the nickname in StringBuffer2 to the previous nickname. If they are the same, return carry.
ld hl, PartyMonNicknames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
ld a, [CurPartyMon]
call AddNTimes
push hl
@@ -178,7 +178,7 @@
ret z
inc c
ld a, c
- cp PKMN_NAME_LENGTH - 1
+ cp MON_NAME_LENGTH - 1
jr nz, .loop
ret
; fb80f
--- a/engine/events/odd_egg.asm
+++ b/engine/events/odd_egg.asm
@@ -43,7 +43,7 @@
call AddNTimes
ld de, OddEggSpecies
- ld bc, PARTYMON_STRUCT_LENGTH + 2 * PKMN_NAME_LENGTH
+ ld bc, PARTYMON_STRUCT_LENGTH + 2 * MON_NAME_LENGTH
call CopyBytes
ld a, EGG_TICKET
@@ -73,7 +73,7 @@
; load Odd Egg Name in wTempOddEggNickname
ld hl, .Odd
ld de, wTempOddEggNickname
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
; load pointer to wTempOddEggNickname in wMobileMonOTNamePointerBuffer
--- a/engine/events/poke_seer.asm
+++ b/engine/events/poke_seer.asm
@@ -148,10 +148,10 @@
GetCaughtName: ; 4f176
ld a, [CurPartyMon]
ld hl, PartyMonNicknames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call AddNTimes
ld de, wSeerNickname
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
ret
; 4f18c
--- a/engine/events/special.asm
+++ b/engine/events/special.asm
@@ -228,7 +228,7 @@
CopyPokemonName_Buffer1_Buffer3: ; 746e
ld hl, StringBuffer1
ld de, StringBuffer3
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
jp CopyBytes
DummyPredef1: ; 747a
--- a/engine/evolve.asm
+++ b/engine/evolve.asm
@@ -371,7 +371,7 @@
jr nz, .loop
ld a, [CurPartyMon]
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
ld hl, PartyMonNicknames
call AddNTimes
push hl
@@ -380,7 +380,7 @@
call GetPokemonName
ld hl, StringBuffer1
pop de
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
jp CopyBytes
; 42454
--- a/engine/item_effects.asm
+++ b/engine/item_effects.asm
@@ -599,7 +599,7 @@
dec a
ld [CurPartyMon], a
ld hl, PartyMonNicknames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call AddNTimes
ld d, h
@@ -668,7 +668,7 @@
ld hl, wMonOrItemNameBuffer
ld de, sBoxMonNicknames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
ld hl, sBoxMonNicknames
@@ -683,7 +683,7 @@
ld hl, sBoxMonNicknames
ld de, wMonOrItemNameBuffer
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
call CloseSRAM
--- a/engine/learn.asm
+++ b/engine/learn.asm
@@ -5,7 +5,7 @@
call GetNick
ld hl, StringBuffer1
ld de, wMonOrItemNameBuffer
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
.loop
--- a/engine/link.asm
+++ b/engine/link.asm
@@ -831,7 +831,7 @@
ld bc, PARTY_LENGTH * NAME_LENGTH
call CopyBytes
ld hl, PartyMonNicknames
- ld bc, PARTY_LENGTH * PKMN_NAME_LENGTH
+ ld bc, PARTY_LENGTH * MON_NAME_LENGTH
call CopyBytes
; Okay, we did all that. Now, are we in the trade center?
@@ -978,7 +978,7 @@
ld bc, PARTY_LENGTH * NAME_LENGTH
call CopyBytes
ld de, OTPartyMonNicknames
- ld bc, PARTY_LENGTH * PKMN_NAME_LENGTH
+ ld bc, PARTY_LENGTH * MON_NAME_LENGTH
jp CopyBytes
; 286ba
@@ -1657,7 +1657,7 @@
call GetPokemonName
ld hl, StringBuffer1
ld de, wd004
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
ld a, [wd003]
ld hl, OTPartySpecies
--- a/engine/link_trade.asm
+++ b/engine/link_trade.asm
@@ -283,7 +283,7 @@
ld [hl], a
push hl
push bc
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
add hl, bc
ld [hl], a
pop bc
@@ -335,7 +335,7 @@
ld [hl], $1f
push hl
push bc
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
add hl, bc
ld [hl], $1f
pop bc
--- a/engine/move_mon.asm
+++ b/engine/move_mon.asm
@@ -60,7 +60,7 @@
ld d, h
ld e, l
ld hl, StringBuffer1
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
.skipnickname
@@ -397,7 +397,7 @@
ld hl, OTPartyMonNicknames
ld a, [CurPartyMon]
call SkipNames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
ld a, [CurPartySpecies]
@@ -583,7 +583,7 @@
call SkipNames
.okay12
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
pop hl
@@ -943,7 +943,7 @@
ld de, sBoxMonNicknames
ld hl, StringBuffer1
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
ld hl, EnemyMon
@@ -1044,7 +1044,7 @@
call .shift
ld hl, sBoxMonNicknames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call .shift
ld hl, sBoxMons
@@ -1240,7 +1240,7 @@
; Shift the OT names
ld d, h
ld e, l
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
add hl, bc
ld bc, PartyMonNicknames
ld a, [wPokemonWithdrawDepositParameter]
@@ -1283,12 +1283,12 @@
jr z, .party6
ld hl, sBoxMonNicknames
.party6
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
ld a, [CurPartyMon]
call AddNTimes
ld d, h
ld e, l
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
add hl, bc
ld bc, PartyMonNicknamesEnd
ld a, [wPokemonWithdrawDepositParameter]
@@ -1652,7 +1652,7 @@
call GetPokemonName
ld hl, StringBuffer1
ld de, wMonOrItemNameBuffer
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
pop af
and a
@@ -1664,7 +1664,7 @@
push hl
ld a, [ScriptBank]
call GetFarHalfword
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
ld a, [ScriptBank]
call FarCopyBytes
pop hl
@@ -1764,7 +1764,7 @@
call GetSRAMBank
ld hl, wMonOrItemNameBuffer
ld de, sBoxMonNicknames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
call CloseSRAM
ld b, $1
--- a/engine/move_mon_wo_mail.asm
+++ b/engine/move_mon_wo_mail.asm
@@ -7,7 +7,7 @@
dec a
ld [wd265], a
ld hl, sBoxMonNicknames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
ld de, wBufferMonNick
call InsertDataIntoBoxOrParty
ld a, [sBoxCount]
@@ -44,7 +44,7 @@
dec a
ld [wd265], a
ld hl, PartyMonNicknames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
ld de, wBufferMonNick
call InsertDataIntoBoxOrParty
ld a, [PartyCount]
--- a/engine/namingscreen.asm
+++ b/engine/namingscreen.asm
@@ -254,7 +254,7 @@
ret
.StoreMonIconParams: ; 1187b (4:587b)
- ld a, PKMN_NAME_LENGTH - 1
+ ld a, MON_NAME_LENGTH - 1
hlcoord 5, 6
jr .StoreParams
--- a/engine/npctrade.asm
+++ b/engine/npctrade.asm
@@ -206,7 +206,7 @@
call CopyTradeName
ld hl, PartyMonNicknames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call Trade_GetAttributeOfLastPartymon
ld hl, wOTTrademonNickname
call CopyTradeName
--- a/engine/pack.asm
+++ b/engine/pack.asm
@@ -630,7 +630,7 @@
call GetCurNick
ld hl, StringBuffer1
ld de, wMonOrItemNameBuffer
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
call TryGiveItemToPartymon
pop af
--- a/engine/party_menu.asm
+++ b/engine/party_menu.asm
@@ -524,7 +524,7 @@
dec c
jr nz, .loop
ld a, l
- ld e, PKMN_NAME_LENGTH
+ ld e, MON_NAME_LENGTH
sub e
ld l, a
ld a, h
--- a/engine/pokegear.asm
+++ b/engine/pokegear.asm
@@ -2093,7 +2093,7 @@
; 91ab9
.StationPointers: ; 91ab9
-; entries correspond to radio station constants
+; entries correspond to MAPRADIO_* constants
dw .OakOrPnP
dw LoadStation_OaksPokemonTalk
dw LoadStation_PokedexShow
--- a/engine/printer.asm
+++ b/engine/printer.asm
@@ -774,10 +774,10 @@
pop hl
jr z, .ok2
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
add hl, bc
call Printer_GetMonGender
- ld bc, SCREEN_WIDTH - PKMN_NAME_LENGTH
+ ld bc, SCREEN_WIDTH - MON_NAME_LENGTH
add hl, bc
ld a, "/"
ld [hli], a
@@ -795,7 +795,7 @@
ld h, a
ld bc, sBoxMonNicknames - sBox
add hl, bc
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
ld a, [wWhichBoxMonToPrint]
call AddNTimes
ld e, l
@@ -806,7 +806,7 @@
call PlaceString
pop hl
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
add hl, bc
push hl
ld a, [wAddrOfBoxToPrint]
--- a/engine/radio.asm
+++ b/engine/radio.asm
@@ -273,7 +273,7 @@
call GetPokemonName
ld hl, StringBuffer1
ld de, wMonOrItemNameBuffer
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
; Now that we've chosen our wild Pokemon,
--- a/engine/routines/checknickerrors.asm
+++ b/engine/routines/checknickerrors.asm
@@ -6,7 +6,7 @@
push bc
push de
- ld b, PKMN_NAME_LENGTH
+ ld b, MON_NAME_LENGTH
.checkchar
; end of nick?
--- a/engine/routines/correcterrorsinplayerparty.asm
+++ b/engine/routines/correcterrorsinplayerparty.asm
@@ -128,7 +128,7 @@
ld hl, StringBuffer1
.got_nickname
pop de
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
pop bc
--- a/engine/routines/initlist.asm
+++ b/engine/routines/initlist.asm
@@ -21,7 +21,7 @@
jr nz, .check_item_name
ld hl, CurMart
ld de, PokemonNames
- ld a, PKMN_NAME
+ ld a, MON_NAME
jr .done
.check_item_name
--- a/engine/start_menu.asm
+++ b/engine/start_menu.asm
@@ -798,7 +798,7 @@
call GetCurNick
ld hl, StringBuffer1
ld de, wMonOrItemNameBuffer
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
ld a, [wMenuCursorY]
cp 1
--- a/engine/stats_screen.asm
+++ b/engine/stats_screen.asm
@@ -1117,7 +1117,7 @@
CopyNickname: ; 4e505 (13:6505)
ld de, StringBuffer1
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
jr .okay ; utterly pointless
.okay
ld a, [MonType]
--- a/engine/wildmons.asm
+++ b/engine/wildmons.asm
@@ -913,7 +913,7 @@
call GetPokemonName
ld hl, StringBuffer1
ld de, StringBuffer4
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
jp CopyBytes
; 2a567
@@ -997,7 +997,7 @@
call GetPokemonName
ld hl, StringBuffer1
ld de, StringBuffer4
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
jp CopyBytes
; 2a5e9
--- /dev/null
+++ b/gfx/sgb/sgb_border.bin
@@ -1,0 +1,2 @@
+TTTTTTT$%&T&T%T$TTTTTTTTT$455T4T3TTTT!"##T"T!T T
+ ) !"##T"T!T122T688888888888888888888'2TT2T1TTT7TTTTT7TTT%&T&T7&T&T%T3455T4T7455T4T3T7TTT7TTT7"T!T T7 !"2T1T0T7012TTT7TTT7&T%T$T7$%&4T3TT7347TT7TTTTT7TTT!"##T"T7"##T"T!T122T72TT2T1TTT.////////////////////-TTTTTTT9 ()*+,9TTT%&T&T%T$TTTT$%&T&T%T3455T4T$TTTTTT$455T4T3T !"##T"T!T T
\ No newline at end of file
--- a/gfx/sgb/sgb_border.tilemap
+++ /dev/null
@@ -1,2 +1,0 @@
-TTTTTTT$%&T&T%T$TTTTTTTTT$455T4T3TTTT!"##T"T!T T
- ) !"##T"T!T122T688888888888888888888'2TT2T1TTT7TTTTT7TTT%&T&T7&T&T%T3455T4T7455T4T3T7TTT7TTT7"T!T T7 !"2T1T0T7012TTT7TTT7&T%T$T7$%&4T3TT7347TT7TTTTT7TTT!"##T"T7"##T"T!T122T72TT2T1TTT.////////////////////-TTTTTTT9 ()*+,9TTT%&T&T%T$TTTT$%&T&T%T3455T4T$TTTTTT$455T4T3T !"##T"T!T T
\ No newline at end of file
--- a/home.asm
+++ b/home.asm
@@ -1207,7 +1207,7 @@
ld de, StringBuffer1
push de
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
pop de
--- a/home/names.asm
+++ b/home/names.asm
@@ -1,6 +1,6 @@
NamesPointers:: ; 33ab
; entries correspond to GetName constants (see constants/text_constants.asm)
- dba PokemonNames ; PKMN_NAME (not used; jumps to GetPokemonName)
+ dba PokemonNames ; MON_NAME (not used; jumps to GetPokemonName)
dba MoveNames ; MOVE_NAME
dbw 0, NULL ; DUMMY_NAME
dba ItemNames ; ITEM_NAME
@@ -20,13 +20,13 @@
push de
ld a, [wNamedObjectTypeBuffer]
- cp PKMN_NAME
+ cp MON_NAME
jr nz, .NotPokeName
ld a, [CurSpecies]
ld [wd265], a
call GetPokemonName
- ld hl, PKMN_NAME_LENGTH
+ ld hl, MON_NAME_LENGTH
add hl, de
ld e, l
ld d, h
@@ -140,9 +140,9 @@
; Terminator
ld de, StringBuffer1
push de
- ld bc, PKMN_NAME_LENGTH - 1
+ ld bc, MON_NAME_LENGTH - 1
call CopyBytes
- ld hl, StringBuffer1 + PKMN_NAME_LENGTH - 1
+ ld hl, StringBuffer1 + MON_NAME_LENGTH - 1
ld [hl], "@"
pop de
--- a/macros/wram.asm
+++ b/macros/wram.asm
@@ -110,7 +110,7 @@
\1Mon1:: box_struct \1Mon1
\1Mon2:: ds BOXMON_STRUCT_LENGTH * (MONS_PER_BOX +- 1)
\1MonOT:: ds NAME_LENGTH * MONS_PER_BOX
-\1MonNicknames:: ds PKMN_NAME_LENGTH * MONS_PER_BOX
+\1MonNicknames:: ds MON_NAME_LENGTH * MONS_PER_BOX
\1MonNicknamesEnd::
\1End:: ds 2 ; padding
ENDM
@@ -179,13 +179,13 @@
\1Name:: ds NAME_LENGTH +- 1
\1TrainerClass:: ds 1
\1Pkmn1:: party_struct \1Pkmn1
-\1Pkmn1Name:: ds PKMN_NAME_LENGTH
+\1Pkmn1Name:: ds MON_NAME_LENGTH
\1Pkmn1NameEnd::
\1Pkmn2:: party_struct \1Pkmn2
-\1Pkmn2Name:: ds PKMN_NAME_LENGTH
+\1Pkmn2Name:: ds MON_NAME_LENGTH
\1Pkmn2NameEnd::
\1Pkmn3:: party_struct \1Pkmn3
-\1Pkmn3Name:: ds PKMN_NAME_LENGTH
+\1Pkmn3Name:: ds MON_NAME_LENGTH
\1Pkmn3NameEnd::
\1TrainerData:: ds BATTLETOWER_TRAINERDATALENGTH
\1TrainerEnd::
@@ -222,7 +222,7 @@
\1ID:: dw
\1DVs:: dw
\1Level:: db
-\1Nickname:: ds PKMN_NAME_LENGTH +- 1
+\1Nickname:: ds MON_NAME_LENGTH +- 1
\1End::
ENDM
@@ -247,8 +247,8 @@
trademon: MACRO
\1Species:: db ; wc6d0 | wc702
-\1SpeciesName:: ds PKMN_NAME_LENGTH ; wc6d1 | wc703
-\1Nickname:: ds PKMN_NAME_LENGTH ; wc6dc | wc70e
+\1SpeciesName:: ds MON_NAME_LENGTH ; wc6d1 | wc703
+\1Nickname:: ds MON_NAME_LENGTH ; wc6dc | wc70e
\1SenderName:: ds NAME_LENGTH ; wc6e7 | wc719
\1OTName:: ds NAME_LENGTH ; wc6f2 | wc724
\1DVs:: dw ; wc6fd | wc72f
--- a/maps/BattleTowerBattleRoom.asm
+++ b/maps/BattleTowerBattleRoom.asm
@@ -37,7 +37,7 @@
reloadmap
if_not_equal $0, Script_FailedBattleTowerChallenge
copybytetovar wNrOfBeatenBattleTowerTrainers ; wcf64
- if_equal BATTLETOWER_STREAK_SIZE, Script_BeatenAllTrainers
+ if_equal BATTLETOWER_STREAK_LENGTH, Script_BeatenAllTrainers
applymovement BATTLETOWERBATTLEROOM_YOUNGSTER, MovementData_BattleTowerBattleRoomOpponentWalksOut
warpsound
disappear BATTLETOWERBATTLEROOM_YOUNGSTER
--- a/mobile/fixed_words.asm
+++ b/mobile/fixed_words.asm
@@ -270,7 +270,7 @@
ld [wd265], a
call GetPokemonName
ld hl, StringBuffer1
- ld bc, PKMN_NAME_LENGTH - 1
+ ld bc, MON_NAME_LENGTH - 1
jr .copy_string
; 11c1ab
--- a/mobile/mobile_40.asm
+++ b/mobile/mobile_40.asm
@@ -2529,7 +2529,7 @@
dbwww $80, PlayerID, 2, OTPlayerID
dbwww $80, PartyMons, PARTYMON_STRUCT_LENGTH * PARTY_LENGTH, OTPartyMons
dbwww $80, PartyMonOT, NAME_LENGTH * PARTY_LENGTH, OTPartyMonOT
- dbwww $80, PartyMonNicknames, PKMN_NAME_LENGTH * PARTY_LENGTH, OTPartyMonNicknames
+ dbwww $80, PartyMonNicknames, MON_NAME_LENGTH * PARTY_LENGTH, OTPartyMonNicknames
db -1
Unknown_100feb: ; 100feb
@@ -2550,7 +2550,7 @@
Unknown_10102c: ; 10102c
dbwww $80, OTPlayerName, NAME_LENGTH, NULL
dbwww $80, OTPlayerID, 2, NULL
- dbwww $80, OTPartyMonNicknames, PKMN_NAME_LENGTH * PARTY_LENGTH, NULL
+ dbwww $80, OTPartyMonNicknames, MON_NAME_LENGTH * PARTY_LENGTH, NULL
dbwww $80, OTPartyMonOT, NAME_LENGTH * PARTY_LENGTH, NULL
dbwww $80, OTPartyMons, PARTYMON_STRUCT_LENGTH * PARTY_LENGTH, NULL
db -1
--- a/mobile/mobile_42.asm
+++ b/mobile/mobile_42.asm
@@ -337,7 +337,7 @@
call GetPokemonName
ld hl, StringBuffer1
pop de
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
ret
; 10824b
--- a/mobile/mobile_46.asm
+++ b/mobile/mobile_46.asm
@@ -4084,7 +4084,7 @@
call GetPokemonName
ld hl, StringBuffer1
ld de, wcd49
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
call CopyBytes
ld a, $a
ld [wcf66], a
@@ -7839,13 +7839,13 @@
ld l, a
ld a, [wMobileMonOTNamePointerBuffer + 1]
ld h, a
- ld bc, PKMN_NAME_LENGTH - 1
+ ld bc, MON_NAME_LENGTH - 1
call CopyBytes
ld a, "@"
ld [de], a
ld hl, PartyMonNicknames
- ld bc, PKMN_NAME_LENGTH
+ ld bc, MON_NAME_LENGTH
ld a, [wMobileMonSpeciesBuffer]
.loop4
add hl, bc
@@ -7858,7 +7858,7 @@
ld l, a
ld a, [wMobileMonNicknamePointerBuffer + 1]
ld h, a
- ld bc, PKMN_NAME_LENGTH - 1
+ ld bc, MON_NAME_LENGTH - 1
call CopyBytes
ld a, "@"
ld [de], a
--- a/mobile/mobile_5c.asm
+++ b/mobile/mobile_5c.asm
@@ -219,7 +219,7 @@
; 170c98
CheckBTMonMovesForErrors: ; 170c98
- ld c, BATTLETOWER_PARTY_SIZE
+ ld c, BATTLETOWER_PARTY_LENGTH
ld hl, wBT_OTTempPkmn1Moves
.loop
push hl
@@ -254,7 +254,7 @@
.done
pop hl
- ld de, PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH
+ ld de, PARTYMON_STRUCT_LENGTH + MON_NAME_LENGTH
add hl, de
dec c
jr nz, .loop
--- a/sram.asm
+++ b/sram.asm
@@ -203,7 +203,7 @@
sNrOfBeatenBattleTowerTrainers:: db
sBTChoiceOfLevelGroup:: db
; Battle Tower trainers are saved here, so nobody appears more than once
-sBTTrainers:: ds BATTLETOWER_STREAK_SIZE ; sbe48
+sBTTrainers:: ds BATTLETOWER_STREAK_LENGTH ; sbe48
sBattleTowerSaveFileFlags:: db
sBattleTowerReward:: db
--- a/wram.asm
+++ b/wram.asm
@@ -368,8 +368,8 @@
NEXTU ; c608
; odd egg
wOddEgg:: party_struct OddEgg
-wOddEggName:: ds PKMN_NAME_LENGTH
-wOddEggOTName:: ds PKMN_NAME_LENGTH
+wOddEggName:: ds MON_NAME_LENGTH
+wOddEggOTName:: ds MON_NAME_LENGTH
NEXTU ; c608
; battle tower temp struct
@@ -398,8 +398,8 @@
wEnemyMoveStruct:: move_struct wEnemyMoveStruct ; c608
wPlayerMoveStruct:: move_struct wPlayerMoveStruct ; c60f
-EnemyMonNick:: ds PKMN_NAME_LENGTH ; c616
-BattleMonNick:: ds PKMN_NAME_LENGTH ; c621
+EnemyMonNick:: ds MON_NAME_LENGTH ; c616
+BattleMonNick:: ds MON_NAME_LENGTH ; c621
BattleMon:: battle_struct BattleMon ; c62c
@@ -954,7 +954,7 @@
wTimeCapsulePartyMon5:: red_party_struct wTimeCapsulePartyMon5
wTimeCapsulePartyMon6:: red_party_struct wTimeCapsulePartyMon6
wTimeCapsulePartyMonOTNames:: ds PARTY_LENGTH * NAME_LENGTH
-wTimeCapsulePartyMonNicks:: ds PARTY_LENGTH * PKMN_NAME_LENGTH
+wTimeCapsulePartyMonNicks:: ds PARTY_LENGTH * MON_NAME_LENGTH
wTimeCapsulePlayerDataEnd::
NEXTU ; c813
@@ -967,7 +967,7 @@
wLinkPlayerPartyMon5:: party_struct wLinkPlayerPartyMon5
wLinkPlayerPartyMon6:: party_struct wLinkPlayerPartyMon6
wLinkPlayerPartyMonOTNames:: ds PARTY_LENGTH * NAME_LENGTH
-wLinkPlayerPartyMonNicks:: ds PARTY_LENGTH * PKMN_NAME_LENGTH
+wLinkPlayerPartyMonNicks:: ds PARTY_LENGTH * MON_NAME_LENGTH
wLinkPlayerDataEnd::
ENDU ; c9b7
@@ -1577,7 +1577,7 @@
NEXTU ; d002
; poke seer
wSeerAction:: db
-wSeerNickname:: ds PKMN_NAME_LENGTH
+wSeerNickname:: ds MON_NAME_LENGTH
wSeerCaughtLocation:: ds 17
wSeerTimeOfDay:: ds NAME_LENGTH
wSeerOTName:: ds NAME_LENGTH
@@ -1589,7 +1589,7 @@
NEXTU ; d002
; mon buffer
-wBufferMonNick:: ds PKMN_NAME_LENGTH ; d002
+wBufferMonNick:: ds MON_NAME_LENGTH ; d002
wBufferMonOT:: ds NAME_LENGTH ; d00d
wBufferMon:: party_struct wBufferMon ; d018
ds 8
@@ -2217,7 +2217,7 @@
OTPartyMonsEnd::
OTPartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d3a8
-OTPartyMonNicknames:: ds PKMN_NAME_LENGTH * PARTY_LENGTH ; d3ea
+OTPartyMonNicknames:: ds MON_NAME_LENGTH * PARTY_LENGTH ; d3ea
OTPartyDataEnd::
ds 4
@@ -2770,7 +2770,7 @@
PartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; ddff
-PartyMonNicknames:: ds PKMN_NAME_LENGTH * PARTY_LENGTH ; de41
+PartyMonNicknames:: ds MON_NAME_LENGTH * PARTY_LENGTH ; de41
PartyMonNicknamesEnd::
ds 22
@@ -2793,7 +2793,7 @@
db
wBreedMon1::
-wBreedMon1Nick:: ds PKMN_NAME_LENGTH ; def6
+wBreedMon1Nick:: ds MON_NAME_LENGTH ; def6
wBreedMon1OT:: ds NAME_LENGTH ; df01
wBreedMon1Stats:: box_struct wBreedMon1 ; df0c
@@ -2810,11 +2810,11 @@
db
wBreedMon2::
-wBreedMon2Nick:: ds PKMN_NAME_LENGTH ; df2f
+wBreedMon2Nick:: ds MON_NAME_LENGTH ; df2f
wBreedMon2OT:: ds NAME_LENGTH ; df3a
wBreedMon2Stats:: box_struct wBreedMon2 ; df45
-wEggNick:: ds PKMN_NAME_LENGTH ; df65
+wEggNick:: ds MON_NAME_LENGTH ; df65
wEggOT:: ds NAME_LENGTH ; df70
wEggMon:: box_struct wEggMon ; df7b