ref: 4522162d4578ab40a071efec9e1fa28c2756e596
parent: 6c8f8609cb0d8dce34c6f8125267edfa11bbb3f1
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Wed Mar 17 12:16:02 EDT 2021
Consistent labels for each nickname in RAM
--- a/constants/npc_trade_constants.asm
+++ b/constants/npc_trade_constants.asm
@@ -1,15 +1,15 @@
; npctrade struct members (see data/events/npc_trades.asm)
rsreset
-NPCTRADE_DIALOG rb
-NPCTRADE_GIVEMON rb
-NPCTRADE_GETMON rb
-NPCTRADE_NICK rb MON_NAME_LENGTH
-NPCTRADE_DVS rw
-NPCTRADE_ITEM rb
-NPCTRADE_OT_ID rw
-NPCTRADE_OT_NAME rb NAME_LENGTH
-NPCTRADE_GENDER rb
-NPCTRADE_PADDING rb
+NPCTRADE_DIALOG rb
+NPCTRADE_GIVEMON rb
+NPCTRADE_GETMON rb
+NPCTRADE_NICKNAME rb MON_NAME_LENGTH
+NPCTRADE_DVS rw
+NPCTRADE_ITEM rb
+NPCTRADE_OT_ID rw
+NPCTRADE_OT_NAME rb NAME_LENGTH
+NPCTRADE_GENDER rb
+ rb_skip
NPCTRADE_STRUCT_LENGTH EQU _RS
; NPCTrades indexes (see data/events/npc_trades.asm)
--- a/data/text/battle.asm
+++ b/data/text/battle.asm
@@ -9,7 +9,7 @@
WildPokemonAppearedText:
text "Wild @"
- text_ram wEnemyMonNick
+ text_ram wEnemyMonNickname
text_start
line "appeared!"
prompt
@@ -17,13 +17,13 @@
HookedPokemonAttackedText:
text "The hooked"
line "@"
- text_ram wEnemyMonNick
+ text_ram wEnemyMonNickname
text_start
cont "attacked!"
prompt
PokemonFellFromTreeText:
- text_ram wEnemyMonNick
+ text_ram wEnemyMonNickname
text " fell"
line "out of the tree!"
prompt
@@ -30,7 +30,7 @@
WildCelebiAppearedText:
text "Wild @"
- text_ram wEnemyMonNick
+ text_ram wEnemyMonNickname
text_start
line "appeared!"
prompt
@@ -42,7 +42,7 @@
BattleText_WildFled:
text "Wild @"
- text_ram wEnemyMonNick
+ text_ram wEnemyMonNickname
text_start
line "fled!"
prompt
@@ -49,7 +49,7 @@
BattleText_EnemyFled:
text "Enemy @"
- text_ram wEnemyMonNick
+ text_ram wEnemyMonNickname
text_start
line "fled!"
prompt
@@ -161,7 +161,7 @@
BattleText_EnemyMonFainted:
text "Enemy @"
- text_ram wEnemyMonNick
+ text_ram wEnemyMonNickname
text_start
line "fainted!"
prompt
@@ -206,7 +206,7 @@
prompt
BattleText_MonFainted:
- text_ram wBattleMonNick
+ text_ram wBattleMonNickname
text_start
line "fainted!"
prompt
@@ -230,7 +230,7 @@
text "<ENEMY>"
line "is about to use"
cont "@"
- text_ram wEnemyMonNick
+ text_ram wEnemyMonNickname
text "."
para "Will <PLAYER>"
@@ -241,7 +241,7 @@
text "<ENEMY>"
line "sent out"
cont "@"
- text_ram wEnemyMonNick
+ text_ram wEnemyMonNickname
text "!"
done
@@ -308,13 +308,13 @@
prompt
BattleText_MonIsAlreadyOut:
- text_ram wBattleMonNick
+ text_ram wBattleMonNickname
text_start
line "is already out."
prompt
BattleText_MonCantBeRecalled:
- text_ram wBattleMonNick
+ text_ram wBattleMonNickname
text_start
line "can't be recalled!"
prompt
@@ -330,7 +330,7 @@
prompt
BattleText_MonHasNoMovesLeft:
- text_ram wBattleMonNick
+ text_ram wBattleMonNickname
text_start
line "has no moves left!"
done
@@ -353,7 +353,7 @@
BattleText_WildMonIsEating:
text "Wild @"
- text_ram wEnemyMonNick
+ text_ram wEnemyMonNickname
text_start
line "is eating!"
prompt
@@ -360,7 +360,7 @@
BattleText_WildMonIsAngry:
text "Wild @"
- text_ram wEnemyMonNick
+ text_ram wEnemyMonNickname
text_start
line "is angry!"
prompt
@@ -516,37 +516,37 @@
prompt
LoafingAroundText:
- text_ram wBattleMonNick
+ text_ram wBattleMonNickname
text " is"
line "loafing around."
prompt
BeganToNapText:
- text_ram wBattleMonNick
+ text_ram wBattleMonNickname
text " began"
line "to nap!"
prompt
WontObeyText:
- text_ram wBattleMonNick
+ text_ram wBattleMonNickname
text " won't"
line "obey!"
prompt
TurnedAwayText:
- text_ram wBattleMonNick
+ text_ram wBattleMonNickname
text " turned"
line "away!"
prompt
IgnoredOrdersText:
- text_ram wBattleMonNick
+ text_ram wBattleMonNickname
text " ignored"
line "orders!"
prompt
IgnoredSleepingText:
- text_ram wBattleMonNick
+ text_ram wBattleMonNickname
text " ignored"
line "orders…sleeping!"
prompt
--- a/data/text/common_1.asm
+++ b/data/text/common_1.asm
@@ -1106,7 +1106,7 @@
text "<ENEMY>"
line "withdrew"
cont "@"
- text_ram wEnemyMonNick
+ text_ram wEnemyMonNickname
text "!"
prompt
@@ -1116,7 +1116,7 @@
text_ram wMonOrItemNameBuffer
text_start
cont "on @"
- text_ram wEnemyMonNick
+ text_ram wEnemyMonNickname
text "!"
prompt
--- a/data/text/common_2.asm
+++ b/data/text/common_2.asm
@@ -133,12 +133,12 @@
text_end
_BattleMonNicknameText::
- text_ram wBattleMonNick
+ text_ram wBattleMonNickname
text "!"
done
_BattleMonNickCommaText::
- text_ram wBattleMonNick
+ text_ram wBattleMonNickname
text ",@"
text_end
@@ -807,7 +807,7 @@
_LeftWithDayCareLadyText::
text "It's @"
- text_ram wBreedMon2Nick
+ text_ram wBreedMon2Nickname
text_start
line "that was left with"
cont "the DAY-CARE LADY."
@@ -815,7 +815,7 @@
_LeftWithDayCareManText::
text "It's @"
- text_ram wBreedMon1Nick
+ text_ram wBreedMon1Nickname
text_start
line "that was left with"
cont "the DAY-CARE MAN."
--- a/data/text/common_3.asm
+++ b/data/text/common_3.asm
@@ -72,7 +72,7 @@
_LinkAskTradeForText::
text "Trade @"
- text_ram wBufferTrademonNick
+ text_ram wBufferTrademonNickname
text_start
line "for @"
text_ram wStringBuffer1
@@ -322,7 +322,7 @@
text_ram wSeerNickname
text_start
line "came from @"
- text_ram wSeerOTName
+ text_ram wSeerOT
text_start
cont "in a trade?"
@@ -330,7 +330,7 @@
text_ram wSeerCaughtLocation
text_start
line "was where @"
- text_ram wSeerOTName
+ text_ram wSeerOT
text_start
cont "met @"
text_ram wSeerNickname
@@ -1216,7 +1216,7 @@
Text_BallCaught::
text "Gotcha! @"
- text_ram wEnemyMonNick
+ text_ram wEnemyMonNickname
text_start
line "was caught!@"
sound_caught_mon
@@ -1237,7 +1237,7 @@
prompt
_NewDexDataText::
- text_ram wEnemyMonNick
+ text_ram wEnemyMonNickname
text "'s data"
line "was newly added to"
cont "the #DEX.@"
--- a/data/text_buffers.asm
+++ b/data/text_buffers.asm
@@ -1,9 +1,9 @@
StringBufferPointers::
; entries correspond to arguments for text_buffer (TX_STRINGBUFFER)
- dw wStringBuffer3 ; 0
- dw wStringBuffer4 ; 1
- dw wStringBuffer5 ; 2
- dw wStringBuffer2 ; 3
- dw wStringBuffer1 ; 4
- dw wEnemyMonNick ; 5
- dw wBattleMonNick ; 6
+ dw wStringBuffer3 ; 0
+ dw wStringBuffer4 ; 1
+ dw wStringBuffer5 ; 2
+ dw wStringBuffer2 ; 3
+ dw wStringBuffer1 ; 4
+ dw wEnemyMonNickname ; 5
+ dw wBattleMonNickname ; 6
--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -566,7 +566,7 @@
.got_mon
ld a, [wCurBeatUpPartyMon]
ld hl, wPartyMonNicknames
- call GetNick
+ call GetNickname
ld a, MON_HP
call GetBeatupMonLocation
ld a, [hli]
--- a/docs/text_commands.md
+++ b/docs/text_commands.md
@@ -110,13 +110,13 @@
Write text from one of the following addresses (listed in [data/text_buffers.asm](https://github.com/pret/pokecrystal/blob/master/data/text_buffers.asm)):
-0. `StringBuffer3`
-1. `StringBuffer4`
-2. `StringBuffer5`
-3. `StringBuffer2`
-4. `StringBuffer1`
-5. `EnemyMonNick`
-6. `BattleMonNick`
+0. `wStringBuffer3`
+1. `wStringBuffer4`
+2. `wStringBuffer5`
+3. `wStringBuffer2`
+4. `wStringBuffer1`
+5. `wEnemyMonNickname`
+6. `wBattleMonNickname`
## `$15`: `text_today`
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -3885,7 +3885,7 @@
ld hl, wPartyMonNicknames
ld a, [wCurBattleMon]
call SkipNames
- ld de, wBattleMonNick
+ ld de, wBattleMonNickname
ld bc, MON_NAME_LENGTH
call CopyBytes
ld hl, wBattleMonAttack
@@ -3965,7 +3965,7 @@
ld hl, wOTPartyMonNicknames
ld a, [wCurPartyMon]
call SkipNames
- ld de, wEnemyMonNick
+ ld de, wEnemyMonNickname
ld bc, MON_NAME_LENGTH
call CopyBytes
ld hl, wEnemyMonAttack
@@ -4642,7 +4642,7 @@
ret
PrintPlayerHUD:
- ld de, wBattleMonNick
+ ld de, wBattleMonNickname
hlcoord 10, 7
call Battle_DummyFunction
call PlaceString
@@ -4728,7 +4728,7 @@
ld [wCurSpecies], a
ld [wCurPartySpecies], a
call GetBaseData
- ld de, wEnemyMonNick
+ ld de, wEnemyMonNickname
hlcoord 1, 0
call Battle_DummyFunction
call PlaceString
@@ -6394,7 +6394,7 @@
; Update enemy nick
ld hl, wStringBuffer1
- ld de, wEnemyMonNick
+ ld de, wEnemyMonNickname
ld bc, MON_NAME_LENGTH
call CopyBytes
@@ -7112,7 +7112,7 @@
ld [wStringBuffer2], a
ld a, [wCurPartyMon]
ld hl, wPartyMonNicknames
- call GetNick
+ call GetNickname
ld hl, Text_MonGainedExpPoint
call BattleTextbox
ld a, [wStringBuffer2 + 1]
@@ -7523,7 +7523,7 @@
ld c, $40
call .LoopBarAnimation
call PrintPlayerHUD
- ld hl, wBattleMonNick
+ ld hl, wBattleMonNickname
ld de, wStringBuffer1
ld bc, MON_NAME_LENGTH
call CopyBytes
--- a/engine/battle/move_effects/beat_up.asm
+++ b/engine/battle/move_effects/beat_up.asm
@@ -28,7 +28,7 @@
.got_mon
ld a, [wCurBeatUpPartyMon]
ld hl, wPartyMonNicknames
- call GetNick
+ call GetNickname
ld a, MON_HP
call GetBeatupMonLocation
ld a, [hli]
--- a/engine/battle/read_trainer_party.asm
+++ b/engine/battle/read_trainer_party.asm
@@ -14,7 +14,7 @@
ld [hl], a
ld hl, wOTPartyMons
- ld bc, wOTPartyMonsEnd - wOTPartyMons
+ ld bc, PARTYMON_STRUCT_LENGTH * PARTY_LENGTH
xor a
call ByteFill
--- a/engine/events/battle_tower/battle_tower.asm
+++ b/engine/events/battle_tower/battle_tower.asm
@@ -1258,7 +1258,7 @@
cp EGG
jr nz, .not_egg
push hl
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
ld de, NAME_LENGTH_JAPANESE
ld a, b
and a
--- a/engine/events/bug_contest/display_stats.asm
+++ b/engine/events/bug_contest/display_stats.asm
@@ -48,7 +48,7 @@
ld [wTempMonLevel], a
call PrintLevel
- ld de, wEnemyMonNick
+ ld de, wEnemyMonNickname
hlcoord 1, 8
call PlaceString
--- a/engine/events/daycare.asm
+++ b/engine/events/daycare.asm
@@ -40,7 +40,7 @@
.AskWithdrawMon:
farcall GetBreedMon1LevelGrowth
- ld hl, wBreedMon1Nick
+ ld hl, wBreedMon1Nickname
call GetPriceToRetrieveBreedmon
call DayCare_AskWithdrawBreedMon
jr c, .print_text
@@ -78,7 +78,7 @@
.AskWithdrawMon:
farcall GetBreedMon2LevelGrowth
- ld hl, wBreedMon2Nick
+ ld hl, wBreedMon2Nickname
call GetPriceToRetrieveBreedmon
call DayCare_AskWithdrawBreedMon
jr c, .print_text
@@ -137,7 +137,7 @@
jr c, .HoldingMail
ld hl, wPartyMonNicknames
ld a, [wCurPartyMon]
- call GetNick
+ call GetNickname
and a
ret
@@ -467,13 +467,13 @@
ld hl, wPartyMonNicknames
ld bc, MON_NAME_LENGTH
call DayCare_GetCurrentPartyMember
- ld hl, wEggNick
+ ld hl, wEggMonNickname
call CopyBytes
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
ld bc, NAME_LENGTH
call DayCare_GetCurrentPartyMember
- ld hl, wEggOT
+ ld hl, wEggMonOT
call CopyBytes
ld hl, wPartyMon1
@@ -550,10 +550,10 @@
ld hl, wEggMon
ld bc, BOXMON_STRUCT_LENGTH
call ByteFill
- ld hl, wEggNick
+ ld hl, wEggMonNickname
ld bc, MON_NAME_LENGTH
call ByteFill
- ld hl, wEggOT
+ ld hl, wEggMonOT
ld bc, NAME_LENGTH
call ByteFill
ld a, [wBreedMon1DVs]
@@ -606,11 +606,11 @@
ld [wEggMonSpecies], a
call GetBaseData
- ld hl, wEggNick
+ ld hl, wEggMonNickname
ld de, .String_EGG
call CopyName2
ld hl, wPlayerName
- ld de, wEggOT
+ ld de, wEggMonOT
ld bc, NAME_LENGTH
call CopyBytes
xor a
--- a/engine/events/haircut.asm
+++ b/engine/events/haircut.asm
@@ -33,7 +33,7 @@
cp EGG
jr z, .egg
push hl
- call GetCurNick
+ call GetCurNickname
call CopyPokemonName_Buffer1_Buffer3
pop hl
call Random
--- a/engine/events/magikarp.asm
+++ b/engine/events/magikarp.asm
@@ -49,7 +49,7 @@
ld [de], a
inc de
ld a, [wCurPartyMon]
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
call SkipNames
call CopyBytes
ld a, MAGIKARPLENGTH_BEAT_RECORD
--- a/engine/events/move_tutor.asm
+++ b/engine/events/move_tutor.asm
@@ -60,7 +60,7 @@
push bc
ld a, [wCurPartyMon]
ld hl, wPartyMonNicknames
- call GetNick
+ call GetNickname
pop bc
ld a, c
--- a/engine/events/name_rater.asm
+++ b/engine/events/name_rater.asm
@@ -14,7 +14,7 @@
cp EGG
jr z, .egg
; ... or a Pokemon you got from a trade.
- call GetCurNick
+ call GetCurNickname
call CheckIfMonIsYourOT
jr c, .traded
; This name is good, but we can do better. How about it?
@@ -57,7 +57,7 @@
.samename
push hl
- call GetCurNick
+ call GetCurNickname
ld hl, NameRaterNamedText
call PrintText
pop hl
@@ -80,7 +80,7 @@
CheckIfMonIsYourOT:
; Checks to see if the partymon loaded in [wCurPartyMon] has the different OT as you. Returns carry if not.
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
ld bc, NAME_LENGTH
ld a, [wCurPartyMon]
call AddNTimes
@@ -138,10 +138,10 @@
ld a, [wCurPartyMon]
call AddNTimes
push hl
- call GetNicknameLength
+ call GetNicknamenameLength
ld b, c
ld hl, wStringBuffer2
- call GetNicknameLength
+ call GetNicknamenameLength
pop hl
ld a, c
cp b
@@ -165,7 +165,7 @@
scf
ret
-GetNicknameLength:
+GetNicknamenameLength:
; Gets the length of the name starting at hl and returns it in c.
ld c, 0
.loop
--- a/engine/events/npc_trade.asm
+++ b/engine/events/npc_trade.asm
@@ -132,7 +132,7 @@
call GetTradeMonName
call CopyTradeName
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
ld bc, NAME_LENGTH
call Trade_GetAttributeOfCurrentPartymon
ld de, wPlayerTrademonOTName
@@ -196,7 +196,7 @@
.incomplete
farcall SetGiftPartyMonCaughtData
- ld e, NPCTRADE_NICK
+ ld e, NPCTRADE_NICKNAME
call GetTradeAttr
ld de, wOTTrademonNickname
call CopyTradeName
@@ -216,7 +216,7 @@
ld de, wOTTrademonSenderName
call CopyTradeName
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
ld bc, NAME_LENGTH
call Trade_GetAttributeOfLastPartymon
ld hl, wOTTrademonOTName
--- a/engine/events/odd_egg.asm
+++ b/engine/events/odd_egg.asm
@@ -42,8 +42,8 @@
ld a, NICKNAMED_MON_STRUCT_LENGTH
call AddNTimes
- ; Writes to wOddEgg, wOddEggName, and wOddEggOTName,
- ; even though OddEggs does not have data for wOddEggOTName
+ ; Writes to wOddEgg, wOddEggName, and wOddEggOT,
+ ; even though OddEggs does not have data for wOddEggOT
ld de, wOddEgg
ld bc, NICKNAMED_MON_STRUCT_LENGTH + NAME_LENGTH
call CopyBytes
@@ -78,11 +78,11 @@
ld bc, MON_NAME_LENGTH
call CopyBytes
- ; load pointer to wTempOddEggNickname in wMobileMonOTNamePointer
+ ; load pointer to wTempOddEggNickname in wMobileMonOTPointer
ld a, LOW(wTempOddEggNickname)
- ld [wMobileMonOTNamePointer], a
+ ld [wMobileMonOTPointer], a
ld a, HIGH(wTempOddEggNickname)
- ld [wMobileMonOTNamePointer + 1], a
+ ld [wMobileMonOTPointer + 1], a
; load pointer to wOddEggName in wMobileMonNicknamePointer
ld a, LOW(wOddEggName)
ld [wMobileMonNicknamePointer], a
--- a/engine/events/overworld.asm
+++ b/engine/events/overworld.asm
@@ -19,13 +19,13 @@
scf
ret
-GetPartyNick:
+GetPartyNickname:
; write wCurPartyMon nickname to wStringBuffer1-3
ld hl, wPartyMonNicknames
ld a, BOXMON
ld [wMonType], a
ld a, [wCurPartyMon]
- call GetNick
+ call GetNickname
call CopyName1
; copy text from wStringBuffer2 to wStringBuffer3
ld de, wStringBuffer2
@@ -204,7 +204,7 @@
special UpdateTimePals
Script_Cut:
- callasm GetPartyNick
+ callasm GetPartyNickname
writetext UseCutText
reloadmappart
callasm CutDownTreeOrGrass
@@ -379,7 +379,7 @@
.DoSurf:
call GetSurfType
ld [wSurfingPlayerState], a
- call GetPartyNick
+ call GetPartyNickname
ld hl, SurfFromMenuScript
call QueueScript
ld a, $81
@@ -516,7 +516,7 @@
call GetSurfType
ld [wSurfingPlayerState], a
- call GetPartyNick
+ call GetPartyNickname
ld a, BANK(AskSurfScript)
ld hl, AskSurfScript
@@ -674,7 +674,7 @@
special UpdateTimePals
Script_UsedWaterfall:
- callasm GetPartyNick
+ callasm GetPartyNickname
writetext .UseWaterfallText
waitbutton
closetext
@@ -798,7 +798,7 @@
ld de, wNextWarp
ld bc, 3
call CopyBytes
- call GetPartyNick
+ call GetPartyNickname
ld a, [wEscapeRopeOrDigType]
cp $2
jr nz, .escaperope
@@ -911,7 +911,7 @@
ret
.DoTeleport:
- call GetPartyNick
+ call GetPartyNickname
ld hl, .TeleportScript
call QueueScript
ld a, $81
@@ -999,7 +999,7 @@
add hl, de
ld a, [hl]
ld [wStrengthSpecies], a
- call GetPartyNick
+ call GetPartyNickname
ret
Script_StrengthFromMenu:
@@ -1166,7 +1166,7 @@
special UpdateTimePals
Script_UsedWhirlpool:
- callasm GetPartyNick
+ callasm GetPartyNickname
writetext UseWhirlpoolText
reloadmappart
callasm DisappearWhirlpool
@@ -1265,7 +1265,7 @@
special UpdateTimePals
HeadbuttScript:
- callasm GetPartyNick
+ callasm GetPartyNickname
writetext UseHeadbuttText
reloadmappart
@@ -1362,7 +1362,7 @@
special UpdateTimePals
RockSmashScript:
- callasm GetPartyNick
+ callasm GetPartyNickname
writetext UseRockSmashText
closetext
special WaitSFX
--- a/engine/events/poisonstep.asm
+++ b/engine/events/poisonstep.asm
@@ -128,7 +128,7 @@
jr z, .mon_not_fainted
ld c, HAPPINESS_POISONFAINT
farcall ChangeHappiness
- farcall GetPartyNick
+ farcall GetPartyNickname
ld hl, .PoisonFaintText
call PrintText
--- a/engine/events/poke_seer.asm
+++ b/engine/events/poke_seer.asm
@@ -249,10 +249,10 @@
GetCaughtOT:
ld a, [wCurPartyMon]
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
ld bc, NAME_LENGTH
call AddNTimes
- ld de, wSeerOTName
+ ld de, wSeerOT
ld bc, NAME_LENGTH
call CopyBytes
@@ -264,7 +264,7 @@
ld hl, .female
.got_grammar
- ld de, wSeerOTNameGrammar
+ ld de, wSeerOTGrammar
ld a, "@"
ld [de], a
ret
--- a/engine/events/shuckle.asm
+++ b/engine/events/shuckle.asm
@@ -42,13 +42,13 @@
dec a
ld hl, wPartyMonNicknames
call SkipNames
- ld de, SpecialShuckleNick
+ ld de, SpecialShuckleNickname
call CopyName2
; OT.
ld a, [wPartyCount]
dec a
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
call SkipNames
ld de, SpecialShuckleOT
call CopyName2
@@ -68,7 +68,7 @@
SpecialShuckleOT:
db "MANIA@"
-SpecialShuckleNick:
+SpecialShuckleNickname:
db "SHUCKIE@"
ReturnShuckie:
@@ -94,7 +94,7 @@
; OT
ld a, [wCurPartyMon]
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
call SkipNames
ld de, SpecialShuckleOT
.CheckOT:
--- a/engine/events/sweet_scent.asm
+++ b/engine/events/sweet_scent.asm
@@ -8,7 +8,7 @@
.SweetScent:
reloadmappart
special UpdateTimePals
- callasm GetPartyNick
+ callasm GetPartyNickname
writetext UseSweetScentText
waitbutton
callasm SweetScentEncounter
--- a/engine/items/item_effects.asm
+++ b/engine/items/item_effects.asm
@@ -1292,7 +1292,7 @@
call GetBaseData
ld a, [wCurPartyMon]
ld hl, wPartyMonNicknames
- call GetNick
+ call GetNickname
ret
RareCandyEffect:
--- a/engine/items/pack.asm
+++ b/engine/items/pack.asm
@@ -590,7 +590,7 @@
push af
ld a, [wPackJumptableIndex]
push af
- call GetCurNick
+ call GetCurNickname
ld hl, wStringBuffer1
ld de, wMonOrItemNameBuffer
ld bc, MON_NAME_LENGTH
--- a/engine/items/tmhm.asm
+++ b/engine/items/tmhm.asm
@@ -122,7 +122,7 @@
push bc
ld a, [wCurPartyMon]
ld hl, wPartyMonNicknames
- call GetNick
+ call GetNickname
pop bc
ld a, c
--- a/engine/link/init_list.asm
+++ b/engine/link/init_list.asm
@@ -5,7 +5,7 @@
cp INIT_ENEMYOT_LIST
jr nz, .check_party_ot_name
ld hl, wOTPartyCount
- ld de, wOTPartyMonOT
+ ld de, wOTPartyMonOTs
ld a, ENEMY_OT_NAME
jr .done
@@ -13,7 +13,7 @@
cp INIT_PLAYEROT_LIST
jr nz, .check_mon_name
ld hl, wPartyCount
- ld de, wPartyMonOT
+ ld de, wPartyMonOTs
ld a, PARTY_OT_NAME
jr .done
--- a/engine/link/link.asm
+++ b/engine/link/link.asm
@@ -177,9 +177,9 @@
ld hl, wTimeCapsulePlayerData
call Link_ConvertPartyStruct1to2
- ld a, LOW(wOTPartyMonOT)
+ ld a, LOW(wOTPartyMonOTs)
ld [wUnusedNamesPointer], a
- ld a, HIGH(wOTPartyMonOT)
+ ld a, HIGH(wOTPartyMonOTs)
ld [wUnusedNamesPointer + 1], a
ld de, MUSIC_NONE
@@ -432,9 +432,9 @@
ld bc, wOTPartyDataEnd - wOTPartyMons
call CopyBytes
- ld a, LOW(wOTPartyMonOT)
+ ld a, LOW(wOTPartyMonOTs)
ld [wUnusedNamesPointer], a
- ld a, HIGH(wOTPartyMonOT)
+ ld a, HIGH(wOTPartyMonOTs)
ld [wUnusedNamesPointer + 1], a
ld de, MUSIC_NONE
@@ -716,7 +716,7 @@
dec c
jr nz, .mon_loop
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
call .copy_ot_nicks
ld hl, wPartyMonNicknames
@@ -860,7 +860,7 @@
ld bc, PARTY_LENGTH * PARTYMON_STRUCT_LENGTH
call CopyBytes
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
ld bc, PARTY_LENGTH * NAME_LENGTH
call CopyBytes
@@ -1005,7 +1005,7 @@
pop hl
ld bc, PARTY_LENGTH * REDMON_STRUCT_LENGTH
add hl, bc
- ld de, wOTPartyMonOT
+ ld de, wOTPartyMonOTs
ld bc, PARTY_LENGTH * NAME_LENGTH
call CopyBytes
ld de, wOTPartyMonNicknames
@@ -1672,7 +1672,7 @@
ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
- ld de, wBufferTrademonNick
+ ld de, wBufferTrademonNickname
ld bc, MON_NAME_LENGTH
call CopyBytes
ld a, [wCurOTTradePartyMon]
@@ -1811,7 +1811,7 @@
push af
; OT name
ld a, [wCurTradePartyMon]
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
call SkipNames
ld de, wPlayerTrademonOTName
ld bc, NAME_LENGTH
@@ -1858,7 +1858,7 @@
ld [wOTTrademonSpecies], a
; OT name
ld a, [wCurOTTradePartyMon]
- ld hl, wOTPartyMonOT
+ ld hl, wOTPartyMonOTs
call SkipNames
ld de, wOTTrademonOTName
ld bc, NAME_LENGTH
--- a/engine/movie/trade_animation.asm
+++ b/engine/movie/trade_animation.asm
@@ -212,10 +212,10 @@
call TradeAnim_GetFrontpic
ld a, [wPlayerTrademonSpecies]
ld de, wPlayerTrademonSpeciesName
- call TradeAnim_GetNickname
+ call TradeAnim_GetNicknamename
ld a, [wOTTrademonSpecies]
ld de, wOTTrademonSpeciesName
- call TradeAnim_GetNickname
+ call TradeAnim_GetNicknamename
call TradeAnim_NormalPals
ret
@@ -817,7 +817,7 @@
predef GetMonFrontpic
ret
-TradeAnim_GetNickname:
+TradeAnim_GetNicknamename:
push de
ld [wNamedObjectIndex], a
call GetPokemonName
--- a/engine/pokemon/bills_pc.asm
+++ b/engine/pokemon/bills_pc.asm
@@ -1709,7 +1709,7 @@
call CopySpeciesToTemp
ld hl, sBoxMonNicknames
call CopyNicknameToTemp
- ld hl, sBoxMonOT
+ ld hl, sBoxMonOTs
call CopyOTNameToTemp
ld hl, sBoxMons
ld bc, BOXMON_STRUCT_LENGTH
@@ -1727,7 +1727,7 @@
call CopySpeciesToTemp
ld hl, wPartyMonNicknames
call CopyNicknameToTemp
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
call CopyOTNameToTemp
ld hl, wPartyMon1
ld bc, PARTYMON_STRUCT_LENGTH
@@ -1753,7 +1753,7 @@
call CopyNicknameToTemp
pop hl
push hl
- ld bc, sBoxMonOT - sBox
+ ld bc, sBoxMonOTs - sBox
add hl, bc
call CopyOTNameToTemp
pop hl
@@ -1772,7 +1772,7 @@
ld [wCurPartyMon], a
ld hl, wPartyMonNicknames
ld a, [wCurPartyMon]
- call GetNick
+ call GetNickname
ld a, PC_DEPOSIT
ld [wPokemonWithdrawDepositParameter], a
predef SendGetMonIntoFromBox
@@ -1826,7 +1826,7 @@
call OpenSRAM
ld a, [wCurPartyMon]
ld hl, sBoxMonNicknames
- call GetNick
+ call GetNickname
call CloseSRAM
xor a
ld [wPokemonWithdrawDepositParameter], a
@@ -2051,7 +2051,7 @@
call CopySpeciesToTemp
ld hl, sBoxMonNicknames
call CopyNicknameToTemp
- ld hl, sBoxMonOT
+ ld hl, sBoxMonOTs
call CopyOTNameToTemp
ld hl, sBoxMons
ld bc, BOXMON_STRUCT_LENGTH
@@ -2084,7 +2084,7 @@
call CopySpeciesToTemp
ld hl, wPartyMonNicknames
call CopyNicknameToTemp
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
call CopyOTNameToTemp
ld hl, wPartyMon1Species
ld bc, PARTYMON_STRUCT_LENGTH
@@ -2115,7 +2115,7 @@
ld bc, MON_NAME_LENGTH
ld a, [wCurPartyMon]
call AddNTimes
- ld de, wBufferMonNick
+ ld de, wBufferMonNickname
ld bc, MON_NAME_LENGTH
call CopyBytes
ret
--- a/engine/pokemon/breeding.asm
+++ b/engine/pokemon/breeding.asm
@@ -303,7 +303,7 @@
ld a, [wPlayerID + 1]
ld [hl], a
ld a, [wCurPartyMon]
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
ld bc, NAME_LENGTH
call AddNTimes
ld d, h
@@ -870,7 +870,7 @@
bit DAYCARELADY_HAS_MON_F, a
jr z, DayCareMonCursor
call PromptButton
- ld hl, wBreedMon2Nick
+ ld hl, wBreedMon2Nickname
call DayCareMonCompatibilityText
jp PrintText
@@ -883,7 +883,7 @@
bit DAYCAREMAN_HAS_MON_F, a
jr z, DayCareMonCursor
call PromptButton
- ld hl, wBreedMon1Nick
+ ld hl, wBreedMon1Nickname
call DayCareMonCompatibilityText
jp PrintText
--- a/engine/pokemon/caught_data.asm
+++ b/engine/pokemon/caught_data.asm
@@ -31,7 +31,7 @@
call CopyBytes
ld a, [wPartyCount]
dec a
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
call SkipNames
ld d, h
ld e, l
--- a/engine/pokemon/correct_party_errors.asm
+++ b/engine/pokemon/correct_party_errors.asm
@@ -137,7 +137,7 @@
dec b
jr nz, .loop3
- ld de, wPartyMonOT
+ ld de, wPartyMonOTs
ld a, [wPartyCount]
ld b, a
ld c, 0
--- a/engine/pokemon/european_mail.asm
+++ b/engine/pokemon/european_mail.asm
@@ -5,7 +5,7 @@
; return 4 if Spanish
; return 0 if none of the above
ld c, $0
- ld hl, sPartyMon1MailAuthorNationality - sPartyMon1Mail
+ ld hl, sPartyMon1MailNationality - sPartyMon1Mail
add hl, de
ld a, [hli]
cp "E"
--- a/engine/pokemon/evolve.asm
+++ b/engine/pokemon/evolve.asm
@@ -202,7 +202,7 @@
ld [wEvolutionNewSpecies], a
ld a, [wCurPartyMon]
ld hl, wPartyMonNicknames
- call GetNick
+ call GetNickname
call CopyName1
ld hl, EvolvingText
call PrintText
--- a/engine/pokemon/learn.asm
+++ b/engine/pokemon/learn.asm
@@ -2,7 +2,7 @@
call LoadTilemapToTempTilemap
ld a, [wCurPartyMon]
ld hl, wPartyMonNicknames
- call GetNick
+ call GetNickname
ld hl, wStringBuffer1
ld de, wMonOrItemNameBuffer
ld bc, MON_NAME_LENGTH
--- a/engine/pokemon/mail.asm
+++ b/engine/pokemon/mail.asm
@@ -213,7 +213,7 @@
call CopyBytes
pop af
push af
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
ld bc, NAME_LENGTH
call AddNTimes
ld bc, NAME_LENGTH - 1
--- a/engine/pokemon/mon_menu.asm
+++ b/engine/pokemon/mon_menu.asm
@@ -109,7 +109,7 @@
lb bc, 2, 18
call ClearBox
farcall MonSubmenu
- call GetCurNick
+ call GetCurNickname
ld a, [wMenuSelection]
ld hl, .Actions
ld de, 3
@@ -210,7 +210,7 @@
call ExitMenu
jr c, .cancel
- call GetCurNick
+ call GetCurNickname
ld hl, wStringBuffer1
ld de, wMonOrItemNameBuffer
ld bc, MON_NAME_LENGTH
@@ -529,7 +529,7 @@
jr nc, .BagIsFull
call GetPartyItemLocation
ld [hl], $0
- call GetCurNick
+ call GetCurNickname
ld hl, .MailDetachedText
call MenuTextboxBackup
jr .done
@@ -1119,7 +1119,7 @@
ld [wMonType], a
ld hl, wPartyMonNicknames
ld a, [wCurPartyMon]
- call GetNick
+ call GetNickname
hlcoord 5, 1
call PlaceString
push bc
--- a/engine/pokemon/mon_stats.asm
+++ b/engine/pokemon/mon_stats.asm
@@ -343,7 +343,7 @@
push hl
ld hl, wPartyMonNicknames
ld a, [wCurPartyMon]
- call GetNick
+ call GetNickname
pop hl
call PlaceString
call CopyMonToTempMon
--- a/engine/pokemon/move_mon.asm
+++ b/engine/pokemon/move_mon.asm
@@ -34,11 +34,11 @@
ld a, -1
ld [de], a
; Now let's load the OT name.
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
ld a, [wMonType]
and $f
jr z, .loadOTname
- ld hl, wOTPartyMonOT
+ ld hl, wOTPartyMonOTs
.loadOTname
ldh a, [hMoveMon] ; Restore index from backup
@@ -419,13 +419,13 @@
ld hl, wTempMonSpecies
call CopyBytes
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
ld a, [wPartyCount]
dec a
call SkipNames
ld d, h
ld e, l
- ld hl, wOTPartyMonOT
+ ld hl, wOTPartyMonOTs
ld a, [wCurPartyMon]
call SkipNames
ld bc, NAME_LENGTH
@@ -565,10 +565,10 @@
ld de, wBreedMon1OT
jr z, .okay5
dec a
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
ld a, [wPartyCount]
jr nz, .okay6
- ld hl, sBoxMonOT
+ ld hl, sBoxMonOTs
ld a, [sBoxCount]
.okay6
@@ -578,7 +578,7 @@
ld e, l
.okay5
- ld hl, sBoxMonOT
+ ld hl, sBoxMonOTs
ld a, [wPokemonWithdrawDepositParameter]
and a
jr z, .okay7
@@ -585,7 +585,7 @@
ld hl, wBreedMon1OT
cp DAY_CARE_WITHDRAW
jr z, .okay8
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
.okay7
ld a, [wCurPartyMon]
@@ -596,7 +596,7 @@
call CopyBytes
ld a, [wPokemonWithdrawDepositParameter]
cp DAY_CARE_DEPOSIT
- ld de, wBreedMon1Nick
+ ld de, wBreedMon1Nickname
jr z, .okay9
dec a
ld hl, wPartyMonNicknames
@@ -616,7 +616,7 @@
ld a, [wPokemonWithdrawDepositParameter]
and a
jr z, .okay11
- ld hl, wBreedMon1Nick
+ ld hl, wBreedMon1Nickname
cp DAY_CARE_WITHDRAW
jr z, .okay12
ld hl, wPartyMonNicknames
@@ -819,10 +819,10 @@
ld a, [wPokemonWithdrawDepositParameter]
and a
ld a, [wBreedMon1Species]
- ld de, wBreedMon1Nick
+ ld de, wBreedMon1Nickname
jr z, .okay
ld a, [wBreedMon2Species]
- ld de, wBreedMon2Nick
+ ld de, wBreedMon2Nickname
.okay
ld [hli], a
@@ -839,7 +839,7 @@
pop de
call CopyBytes
push hl
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
ld a, [wPartyCount]
dec a
call SkipNames
@@ -909,7 +909,7 @@
ret
DepositMonWithDayCareMan:
- ld de, wBreedMon1Nick
+ ld de, wBreedMon1Nickname
call DepositBreedmon
xor a ; REMOVE_PARTY
ld [wPokemonWithdrawDepositParameter], a
@@ -916,7 +916,7 @@
jp RemoveMonFromPartyOrBox
DepositMonWithDayCareLady:
- ld de, wBreedMon2Nick
+ ld de, wBreedMon2Nickname
call DepositBreedmon
xor a ; REMOVE_PARTY
ld [wPokemonWithdrawDepositParameter], a
@@ -928,7 +928,7 @@
call SkipNames
call CopyBytes
ld a, [wCurPartyMon]
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
call SkipNames
call CopyBytes
ld a, [wCurPartyMon]
@@ -967,7 +967,7 @@
call ShiftBoxMon
ld hl, wPlayerName
- ld de, sBoxMonOT
+ ld de, sBoxMonOTs
ld bc, NAME_LENGTH
call CopyBytes
@@ -1071,7 +1071,7 @@
ret
ShiftBoxMon:
- ld hl, sBoxMonOT
+ ld hl, sBoxMonOTs
ld bc, NAME_LENGTH
call .shift
@@ -1246,12 +1246,12 @@
ld [hli], a
inc a
jr nz, .loop
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
ld d, PARTY_LENGTH - 1
ld a, [wPokemonWithdrawDepositParameter]
and a
jr z, .party
- ld hl, sBoxMonOT
+ ld hl, sBoxMonOTs
ld d, MONS_PER_BOX - 1
.party
@@ -1296,13 +1296,13 @@
jr z, .party5
ld bc, BOXMON_STRUCT_LENGTH
add hl, bc
- ld bc, sBoxMonOT
+ ld bc, sBoxMonOTs
jr .copy
.party5
ld bc, PARTYMON_STRUCT_LENGTH
add hl, bc
- ld bc, wPartyMonOT
+ ld bc, wPartyMonOTs
.copy
call CopyDataUntil
; Shift the nicknames
@@ -1705,7 +1705,7 @@
push hl
ld a, [wCurPartyMon]
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
call SkipNames
ld d, h
ld e, l
@@ -1734,9 +1734,9 @@
jr .skip_nickname
.send_to_box
- ld a, BANK(sBoxMonOT)
+ ld a, BANK(sBoxMonOTs)
call OpenSRAM
- ld de, sBoxMonOT
+ ld de, sBoxMonOTs
.loop
ld a, [wScriptBank]
call GetFarByte
--- a/engine/pokemon/move_mon_wo_mail.asm
+++ b/engine/pokemon/move_mon_wo_mail.asm
@@ -8,12 +8,12 @@
ld [wNextBoxOrPartyIndex], a
ld hl, sBoxMonNicknames
ld bc, MON_NAME_LENGTH
- ld de, wBufferMonNick
+ ld de, wBufferMonNickname
call InsertDataIntoBoxOrParty
ld a, [sBoxCount]
dec a
ld [wNextBoxOrPartyIndex], a
- ld hl, sBoxMonOT
+ ld hl, sBoxMonOTs
ld bc, NAME_LENGTH
ld de, wBufferMonOT
call InsertDataIntoBoxOrParty
@@ -45,12 +45,12 @@
ld [wNextBoxOrPartyIndex], a
ld hl, wPartyMonNicknames
ld bc, MON_NAME_LENGTH
- ld de, wBufferMonNick
+ ld de, wBufferMonNickname
call InsertDataIntoBoxOrParty
ld a, [wPartyCount]
dec a
ld [wNextBoxOrPartyIndex], a
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
ld bc, NAME_LENGTH
ld de, wBufferMonOT
call InsertDataIntoBoxOrParty
--- a/engine/pokemon/party_menu.asm
+++ b/engine/pokemon/party_menu.asm
@@ -91,7 +91,7 @@
push hl
ld hl, wPartyMonNicknames
ld a, b
- call GetNick
+ call GetNickname
pop hl
call PlaceString
pop hl
@@ -773,7 +773,7 @@
PrintPartyMenuActionText:
ld a, [wCurPartyMon]
ld hl, wPartyMonNicknames
- call GetNick
+ call GetNickname
ld a, [wPartyMenuActionText]
and $f
ld hl, .MenuActionTexts
--- a/engine/pokemon/search.asm
+++ b/engine/pokemon/search.asm
@@ -58,7 +58,7 @@
ld d, a
ld e, 0
ld hl, wPartyMon1Species
- ld bc, wPartyMonOT
+ ld bc, wPartyMonOTs
; Run CheckOwnMon on each Pokémon in the party.
.partymon
@@ -82,7 +82,7 @@
ld d, a
ld hl, sBoxMon1Species
- ld bc, sBoxMonOT
+ ld bc, sBoxMonOTs
.openboxmon
call CheckOwnMon
jr nc, .loop
@@ -138,7 +138,7 @@
ld e, l
pop hl
push de
- ld de, sBoxMonOT - sBoxCount
+ ld de, sBoxMonOTs - sBoxCount
add hl, de
ld b, h
ld c, l
--- a/engine/pokemon/stats_screen.asm
+++ b/engine/pokemon/stats_screen.asm
@@ -430,7 +430,7 @@
hlcoord 14, 0
call PrintLevel
ld hl, .NicknamePointers
- call GetNicknamePointer
+ call GetNicknamenamePointer
call CopyNickname
hlcoord 8, 2
call PlaceString
@@ -481,7 +481,7 @@
dw wPartyMonNicknames
dw wOTPartyMonNicknames
dw sBoxMonNicknames
- dw wBufferMonNick
+ dw wBufferMonNickname
StatsScreen_PlaceVerticalDivider: ; unreferenced
; The Japanese stats screen has a vertical divider.
@@ -789,7 +789,7 @@
ld de, wTempMonID
call PrintNum
ld hl, .OTNamePointers
- call GetNicknamePointer
+ call GetNicknamenamePointer
call CopyNickname
farcall CorrectNickErrors
hlcoord 2, 13
@@ -810,9 +810,9 @@
ret
.OTNamePointers:
- dw wPartyMonOT
- dw wOTPartyMonOT
- dw sBoxMonOT
+ dw wPartyMonOTs
+ dw wOTPartyMonOTs
+ dw sBoxMonOTs
dw wBufferMonOT
IDNoString:
@@ -1157,7 +1157,7 @@
pop de
ret
-GetNicknamePointer:
+GetNicknamenamePointer:
ld a, [wMonType]
add a
ld c, a
--- a/engine/pokemon/switchpartymons.asm
+++ b/engine/pokemon/switchpartymons.asm
@@ -81,12 +81,12 @@
ld bc, PARTYMON_STRUCT_LENGTH
call CopyBytes
ld a, [wSwitchMonTo]
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
call SkipNames
push hl
call .CopyNameToSwitchMonBuffer
ld a, [wSwitchMonFrom]
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
call SkipNames
pop de
push hl
--- a/engine/printer/print_party.asm
+++ b/engine/printer/print_party.asm
@@ -192,7 +192,7 @@
hlcoord 1, 9
ld de, PrintParty_OTString
call PlaceString
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
call GetCurPartyMonName
hlcoord 4, 9
call PlaceString
--- a/home/names.asm
+++ b/home/names.asm
@@ -4,8 +4,8 @@
dba MoveNames ; MOVE_NAME
dba NULL ; DUMMY_NAME
dba ItemNames ; ITEM_NAME
- dbw 0, wPartyMonOT ; PARTY_OT_NAME
- dbw 0, wOTPartyMonOT ; ENEMY_OT_NAME
+ dbw 0, wPartyMonOTs ; PARTY_OT_NAME
+ dbw 0, wOTPartyMonOTs ; ENEMY_OT_NAME
dba TrainerClassNames ; TRAINER_NAME
dbw 4, MoveDescriptions ; MOVE_DESC_NAME_BROKEN (wrong bank)
--- a/home/pokemon.asm
+++ b/home/pokemon.asm
@@ -298,11 +298,11 @@
pop bc
ret
-GetCurNick::
+GetCurNickname::
ld a, [wCurPartyMon]
ld hl, wPartyMonNicknames
-GetNick::
+GetNickname::
; Get nickname a from list hl.
push hl
--- a/home/text.asm
+++ b/home/text.asm
@@ -336,7 +336,7 @@
and a
jr nz, .enemy
- ld de, wBattleMonNick
+ ld de, wBattleMonNickname
jr PlaceCommandCharacter
.enemy
@@ -344,7 +344,7 @@
call PlaceString
ld h, b
ld l, c
- ld de, wEnemyMonNick
+ ld de, wEnemyMonNickname
jr PlaceCommandCharacter
PlaceEnemysName::
@@ -1000,8 +1000,8 @@
; 2: wStringBuffer5
; 3: wStringBuffer2
; 4: wStringBuffer1
-; 5: wEnemyMonNick
-; 6: wBattleMonNick
+; 5: wEnemyMonNickname
+; 6: wBattleMonNickname
ld a, [hli]
push hl
ld e, a
--- a/macros/wram.asm
+++ b/macros/wram.asm
@@ -54,7 +54,7 @@
\1Type2:: db
\1CatchRate:: db
\1Moves:: ds NUM_MOVES
-\1OTID:: dw
+\1ID:: dw
\1Exp:: ds 3
\1HPExp:: dw
\1AttackExp:: dw
@@ -100,13 +100,13 @@
ENDM
box: MACRO
-\1Count:: db
-\1Species:: ds MONS_PER_BOX + 1
+\1Count:: db
+\1Species:: ds MONS_PER_BOX + 1
\1Mons::
-\1Mon1:: box_struct \1Mon1
-\1Mon2:: ds BOXMON_STRUCT_LENGTH * (MONS_PER_BOX - 1)
-\1MonOT:: ds NAME_LENGTH * MONS_PER_BOX
-\1MonNicknames:: ds MON_NAME_LENGTH * MONS_PER_BOX
+\1Mon1:: box_struct \1Mon1
+\1Mon2:: ds BOXMON_STRUCT_LENGTH * (MONS_PER_BOX - 1)
+\1MonOTs:: ds NAME_LENGTH * MONS_PER_BOX
+\1MonNicknames:: ds MON_NAME_LENGTH * MONS_PER_BOX
\1MonNicknamesEnd::
\1End::
ds 2 ; padding
@@ -154,7 +154,7 @@
\1VibratoRate:: db ; hi:frames for each alt lo:frames to the next alt
\1PitchSlideTarget:: dw ; frequency endpoint for pitch slide
\1PitchSlideAmount:: db
-\1PitchSlideAmountFraction:: db
+\1PitchSlideAmountFraction:: db
\1Field25:: db
ds 1
\1PitchOffset:: dw
@@ -169,29 +169,29 @@
ENDM
battle_tower_struct: MACRO
-\1Name:: ds NAME_LENGTH - 1
-\1TrainerClass:: ds 1
-\1Mon1:: party_struct \1Mon1
-\1Mon1Name:: ds MON_NAME_LENGTH
+\1Name:: ds NAME_LENGTH - 1
+\1TrainerClass:: db
+\1Mon1:: party_struct \1Mon1
+\1Mon1Name:: ds MON_NAME_LENGTH
\1Mon1NameEnd::
-\1Mon2:: party_struct \1Mon2
-\1Mon2Name:: ds MON_NAME_LENGTH
+\1Mon2:: party_struct \1Mon2
+\1Mon2Name:: ds MON_NAME_LENGTH
\1Mon2NameEnd::
-\1Mon3:: party_struct \1Mon3
-\1Mon3Name:: ds MON_NAME_LENGTH
+\1Mon3:: party_struct \1Mon3
+\1Mon3Name:: ds MON_NAME_LENGTH
\1Mon3NameEnd::
-\1TrainerData:: ds BATTLETOWER_TRAINERDATALENGTH
+\1TrainerData:: ds BATTLETOWER_TRAINERDATALENGTH
\1TrainerEnd::
ENDM
mailmsg: MACRO
-\1Message:: ds MAIL_MSG_LENGTH
-\1MessageEnd:: ds 1
-\1Author:: ds PLAYER_NAME_LENGTH
-\1AuthorNationality:: ds 2
-\1AuthorID:: dw
-\1Species:: db
-\1Type:: db
+\1Message:: ds MAIL_MSG_LENGTH
+\1MessageEnd:: db
+\1Author:: ds PLAYER_NAME_LENGTH
+\1Nationality:: dw
+\1AuthorID:: dw
+\1Species:: db
+\1Type:: db
\1End::
ENDM
@@ -364,24 +364,23 @@
ENDM
battle_anim_struct: MACRO
-; Placeholder until we can figure out what it all means
-\1Index:: db
-\1OAMFlags:: db
-\1Field02:: ds 1
-\1FramesetID:: db
-\1Function:: db
-\1Palette:: db
-\1TileID:: db
-\1XCoord:: db
-\1YCoord:: db
-\1XOffset:: db
-\1YOffset:: db
-\1Param:: db
-\1Duration:: db
-\1Frame:: db
-\1JumptableIndex:: db
-\1Var1:: db
-\1Var2:: db
+\1Index:: db
+\1OAMFlags:: db
+\1FixY:: db
+\1FramesetID:: db
+\1Function:: db
+\1Palette:: db
+\1TileID:: db
+\1XCoord:: db
+\1YCoord:: db
+\1XOffset:: db
+\1YOffset:: db
+\1Param:: db
+\1Duration:: db
+\1Frame:: db
+\1JumptableIndex:: db
+\1Var1:: db
+\1Var2:: db
ds 7
ENDM
--- a/mobile/mobile_12_2.asm
+++ b/mobile/mobile_12_2.asm
@@ -9,7 +9,7 @@
ld d, a
ld e, 0
ld hl, wPartyMon1Species
- ld bc, wPartyMonOT
+ ld bc, wPartyMonOTs
.asm_4a851
call .CheckMatch
ret c
@@ -27,7 +27,7 @@
jr z, .asm_4a888
ld d, a
ld hl, sBoxMon1Species
- ld bc, sBoxMonOT
+ ld bc, sBoxMonOTs
.asm_4a873
call .CheckMatch
jr nc, .asm_4a87c
@@ -72,7 +72,7 @@
ld e, l
pop hl
push de
- ld de, sBoxMonOT - sBoxCount
+ ld de, sBoxMonOTs - sBoxCount
add hl, de
ld b, h
ld c, l
@@ -264,7 +264,7 @@
Function4a9d7:
ld a, [wd002]
ld hl, wPartyMonNicknames
- call GetNick
+ call GetNickname
ld h, d
ld l, e
ld de, wMobileParticipant1Nickname
@@ -272,7 +272,7 @@
call CopyBytes
ld a, [wd003]
ld hl, wPartyMonNicknames
- call GetNick
+ call GetNickname
ld h, d
ld l, e
ld de, wMobileParticipant2Nickname
@@ -280,7 +280,7 @@
call CopyBytes
ld a, [wd004]
ld hl, wPartyMonNicknames
- call GetNick
+ call GetNickname
ld h, d
ld l, e
ld de, wMobileParticipant3Nickname
--- a/mobile/mobile_40.asm
+++ b/mobile/mobile_40.asm
@@ -2388,7 +2388,7 @@
dbwww $80, wPartyCount, 1 + PARTY_LENGTH + 1, wOTPartyCount
dbwww $80, wPlayerID, 2, wOTPlayerID
dbwww $80, wPartyMons, PARTYMON_STRUCT_LENGTH * PARTY_LENGTH, wOTPartyMons
- dbwww $80, wPartyMonOT, NAME_LENGTH * PARTY_LENGTH, wOTPartyMonOT
+ dbwww $80, wPartyMonOTs, NAME_LENGTH * PARTY_LENGTH, wOTPartyMonOTs
dbwww $80, wPartyMonNicknames, MON_NAME_LENGTH * PARTY_LENGTH, wOTPartyMonNicknames
db -1
@@ -2411,7 +2411,7 @@
dbwww $80, wOTPlayerName, NAME_LENGTH, NULL
dbwww $80, wOTPlayerID, 2, NULL
dbwww $80, wOTPartyMonNicknames, MON_NAME_LENGTH * PARTY_LENGTH, NULL
- dbwww $80, wOTPartyMonOT, NAME_LENGTH * PARTY_LENGTH, NULL
+ dbwww $80, wOTPartyMonOTs, NAME_LENGTH * PARTY_LENGTH, NULL
dbwww $80, wOTPartyMons, PARTYMON_STRUCT_LENGTH * PARTY_LENGTH, NULL
db -1
@@ -2454,7 +2454,7 @@
ld de, wc608 + 13
ld bc, NAME_LENGTH
call .CopyAllFromOT
- ld hl, wOTPartyMonOT
+ ld hl, wOTPartyMonOTs
ld de, wOTClassName + 1
ld bc, NAME_LENGTH
call .CopyAllFromOT
@@ -2510,7 +2510,7 @@
ld de, wPartyMon1Species
call .CopyPartyStruct
ld hl, wPlayerMonSelection
- ld de, wPartyMonOT
+ ld de, wPartyMonOTs
call .CopyName
ld hl, wPlayerMonSelection
ld de, wPartyMonNicknames
@@ -2522,7 +2522,7 @@
ld de, wOTPartyMon1Species
call .CopyPartyStruct
ld hl, wOTMonSelection
- ld de, wOTPartyMonOT
+ ld de, wOTPartyMonOTs
call .CopyName
ld hl, wOTMonSelection
ld de, wOTPartyMonNicknames
@@ -6004,7 +6004,7 @@
ld [wPlayerTrademonSpecies], a
ld a, [wcd4c]
dec a
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
call SkipNames
ld de, wPlayerTrademonOTName
ld bc, NAME_LENGTH
@@ -6049,7 +6049,7 @@
ld [wOTTrademonSpecies], a
ld a, [wcd4d]
dec a
- ld hl, wOTPartyMonOT
+ ld hl, wOTPartyMonOTs
call SkipNames
ld de, wOTTrademonOTName
ld bc, NAME_LENGTH
@@ -6238,8 +6238,8 @@
ret
Function102c2e:
- ld hl, wPartyMonOT
- ld de, wOTPartyMonOT
+ ld hl, wPartyMonOTs
+ ld de, wOTPartyMonOTs
ld bc, 11
call Function102c71
ret
--- a/mobile/mobile_46.asm
+++ b/mobile/mobile_46.asm
@@ -6900,7 +6900,7 @@
ld [hl], a
pop bc
ld de, NAME_LENGTH
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
pop af
push af
.loop4
@@ -7191,9 +7191,9 @@
ld [wMobileMonStructPointer + 1], a
ld a, LOW($c63d) ; OT
- ld [wMobileMonOTNamePointer], a
+ ld [wMobileMonOTPointer], a
ld a, HIGH($c63d)
- ld [wMobileMonOTNamePointer + 1], a
+ ld [wMobileMonOTPointer + 1], a
ld a, LOW($c642) ; Nickname
ld [wMobileMonNicknamePointer], a
@@ -7493,9 +7493,9 @@
ld [wMobileMonStructPointer + 1], a
ld a, LOW($c641)
- ld [wMobileMonOTNamePointer], a
+ ld [wMobileMonOTPointer], a
ld a, HIGH($c641)
- ld [wMobileMonOTNamePointer + 1], a
+ ld [wMobileMonOTPointer + 1], a
ld a, LOW($c646)
ld [wMobileMonNicknamePointer], a
@@ -7553,7 +7553,7 @@
ld bc, PARTYMON_STRUCT_LENGTH
call CopyBytes
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
ld bc, NAME_LENGTH
ld a, [wMobileMonSpecies]
.loop3
@@ -7563,9 +7563,9 @@
jr nz, .loop3
ld e, l
ld d, h
- ld a, [wMobileMonOTNamePointer]
+ ld a, [wMobileMonOTPointer]
ld l, a
- ld a, [wMobileMonOTNamePointer + 1]
+ ld a, [wMobileMonOTPointer + 1]
ld h, a
ld bc, MON_NAME_LENGTH - 1
call CopyBytes
--- a/mobile/mobile_5f.asm
+++ b/mobile/mobile_5f.asm
@@ -2299,7 +2299,7 @@
push hl
ld a, [wPartyCount]
dec a
- ld hl, wPartyMonOT
+ ld hl, wPartyMonOTs
call SkipNames
ld d, h
ld e, l
@@ -2486,7 +2486,7 @@
jr z, .asm_17e08e
push bc
ld bc, $6
- ld de, sBoxMonOT
+ ld de, sBoxMonOTs
call CopyBytes
ld a, [hli]
ld b, a
--- a/wram.asm
+++ b/wram.asm
@@ -404,8 +404,8 @@
wEnemyMoveStruct:: move_struct wEnemyMoveStruct
wPlayerMoveStruct:: move_struct wPlayerMoveStruct
-wEnemyMonNick:: ds MON_NAME_LENGTH
-wBattleMonNick:: ds MON_NAME_LENGTH
+wEnemyMonNickname:: ds MON_NAME_LENGTH
+wBattleMonNickname:: ds MON_NAME_LENGTH
wBattleMon:: battle_struct wBattleMon
@@ -718,7 +718,7 @@
; odd egg
wOddEgg:: party_struct wOddEgg
wOddEggName:: ds MON_NAME_LENGTH
-wOddEggOTName:: ds NAME_LENGTH
+wOddEggOT:: ds NAME_LENGTH
NEXTU
; debug mon color picker
@@ -994,9 +994,27 @@
wLinkPlayerPartyMon5:: party_struct wLinkPlayerPartyMon5
wLinkPlayerPartyMon6:: party_struct wLinkPlayerPartyMon6
assert_table_length PARTY_LENGTH
-wLinkPlayerPartyMonOTNames:: ds NAME_LENGTH * PARTY_LENGTH
-wLinkPlayerPartyMonNicks:: ds MON_NAME_LENGTH * PARTY_LENGTH
+wLinkPlayerPartyMonOTs::
+ table_width NAME_LENGTH, wLinkPlayerPartyMonOTs
+wLinkPlayerPartyMon1OT:: ds NAME_LENGTH
+wLinkPlayerPartyMon2OT:: ds NAME_LENGTH
+wLinkPlayerPartyMon3OT:: ds NAME_LENGTH
+wLinkPlayerPartyMon4OT:: ds NAME_LENGTH
+wLinkPlayerPartyMon5OT:: ds NAME_LENGTH
+wLinkPlayerPartyMon6OT:: ds NAME_LENGTH
+ assert_table_length PARTY_LENGTH
+
+wLinkPlayerPartyMonNicknames::
+ table_width MON_NAME_LENGTH, wLinkPlayerPartyMonNicknames
+wLinkPlayerPartyMon1Nickname:: ds MON_NAME_LENGTH
+wLinkPlayerPartyMon2Nickname:: ds MON_NAME_LENGTH
+wLinkPlayerPartyMon3Nickname:: ds MON_NAME_LENGTH
+wLinkPlayerPartyMon4Nickname:: ds MON_NAME_LENGTH
+wLinkPlayerPartyMon5Nickname:: ds MON_NAME_LENGTH
+wLinkPlayerPartyMon6Nickname:: ds MON_NAME_LENGTH
+ assert_table_length PARTY_LENGTH
+
NEXTU
; time capsule party data
wTimeCapsulePlayerData::
@@ -1008,9 +1026,27 @@
wTimeCapsulePartyMon5:: red_party_struct wTimeCapsulePartyMon5
wTimeCapsulePartyMon6:: red_party_struct wTimeCapsulePartyMon6
assert_table_length PARTY_LENGTH
-wTimeCapsulePartyMonOTNames:: ds NAME_LENGTH * PARTY_LENGTH
-wTimeCapsulePartyMonNicks:: ds MON_NAME_LENGTH * PARTY_LENGTH
+wTimeCapsulePartyMonOTs::
+ table_width NAME_LENGTH, wTimeCapsulePartyMonOTs
+wTimeCapsulePartyMon1OT:: ds NAME_LENGTH
+wTimeCapsulePartyMon2OT:: ds NAME_LENGTH
+wTimeCapsulePartyMon3OT:: ds NAME_LENGTH
+wTimeCapsulePartyMon4OT:: ds NAME_LENGTH
+wTimeCapsulePartyMon5OT:: ds NAME_LENGTH
+wTimeCapsulePartyMon6OT:: ds NAME_LENGTH
+ assert_table_length PARTY_LENGTH
+
+wTimeCapsulePartyMonNicknames::
+ table_width MON_NAME_LENGTH, wTimeCapsulePartyMonNicknames
+wTimeCapsulePartyMon1Nickname:: ds MON_NAME_LENGTH
+wTimeCapsulePartyMon2Nickname:: ds MON_NAME_LENGTH
+wTimeCapsulePartyMon3Nickname:: ds MON_NAME_LENGTH
+wTimeCapsulePartyMon4Nickname:: ds MON_NAME_LENGTH
+wTimeCapsulePartyMon5Nickname:: ds MON_NAME_LENGTH
+wTimeCapsulePartyMon6Nickname:: ds MON_NAME_LENGTH
+ assert_table_length PARTY_LENGTH
+
NEXTU
; link patch lists
wLinkPatchList1:: ds SERIAL_PATCH_LIST_LENGTH
@@ -1021,8 +1057,17 @@
; link data prep
ds 1000
wCurLinkOTPartyMonTypePointer:: dw
-wLinkOTPartyMonTypes:: ds 2 * PARTY_LENGTH
+wLinkOTPartyMonTypes::
+ table_width 2, wLinkOTPartyMonTypes
+wLinkOTPartyMon1Type:: dw
+wLinkOTPartyMon2Type:: dw
+wLinkOTPartyMon3Type:: dw
+wLinkOTPartyMon4Type:: dw
+wLinkOTPartyMon5Type:: dw
+wLinkOTPartyMon6Type:: dw
+ assert_table_length PARTY_LENGTH
+
NEXTU
; link mail data
ds 500
@@ -1199,7 +1244,7 @@
; mobile data
wMobileMonSpeciesPointer:: dw
wMobileMonStructPointer:: dw
-wMobileMonOTNamePointer:: dw
+wMobileMonOTPointer:: dw
wMobileMonNicknamePointer:: dw
wMobileMonMailPointer:: dw
@@ -1219,7 +1264,9 @@
wMobileMonSpecies::
wcd2a:: db
-wTempOddEggNickname:: ; ds 11
+UNION
+wTempOddEggNickname:: ds MON_NAME_LENGTH
+NEXTU
wcd2b:: ds 1
wcd2c:: ds 1
wcd2d:: ds 1
@@ -1231,6 +1278,7 @@
wcd33:: ds 1
wcd34:: ds 1
wcd35:: ds 1
+ENDU
; current time for link/mobile?
wcd36:: db ; hours
@@ -1710,7 +1758,7 @@
UNION
; mon buffer
-wBufferMonNick:: ds MON_NAME_LENGTH
+wBufferMonNickname:: ds MON_NAME_LENGTH
wBufferMonOT:: ds NAME_LENGTH
wBufferMon:: party_struct wBufferMon
ds 8
@@ -1723,8 +1771,8 @@
wSeerNickname:: ds MON_NAME_LENGTH
wSeerCaughtLocation:: ds 17
wSeerTimeOfDay:: ds NAME_LENGTH
-wSeerOTName:: ds NAME_LENGTH
-wSeerOTNameGrammar:: db
+wSeerOT:: ds NAME_LENGTH
+wSeerOTGrammar:: db
wSeerCaughtLevelString:: ds 4
wSeerCaughtLevel:: db
wSeerCaughtData:: db
@@ -1872,7 +1920,7 @@
; trade
wCurTradePartyMon:: db
wCurOTTradePartyMon:: db
-wBufferTrademonNick:: ds MON_NAME_LENGTH
+wBufferTrademonNickname:: ds MON_NAME_LENGTH
NEXTU
; link battle record data
@@ -2576,10 +2624,26 @@
wOTPartyMon5:: party_struct wOTPartyMon5
wOTPartyMon6:: party_struct wOTPartyMon6
assert_table_length PARTY_LENGTH
-wOTPartyMonsEnd::
-wOTPartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH
-wOTPartyMonNicknames:: ds MON_NAME_LENGTH * PARTY_LENGTH
+wOTPartyMonOTs::
+ table_width NAME_LENGTH, wOTPartyMonOTs
+wOTPartyMon1OT:: ds NAME_LENGTH
+wOTPartyMon2OT:: ds NAME_LENGTH
+wOTPartyMon3OT:: ds NAME_LENGTH
+wOTPartyMon4OT:: ds NAME_LENGTH
+wOTPartyMon5OT:: ds NAME_LENGTH
+wOTPartyMon6OT:: ds NAME_LENGTH
+ assert_table_length PARTY_LENGTH
+
+wOTPartyMonNicknames::
+ table_width MON_NAME_LENGTH, wOTPartyMonNicknames
+wOTPartyMon1Nickname:: ds MON_NAME_LENGTH
+wOTPartyMon2Nickname:: ds MON_NAME_LENGTH
+wOTPartyMon3Nickname:: ds MON_NAME_LENGTH
+wOTPartyMon4Nickname:: ds MON_NAME_LENGTH
+wOTPartyMon5Nickname:: ds MON_NAME_LENGTH
+wOTPartyMon6Nickname:: ds MON_NAME_LENGTH
+ assert_table_length PARTY_LENGTH
wOTPartyDataEnd::
NEXTU
@@ -3142,9 +3206,25 @@
wPartyMon6:: party_struct wPartyMon6
assert_table_length PARTY_LENGTH
-wPartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH
+wPartyMonOTs::
+ table_width NAME_LENGTH, wPartyMonOTs
+wPartyMon1OT:: ds NAME_LENGTH
+wPartyMon2OT:: ds NAME_LENGTH
+wPartyMon3OT:: ds NAME_LENGTH
+wPartyMon4OT:: ds NAME_LENGTH
+wPartyMon5OT:: ds NAME_LENGTH
+wPartyMon6OT:: ds NAME_LENGTH
+ assert_table_length PARTY_LENGTH
-wPartyMonNicknames:: ds MON_NAME_LENGTH * PARTY_LENGTH
+wPartyMonNicknames::
+ table_width MON_NAME_LENGTH, wPartyMonNicknames
+wPartyMon1Nickname:: ds MON_NAME_LENGTH
+wPartyMon2Nickname:: ds MON_NAME_LENGTH
+wPartyMon3Nickname:: ds MON_NAME_LENGTH
+wPartyMon4Nickname:: ds MON_NAME_LENGTH
+wPartyMon5Nickname:: ds MON_NAME_LENGTH
+wPartyMon6Nickname:: ds MON_NAME_LENGTH
+ assert_table_length PARTY_LENGTH
wPartyMonNicknamesEnd::
ds 22
@@ -3166,9 +3246,9 @@
; bit 0: monster 1 in day-care
db
-wBreedMon1Nick:: ds MON_NAME_LENGTH
-wBreedMon1OT:: ds NAME_LENGTH
-wBreedMon1:: box_struct wBreedMon1
+wBreedMon1Nickname:: ds MON_NAME_LENGTH
+wBreedMon1OT:: ds NAME_LENGTH
+wBreedMon1:: box_struct wBreedMon1
wDayCareLady::
; bit 7: active
@@ -3182,13 +3262,13 @@
; nz: no
db
-wBreedMon2Nick:: ds MON_NAME_LENGTH
-wBreedMon2OT:: ds NAME_LENGTH
-wBreedMon2:: box_struct wBreedMon2
+wBreedMon2Nickname:: ds MON_NAME_LENGTH
+wBreedMon2OT:: ds NAME_LENGTH
+wBreedMon2:: box_struct wBreedMon2
-wEggNick:: ds MON_NAME_LENGTH
-wEggOT:: ds NAME_LENGTH
-wEggMon:: box_struct wEggMon
+wEggMonNickname:: ds MON_NAME_LENGTH
+wEggMonOT:: ds NAME_LENGTH
+wEggMon:: box_struct wEggMon
wBugContestSecondPartySpecies:: db
wContestMon:: party_struct wContestMon