Pkmn -> Mon
Since we're aiming for consistency across the codebase, I believe it includes a uniform way to refer to the creatures this game consists of in the labels of the code. The only exceptions to this rule are labels referring to things named through the use of the <PK><MN> or <PKMN> characters, in which case PKMN is used. Most of this was already consistent enough™, I just picked the convention with the most occurences and fixed the outliers.
This commit is contained in:
@@ -95,7 +95,7 @@ Function170139: ; 170139
|
||||
ld [wMisc], a
|
||||
ld a, l
|
||||
ld [wMisc + 1], a
|
||||
ld hl, wBT_OTTempPkmn1DVs
|
||||
ld hl, wBT_OTTempMon1DVs
|
||||
ld a, [wPlayerID]
|
||||
ld [hli], a
|
||||
ld a, [wPlayerID + 1]
|
||||
@@ -112,7 +112,7 @@ Function170139: ; 170139
|
||||
ld bc, wPlayerID
|
||||
ld de, wPlayerGender
|
||||
farcall GetMobileOTTrainerClass
|
||||
ld de, wBT_OTTempPkmn1CaughtGender
|
||||
ld de, wBT_OTTempMon1CaughtGender
|
||||
ld a, c
|
||||
ld [de], a
|
||||
inc de
|
||||
@@ -279,59 +279,59 @@ RunBattleTowerTrainer: ; 17024d
|
||||
|
||||
|
||||
ReadBTTrainerParty: ; 1702b7
|
||||
; Initialise the BattleTower-Trainer and his Pkmn
|
||||
; Initialise the BattleTower-Trainer and his mon
|
||||
call CopyBTTrainer_FromBT_OT_TowBT_OTTemp
|
||||
|
||||
; Check the nicknames for illegal characters, and replace bad nicknames
|
||||
; with their species names.
|
||||
ld de, wBT_OTTempPkmn1Name ; $c643
|
||||
ld de, wBT_OTTempMon1Name ; $c643
|
||||
ld c, MON_NAME_LENGTH
|
||||
farcall CheckStringForErrors
|
||||
jr nc, .skip_mon_1
|
||||
|
||||
ld a, [wBT_OTTempPkmn1]
|
||||
ld a, [wBT_OTTempMon1]
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
call GetPokemonName
|
||||
ld l, e
|
||||
ld h, d
|
||||
ld de, wBT_OTTempPkmn1Name ; $c643
|
||||
ld de, wBT_OTTempMon1Name ; $c643
|
||||
ld bc, MON_NAME_LENGTH
|
||||
call CopyBytes
|
||||
|
||||
.skip_mon_1
|
||||
ld de, wBT_OTTempPkmn2Name ; $c67e
|
||||
ld de, wBT_OTTempMon2Name ; $c67e
|
||||
ld c, MON_NAME_LENGTH
|
||||
farcall CheckStringForErrors
|
||||
jr nc, .skip_mon_2
|
||||
ld a, [wBT_OTTempPkmn2] ; [$c64e]
|
||||
ld a, [wBT_OTTempMon2] ; [$c64e]
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
call GetPokemonName
|
||||
ld l, e
|
||||
ld h, d
|
||||
ld de, wBT_OTTempPkmn2Name ; $c67e
|
||||
ld de, wBT_OTTempMon2Name ; $c67e
|
||||
ld bc, MON_NAME_LENGTH
|
||||
call CopyBytes
|
||||
|
||||
.skip_mon_2
|
||||
ld de, wBT_OTTempPkmn3Name ; $c686 + 51 = $c6b9
|
||||
ld de, wBT_OTTempMon3Name ; $c686 + 51 = $c6b9
|
||||
ld c, MON_NAME_LENGTH
|
||||
farcall CheckStringForErrors
|
||||
jr nc, .skip_mon_3
|
||||
ld a, [wBT_OTTempPkmn3] ; [$c689]
|
||||
ld a, [wBT_OTTempMon3] ; [$c689]
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
call GetPokemonName
|
||||
ld l, e
|
||||
ld h, d
|
||||
ld de, wBT_OTTempPkmn3Name ; $c686 + 51 = $c6b9
|
||||
ld de, wBT_OTTempMon3Name ; $c686 + 51 = $c6b9
|
||||
ld bc, MON_NAME_LENGTH
|
||||
call CopyBytes
|
||||
|
||||
.skip_mon_3
|
||||
; Add the terminator character to each of these names
|
||||
ld a, "@"
|
||||
ld [wBT_OTTempPkmn1NameEnd - 1], a ; $c64d
|
||||
ld [wBT_OTTempPkmn2NameEnd - 1], a ; $c688
|
||||
ld [wBT_OTTempPkmn3NameEnd - 1], a ; $c68a + 57 = $c6c3
|
||||
ld [wBT_OTTempMon1NameEnd - 1], a ; $c64d
|
||||
ld [wBT_OTTempMon2NameEnd - 1], a ; $c688
|
||||
ld [wBT_OTTempMon3NameEnd - 1], a ; $c68a + 57 = $c6c3
|
||||
; Fix errors in the movesets
|
||||
call CheckBTMonMovesForErrors
|
||||
; Repair the trainer name if needed, then copy it to wOTPlayerName
|
||||
@@ -360,7 +360,7 @@ ReadBTTrainerParty: ; 1702b7
|
||||
ld a, HIGH(wOTPartyMonNicknames)
|
||||
ld [wBGMapBuffer + 1], a
|
||||
|
||||
; Copy Pkmn into Memory from the address in hl
|
||||
; Copy mon into Memory from the address in hl
|
||||
ld de, wOTPartyMon1Species
|
||||
ld bc, wOTPartyCount
|
||||
ld a, BATTLETOWER_PARTY_LENGTH
|
||||
@@ -398,7 +398,7 @@ ReadBTTrainerParty: ; 1702b7
|
||||
|
||||
ValidateBTParty: ; 170394
|
||||
; Check for and fix errors in party data
|
||||
ld hl, wBT_OTTempPkmn1Species
|
||||
ld hl, wBT_OTTempMon1Species
|
||||
ld d, BATTLETOWER_PARTY_LENGTH
|
||||
.pkmn_loop
|
||||
push de
|
||||
@@ -484,7 +484,7 @@ endr
|
||||
ld hl, MON_STAT_EXP - 1
|
||||
add hl, bc
|
||||
ld b, $1
|
||||
predef CalcPkmnStats
|
||||
predef CalcMonStats
|
||||
pop de
|
||||
pop hl
|
||||
dec de
|
||||
|
Reference in New Issue
Block a user