PARTY_LENGTH; MON_NAME; sgb_border.bin

This commit is contained in:
Remy Oukaour 2018-01-20 12:25:55 -05:00
parent 8127d1fbcf
commit 05382d3e3c
51 changed files with 147 additions and 146 deletions

View File

@ -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

View File

@ -50,7 +50,7 @@ MONS_PER_BOX EQU 20
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

View File

@ -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

View File

@ -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

View File

@ -746,7 +746,7 @@ Data_DaisyMassage: ; 746b
CopyPokemonName_Buffer1_Buffer3: ; 746e
ld hl, StringBuffer1
ld de, StringBuffer3
ld bc, PKMN_NAME_LENGTH
ld bc, MON_NAME_LENGTH
jp CopyBytes
```

View File

@ -3989,7 +3989,7 @@ InitBattleMon: ; 3da0d
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 @@ InitEnemyMon: ; 3dabd
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 @@ LoadEnemyMon: ; 3e8eb
; 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 @@ AnimateExpBar: ; 3f136
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

View File

@ -1331,11 +1331,11 @@ BillsPC_RefreshTextboxes: ; e2c2c (38:6c2c)
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 @@ BillsPC_RefreshTextboxes: ; e2c2c (38:6c2c)
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 @@ BillsPC_RefreshTextboxes: ; e2c2c (38:6c2c)
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 @@ CopySpeciesToTemp: ; e3357 (38:7357)
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

View File

@ -320,7 +320,7 @@ HatchEggs: ; 16f70 (5:6f70)
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 @@ HatchEggs: ; 16f70 (5:6f70)
.nonickname
ld hl, StringBuffer1
ld bc, PKMN_NAME_LENGTH
ld bc, MON_NAME_LENGTH
call CopyBytes
.next ; 1707d (5:707d)

View File

@ -42,7 +42,7 @@ Special_CheckPartyFullAfterContest: ; 4d9e5
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 @@ Special_CheckPartyFullAfterContest: ; 4d9e5
ld a, BANK(sBoxMonNicknames)
call GetSRAMBank
ld de, sBoxMonNicknames
ld bc, PKMN_NAME_LENGTH
ld bc, MON_NAME_LENGTH
call CopyBytes
call CloseSRAM

View File

@ -1195,7 +1195,8 @@ PredefPals:
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"

View File

@ -285,7 +285,7 @@ ReadBTTrainerParty: ; 1702b7
; 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 @@ ReadBTTrainerParty: ; 1702b7
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 @@ ReadBTTrainerParty: ; 1702b7
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 @@ ReadBTTrainerParty: ; 1702b7
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 @@ ReadBTTrainerParty: ; 1702b7
; 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 @@ ReadBTTrainerParty: ; 1702b7
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 @@ ReadBTTrainerParty: ; 1702b7
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 @@ endr
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 @@ BT_ChrisName: ; 170426
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 @@ ResetBattleTowerTrainersSRAM: ; 1706d6 (5c:46d6) BattleTowerAction $1a
ld a, $ff
ld hl, sBTTrainers
ld bc, BATTLETOWER_STREAK_SIZE
ld bc, BATTLETOWER_STREAK_LENGTH
call ByteFill
xor a

View File

@ -41,7 +41,7 @@ endc
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 @@ endc
Function_LoadRandomBattleTowerPkmn: ; 1f8081
ld c, BATTLETOWER_PARTY_SIZE
ld c, BATTLETOWER_PARTY_LENGTH
.loop
push bc
ld a, BANK(sBTPkmnPrevTrainer1)
@ -123,7 +123,7 @@ Function_LoadRandomBattleTowerPkmn: ; 1f8081
; 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 @@ Function_LoadRandomBattleTowerPkmn: ; 1f8081
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 @@ Function_LoadRandomBattleTowerPkmn: ; 1f8081
ld h, d
ld l, e
pop de
ld bc, PKMN_NAME_LENGTH
ld bc, MON_NAME_LENGTH
call CopyBytes
pop de

View File

@ -213,7 +213,7 @@ BattleTower_ExecuteJumptable: ; 8b25b
BattleTower_CheckPartyLengthIs3: ; 8b2bb
ld a, [PartyCount]
cp BATTLETOWER_PARTY_SIZE
cp BATTLETOWER_PARTY_LENGTH
ret
; 8b2c1
@ -235,13 +235,13 @@ BattleTower_CheckPartyHasThreeMonsThatAreNotEggs: ; 8b2c1
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

View File

@ -531,7 +531,7 @@ DayCare_GiveEgg: ; 169ac
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 @@ DayCare_InitBreeding: ; 16a3b
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

View File

@ -208,9 +208,9 @@ GetHallOfFameParty: ; 8653f
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 @@ DisplayHOFMon: ; 86748
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

View File

@ -45,13 +45,13 @@ NameRater: ; fb6ed
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 @@ CheckIfMonIsYourOT: ; fb78a
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 @@ IsNewNameEmpty: ; fb7be
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 @@ GetNicknameLength: ; fb802
ret z
inc c
ld a, c
cp PKMN_NAME_LENGTH - 1
cp MON_NAME_LENGTH - 1
jr nz, .loop
ret
; fb80f

View File

@ -43,7 +43,7 @@ GiveOddEgg: ; 1fb4b6
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 @@ GiveOddEgg: ; 1fb4b6
; 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

View File

@ -148,10 +148,10 @@ ReadCaughtData: ; 4f134
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

View File

@ -228,7 +228,7 @@ Data_DaisyMassage: ; 746b
CopyPokemonName_Buffer1_Buffer3: ; 746e
ld hl, StringBuffer1
ld de, StringBuffer3
ld bc, PKMN_NAME_LENGTH
ld bc, MON_NAME_LENGTH
jp CopyBytes
DummyPredef1: ; 747a

View File

@ -371,7 +371,7 @@ UpdateSpeciesNameIfNotNicknamed: ; 42414
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 @@ UpdateSpeciesNameIfNotNicknamed: ; 42414
call GetPokemonName
ld hl, StringBuffer1
pop de
ld bc, PKMN_NAME_LENGTH
ld bc, MON_NAME_LENGTH
jp CopyBytes
; 42454

View File

@ -599,7 +599,7 @@ ParkBall: ; e8a2
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 @@ ParkBall: ; e8a2
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 @@ ParkBall: ; e8a2
ld hl, sBoxMonNicknames
ld de, wMonOrItemNameBuffer
ld bc, PKMN_NAME_LENGTH
ld bc, MON_NAME_LENGTH
call CopyBytes
call CloseSRAM

View File

@ -5,7 +5,7 @@ LearnMove: ; 6508
call GetNick
ld hl, StringBuffer1
ld de, wMonOrItemNameBuffer
ld bc, PKMN_NAME_LENGTH
ld bc, MON_NAME_LENGTH
call CopyBytes
.loop

View File

@ -831,7 +831,7 @@ Link_PrepPartyData_Gen2: ; 28595
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 @@ Function2868a: ; 2868a
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 @@ LinkTrade: ; 28b87
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

View File

@ -283,7 +283,7 @@ LinkTradeMenu: ; 16d70c
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 @@ LinkTradeMenu: ; 16d70c
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

View File

@ -60,7 +60,7 @@ TryAddMonToParty: ; d88c
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 @@ AddTempmonToParty: ; da96
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 @@ SendGetPkmnIntoFromBox: ; db3f
call SkipNames
.okay12
ld bc, PKMN_NAME_LENGTH
ld bc, MON_NAME_LENGTH
call CopyBytes
pop hl
@ -943,7 +943,7 @@ SendPkmnIntoBox: ; de6e
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 @@ ShiftBoxMon: ; df47
call .shift
ld hl, sBoxMonNicknames
ld bc, PKMN_NAME_LENGTH
ld bc, MON_NAME_LENGTH
call .shift
ld hl, sBoxMons
@ -1240,7 +1240,7 @@ RemoveMonFromPartyOrBox: ; e039
; 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 @@ RemoveMonFromPartyOrBox: ; e039
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 @@ GivePoke:: ; e277
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 @@ GivePoke:: ; e277
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 @@ GivePoke:: ; e277
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

View File

@ -7,7 +7,7 @@ InsertPokemonIntoBox: ; 51322
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 @@ InsertPokemonIntoParty: ; 5138b
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]

View File

@ -254,7 +254,7 @@ NamingScreen: ; 116c1
ret
.StoreMonIconParams: ; 1187b (4:587b)
ld a, PKMN_NAME_LENGTH - 1
ld a, MON_NAME_LENGTH - 1
hlcoord 5, 6
jr .StoreParams

View File

@ -206,7 +206,7 @@ DoNPCTrade: ; fcc63
call CopyTradeName
ld hl, PartyMonNicknames
ld bc, PKMN_NAME_LENGTH
ld bc, MON_NAME_LENGTH
call Trade_GetAttributeOfLastPartymon
ld hl, wOTTrademonNickname
call CopyTradeName

View File

@ -630,7 +630,7 @@ GiveItem: ; 103fd
call GetCurNick
ld hl, StringBuffer1
ld de, wMonOrItemNameBuffer
ld bc, PKMN_NAME_LENGTH
ld bc, MON_NAME_LENGTH
call CopyBytes
call TryGiveItemToPartymon
pop af

View File

@ -524,7 +524,7 @@ PlacePartyMonMobileBattleSelection: ; 50307
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

View File

@ -2093,7 +2093,7 @@ PlayRadio: ; 91a53
; 91ab9
.StationPointers: ; 91ab9
; entries correspond to radio station constants
; entries correspond to MAPRADIO_* constants
dw .OakOrPnP
dw LoadStation_OaksPokemonTalk
dw LoadStation_PokedexShow

View File

@ -774,10 +774,10 @@ Printer_PrintBoxListSegment: ; 848e7 (21:48e7)
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 @@ Printer_PrintBoxListSegment: ; 848e7 (21:48e7)
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 @@ Printer_PrintBoxListSegment: ; 848e7 (21:48e7)
call PlaceString
pop hl
ld bc, PKMN_NAME_LENGTH
ld bc, MON_NAME_LENGTH
add hl, bc
push hl
ld a, [wAddrOfBoxToPrint]

View File

@ -273,7 +273,7 @@ endr
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,

View File

@ -6,7 +6,7 @@ CheckNickErrors:: ; 669f
push bc
push de
ld b, PKMN_NAME_LENGTH
ld b, MON_NAME_LENGTH
.checkchar
; end of nick?

View File

@ -128,7 +128,7 @@ Unreferenced_CorrectErrorsInPlayerParty:
ld hl, StringBuffer1
.got_nickname
pop de
ld bc, PKMN_NAME_LENGTH
ld bc, MON_NAME_LENGTH
call CopyBytes
pop bc

View File

@ -21,7 +21,7 @@ InitList: ; 50db9
jr nz, .check_item_name
ld hl, CurMart
ld de, PokemonNames
ld a, PKMN_NAME
ld a, MON_NAME
jr .done
.check_item_name

View File

@ -798,7 +798,7 @@ GiveTakePartyMonItem: ; 12b60
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

View File

@ -1117,7 +1117,7 @@ StatsScreen_LoadPageIndicators: ; 4e4cd (13:64cd)
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]

View File

@ -913,7 +913,7 @@ Special_RandomPhoneWildMon: ; 2a51f
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 @@ Special_RandomPhoneMon: ; 2a567
call GetPokemonName
ld hl, StringBuffer1
ld de, StringBuffer4
ld bc, PKMN_NAME_LENGTH
ld bc, MON_NAME_LENGTH
jp CopyBytes
; 2a5e9

View File

@ -1207,7 +1207,7 @@ GetNick:: ; 38a2
ld de, StringBuffer1
push de
ld bc, PKMN_NAME_LENGTH
ld bc, MON_NAME_LENGTH
call CopyBytes
pop de

View File

@ -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 @@ GetName:: ; 33c3
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 @@ GetPokemonName:: ; 343b
; 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

View File

@ -110,7 +110,7 @@ box: MACRO
\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 @@ battle_tower_struct: MACRO
\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 @@ hof_mon: MACRO
\1ID:: dw
\1DVs:: dw
\1Level:: db
\1Nickname:: ds PKMN_NAME_LENGTH +- 1
\1Nickname:: ds MON_NAME_LENGTH +- 1
\1End::
ENDM
@ -247,8 +247,8 @@ ENDM
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

View File

@ -37,7 +37,7 @@ Script_BattleRoomLoop: ; 0x9f425
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

View File

@ -270,7 +270,7 @@ CopyMobileEZChatToC608: ; 11c156
ld [wd265], a
call GetPokemonName
ld hl, StringBuffer1
ld bc, PKMN_NAME_LENGTH - 1
ld bc, MON_NAME_LENGTH - 1
jr .copy_string
; 11c1ab

View File

@ -2529,7 +2529,7 @@ Unknown_100fc0: ; 100fc0
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_100ff3: ; 100ff3
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

View File

@ -337,7 +337,7 @@ MobileTradeAnim_InitSpeciesName: ; 108239
call GetPokemonName
ld hl, StringBuffer1
pop de
ld bc, PKMN_NAME_LENGTH
ld bc, MON_NAME_LENGTH
call CopyBytes
ret
; 10824b

View File

@ -4084,7 +4084,7 @@ BattleTower_UbersCheck: ; 119dd1 (46:5dd1)
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 @@ AddMobileMonToParty: ; 11b98f
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 @@ AddMobileMonToParty: ; 11b98f
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

View File

@ -219,7 +219,7 @@ Function170c8b: ; 170c8b
; 170c98
CheckBTMonMovesForErrors: ; 170c98
ld c, BATTLETOWER_PARTY_SIZE
ld c, BATTLETOWER_PARTY_LENGTH
ld hl, wBT_OTTempPkmn1Moves
.loop
push hl
@ -254,7 +254,7 @@ CheckBTMonMovesForErrors: ; 170c98
.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

View File

@ -203,7 +203,7 @@ sBattleTower:: ; be46
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

View File

@ -368,8 +368,8 @@ wMiscEnd::
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 @@ wBattle::
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 @@ wTimeCapsulePartyMon4:: red_party_struct wTimeCapsulePartyMon4
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 @@ wLinkPlayerPartyMon4:: party_struct wLinkPlayerPartyMon4
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 @@ wTempMail:: mailmsg wTempMail
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 @@ wSeerCaughtGender:: db
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 @@ OTPartyMon6:: party_struct OTPartyMon6 ; d378
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 @@ PartyMon6:: party_struct PartyMon6 ; ddcf
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 @@ wDayCareMan:: ; def5
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 @@ wBreedMotherOrNonDitto:: ; df2e
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