aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvie <35663410+Rangi42@users.noreply.github.com>2024-07-24 12:21:59 -0400
committerGitHub <noreply@github.com>2024-07-24 12:21:59 -0400
commit6e3ab0a9e97ff14123ac65f56cb4b4ddab45b695 (patch)
tree32feac5e86fbac9eec6f40c14a19c8bd89c1b52d
parentIdentify various flag labels and bit constants (#454) (diff)
downloadpokeyellow-6e3ab0a9e97ff14123ac65f56cb4b4ddab45b695.tar.gz
pokeyellow-6e3ab0a9e97ff14123ac65f56cb4b4ddab45b695.tar.xz
pokeyellow-6e3ab0a9e97ff14123ac65f56cb4b4ddab45b695.zip
Identify wcd6d as wNameBuffer and others (#455)
-rw-r--r--data/text/text_1.asm2
-rw-r--r--data/text/text_2.asm46
-rw-r--r--data/text/text_3.asm8
-rw-r--r--data/text/text_4.asm4
-rw-r--r--data/text/text_5.asm10
-rw-r--r--data/text/text_6.asm8
-rw-r--r--data/text/text_7.asm6
-rw-r--r--engine/battle/core.asm10
-rw-r--r--engine/battle/get_trainer_name.asm4
-rw-r--r--engine/battle/misc.asm8
-rw-r--r--engine/battle/move_effects/pay_day.asm6
-rw-r--r--engine/battle/save_trainer_name.asm2
-rw-r--r--engine/events/cinnabar_lab.asm2
-rw-r--r--engine/events/heal_party.asm4
-rw-r--r--engine/events/in_game_trades.asm2
-rw-r--r--engine/items/item_effects.asm4
-rw-r--r--engine/items/town_map.asm24
-rw-r--r--engine/link/cable_club.asm2
-rw-r--r--engine/menus/league_pc.asm2
-rw-r--r--engine/menus/naming_screen.asm2
-rw-r--r--engine/menus/party_menu.asm8
-rw-r--r--engine/movie/hall_of_fame.asm4
-rw-r--r--engine/movie/oak_speech/oak_speech2.asm4
-rw-r--r--engine/movie/trade.asm2
-rw-r--r--engine/movie/trade2.asm2
-rw-r--r--engine/pokemon/add_mon.asm4
-rw-r--r--engine/pokemon/evos_moves.asm4
-rw-r--r--engine/pokemon/learn_move.asm2
-rw-r--r--home/list_menu.asm2
-rw-r--r--home/names.asm19
-rw-r--r--home/names2.asm2
-rw-r--r--home/pokemon.asm4
-rw-r--r--ram/wram.asm20
-rw-r--r--scripts/CeladonMartRoof.asm2
-rw-r--r--scripts/Route15Gate2F.asm2
-rw-r--r--scripts/Route23.asm2
-rw-r--r--scripts/Route2Gate.asm2
-rw-r--r--text/ChampionsRoom.asm2
-rw-r--r--text/CinnabarLabFossilRoom.asm4
-rw-r--r--text/Daycare.asm6
-rw-r--r--text/NameRatersHouse.asm6
-rw-r--r--text/OaksLab.asm4
-rw-r--r--text/Route23.asm8
43 files changed, 142 insertions, 129 deletions
diff --git a/data/text/text_1.asm b/data/text/text_1.asm
index 2acc6f68..538396eb 100644
--- a/data/text/text_1.asm
+++ b/data/text/text_1.asm
@@ -14,7 +14,7 @@ _CardKeyFailText::
done
_TrainerNameText::
- text_ram wcd6d
+ text_ram wNameBuffer
text ": @"
text_end
diff --git a/data/text/text_2.asm b/data/text/text_2.asm
index d4b1b7db..4362e0f2 100644
--- a/data/text/text_2.asm
+++ b/data/text/text_2.asm
@@ -10,7 +10,7 @@ _AIBattleUseItemText::
text_ram wTrainerName
text_start
line "used @"
- text_ram wcd6d
+ text_ram wNameBuffer
text_start
cont "on @"
text_ram wEnemyMonNick
@@ -36,7 +36,7 @@ _TradeSendsText::
text_ram wLinkEnemyTrainerName
text " sends"
line "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text "."
done
@@ -47,7 +47,7 @@ _TradeWavesFarewellText::
done
_TradeTransferredText::
- text_ram wcd6d
+ text_ram wNameBuffer
text " is"
line "transferred."
done
@@ -55,7 +55,7 @@ _TradeTransferredText::
_TradeTakeCareText::
text "Take good care of"
line "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text "."
done
@@ -63,7 +63,7 @@ _TradeWillTradeText::
text_ram wLinkEnemyTrainerName
text " will"
line "trade @"
- text_ram wcd6d
+ text_ram wNameBuffer
text_start
done
@@ -751,7 +751,7 @@ _VermilionGymTrashFailText::
_FoundHiddenItemText::
text "<PLAYER> found"
line "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text "!@"
text_end
@@ -1070,7 +1070,7 @@ _CantMoveText::
_MoveIsDisabledText::
text "<USER>'s"
line "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text " is"
cont "disabled!"
prompt
@@ -1205,7 +1205,7 @@ _HitXTimesText::
prompt
_GainedText::
- text_ram wcd6d
+ text_ram wNameBuffer
text " gained"
line "@"
text_end
@@ -1226,7 +1226,7 @@ _ExpPointsText::
prompt
_GrewLevelText::
- text_ram wcd6d
+ text_ram wNameBuffer
text " grew"
line "to level @"
text_decimal wCurEnemyLevel, 1, 3
@@ -1382,7 +1382,7 @@ _PartyMenuSwapMonText::
done
_PotionText::
- text_ram wcd6d
+ text_ram wNameBuffer
text_start
line "recovered by @"
text_decimal wHPBarHPDifference, 2, 3
@@ -1390,49 +1390,49 @@ _PotionText::
done
_AntidoteText::
- text_ram wcd6d
+ text_ram wNameBuffer
text " was"
line "cured of poison!"
done
_ParlyzHealText::
- text_ram wcd6d
+ text_ram wNameBuffer
text "'s"
line "rid of paralysis!"
done
_BurnHealText::
- text_ram wcd6d
+ text_ram wNameBuffer
text "'s"
line "burn was healed!"
done
_IceHealText::
- text_ram wcd6d
+ text_ram wNameBuffer
text " was"
line "defrosted!"
done
_AwakeningText::
- text_ram wcd6d
+ text_ram wNameBuffer
text_start
line "woke up!"
done
_FullHealText::
- text_ram wcd6d
+ text_ram wNameBuffer
text "'s"
line "health returned!"
done
_ReviveText::
- text_ram wcd6d
+ text_ram wNameBuffer
text_start
line "is revitalized!"
done
_RareCandyText::
- text_ram wcd6d
+ text_ram wNameBuffer
text " grew"
line "to level @"
text_decimal wCurEnemyLevel, 1, 3
@@ -1487,7 +1487,7 @@ _DepositHowManyText::
done
_ItemWasStoredText::
- text_ram wcd6d
+ text_ram wNameBuffer
text " was"
line "stored via PC."
prompt
@@ -1514,7 +1514,7 @@ _WithdrawHowManyText::
_WithdrewItemText::
text "Withdrew"
line "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text "."
prompt
@@ -1642,7 +1642,7 @@ _HereYouGoText::
_SoYouWantPrizeText::
text "So, you want"
line "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text "?"
done
@@ -1756,7 +1756,7 @@ _DoYouWantToNicknameText::
text "Do you want to"
line "give a nickname"
cont "to @"
- text_ram wcd6d
+ text_ram wNameBuffer
text "?"
done
@@ -1775,7 +1775,7 @@ _WillBeTradedText::
text_ram wNameOfPlayerMonToBeTraded
text " and"
line "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text " will"
cont "be traded."
done
diff --git a/data/text/text_3.asm b/data/text/text_3.asm
index 1d40d6b7..ba09a0f6 100644
--- a/data/text/text_3.asm
+++ b/data/text/text_3.asm
@@ -40,7 +40,7 @@ _EvolvedText::
_IntoText::
text_start
line "into @"
- text_ram wcd6d
+ text_ram wNameBuffer
text "!"
done
@@ -181,14 +181,14 @@ _MimicLearnedMoveText::
text "<USER>"
line "learned"
cont "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text "!"
prompt
_MoveWasDisabledText::
text "<TARGET>'s"
line "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text " was"
cont "disabled!"
prompt
@@ -291,7 +291,7 @@ _TransformedText::
text "<USER>"
line "transformed into"
cont "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text "!"
prompt
diff --git a/data/text/text_4.asm b/data/text/text_4.asm
index 39c7ab91..f1c73a88 100644
--- a/data/text/text_4.asm
+++ b/data/text/text_4.asm
@@ -4,7 +4,7 @@ _PokemartGreetingText::
done
_PokemonFaintedText::
- text_ram wcd6d
+ text_ram wNameBuffer
text_start
line "fainted!"
done
@@ -145,7 +145,7 @@ _ForgotAndText::
text_ram wLearnMoveMonName
text " forgot"
line "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text "!"
para "And..."
diff --git a/data/text/text_5.asm b/data/text/text_5.asm
index fb0cac66..1eee599c 100644
--- a/data/text/text_5.asm
+++ b/data/text/text_5.asm
@@ -9,13 +9,13 @@ _CableClubNPCMakingPreparationsText::
done
_UsedStrengthText::
- text_ram wcd6d
+ text_ram wNameBuffer
text " used"
line "STRENGTH.@"
text_end
_CanMoveBouldersText::
- text_ram wcd6d
+ text_ram wNameBuffer
text " can"
line "move boulders."
prompt
@@ -41,13 +41,13 @@ _WarpToLastPokemonCenterText::
done
_CannotUseTeleportNowText::
- text_ram wcd6d
+ text_ram wNameBuffer
text " can't"
line "use TELEPORT now."
prompt
_CannotFlyHereText::
- text_ram wcd6d
+ text_ram wNameBuffer
text " can't"
line "FLY here."
prompt
@@ -75,7 +75,7 @@ _CannotGetOffHereText::
_GotMonText::
text "<PLAYER> got"
line "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text "!@"
text_end
diff --git a/data/text/text_6.asm b/data/text/text_6.asm
index 194afa7b..8109b659 100644
--- a/data/text/text_6.asm
+++ b/data/text/text_6.asm
@@ -59,7 +59,7 @@ _ItemUseBallText06::
_SurfingGotOnText::
text "<PLAYER> got on"
line "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text "!"
prompt
@@ -69,7 +69,7 @@ _SurfingNoPlaceToGetOffText::
prompt
_VitaminStatRoseText::
- text_ram wcd6d
+ text_ram wNameBuffer
text "'s"
line "@"
text_ram wStringBuffer
@@ -174,7 +174,7 @@ _TeachMachineMoveText::
done
_MonCannotLearnMachineMoveText::
- text_ram wcd6d
+ text_ram wNameBuffer
text " is not"
line "compatible with"
cont "@"
@@ -220,7 +220,7 @@ _NoCyclingAllowedHereText::
_NoSurfingHereText::
text "No SURFing on"
line "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text " here!"
prompt
diff --git a/data/text/text_7.asm b/data/text/text_7.asm
index fcb27d20..54629faf 100644
--- a/data/text/text_7.asm
+++ b/data/text/text_7.asm
@@ -29,7 +29,7 @@ _GotOffBicycleText2::
_ThrewAwayItemText::
text "Threw away"
line "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text "."
prompt
@@ -46,7 +46,7 @@ _TooImportantToTossText::
prompt
_AlreadyKnowsText::
- text_ram wcd6d
+ text_ram wNameBuffer
text " knows"
line "@"
text_ram wStringBuffer
@@ -194,7 +194,7 @@ _NothingToCutText::
prompt
_UsedCutText::
- text_ram wcd6d
+ text_ram wNameBuffer
text " hacked"
line "away with CUT!"
prompt
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index ab4d1c56..ae399a01 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -2878,7 +2878,7 @@ PrintMenuItem:
add hl, bc
ld a, [hl]
and $3f
- ld [wcd6d], a
+ ld [wBattleMenuCurrentPP], a
; print TYPE/<type> and <curPP>/<maxPP>
hlcoord 1, 9
ld de, TypeText
@@ -2888,7 +2888,7 @@ PrintMenuItem:
hlcoord 5, 9
ld [hl], "/"
hlcoord 5, 11
- ld de, wcd6d
+ ld de, wBattleMenuCurrentPP
lb bc, 1, 2
call PrintNumber
hlcoord 8, 11
@@ -5631,7 +5631,7 @@ EnemyCanExecuteChargingMove:
ld a, MOVE_NAME
ld [wNameListType], a
call GetName
- ld de, wcd6d
+ ld de, wNameBuffer
call CopyToStringBuffer
EnemyCanExecuteMove:
xor a
@@ -6111,7 +6111,7 @@ GetCurrentMove:
ld a, MOVE_NAME
ld [wNameListType], a
call GetName
- ld de, wcd6d
+ ld de, wNameBuffer
jp CopyToStringBuffer
LoadEnemyMonData:
@@ -6247,7 +6247,7 @@ LoadEnemyMonData:
ld a, [wEnemyMonSpecies2]
ld [wd11e], a
call GetMonName
- ld hl, wcd6d
+ ld hl, wNameBuffer
ld de, wEnemyMonNick
ld bc, NAME_LENGTH
call CopyData
diff --git a/engine/battle/get_trainer_name.asm b/engine/battle/get_trainer_name.asm
index b2daebfe..82be49e0 100644
--- a/engine/battle/get_trainer_name.asm
+++ b/engine/battle/get_trainer_name.asm
@@ -17,8 +17,8 @@ GetTrainerName_::
ld a, BANK(TrainerNames)
ld [wPredefBank], a
call GetName
- ld hl, wcd6d
+ ld hl, wNameBuffer
.foundName
ld de, wTrainerName
- ld bc, $d
+ ld bc, ITEM_NAME_LENGTH
jp CopyData
diff --git a/engine/battle/misc.asm b/engine/battle/misc.asm
index 4feef343..fe784dd6 100644
--- a/engine/battle/misc.asm
+++ b/engine/battle/misc.asm
@@ -14,10 +14,10 @@ FormatMovesString:
ld a, MOVE_NAME
ld [wNameListType], a
call GetName
- ld hl, wcd6d
+ ld hl, wNameBuffer
.copyNameLoop
ld a, [hli]
- cp $50
+ cp "@"
jr z, .doneCopyingName
ld [de], a
inc de
@@ -26,7 +26,7 @@ FormatMovesString:
ld a, b
ld [wNumMovesMinusOne], a
inc b
- ld a, $4e ; line break
+ ld a, "<NEXT>"
ld [de], a
inc de
pop hl
@@ -42,7 +42,7 @@ FormatMovesString:
ld a, b
cp NUM_MOVES
jr z, .done
- ld a, $4e ; line break
+ ld a, "<NEXT>"
ld [de], a
inc de
jr .printDashLoop
diff --git a/engine/battle/move_effects/pay_day.asm b/engine/battle/move_effects/pay_day.asm
index fa373038..9aab3feb 100644
--- a/engine/battle/move_effects/pay_day.asm
+++ b/engine/battle/move_effects/pay_day.asm
@@ -1,6 +1,6 @@
PayDayEffect_:
xor a
- ld hl, wcd6d
+ ld hl, wPayDayMoney
ld [hli], a
ldh a, [hWhoseTurn]
and a
@@ -21,7 +21,7 @@ PayDayEffect_:
ld b, $4
call Divide
ldh a, [hQuotient + 3]
- ld [hli], a
+ ld [hli], a ; wPayDayMoney + 1
ldh a, [hRemainder]
ldh [hDividend + 3], a
ld a, 10
@@ -33,7 +33,7 @@ PayDayEffect_:
ld b, a
ldh a, [hRemainder]
add b
- ld [hl], a
+ ld [hl], a ; wPayDayMoney + 2
ld de, wTotalPayDayMoney + 2
ld c, $3
predef AddBCDPredef
diff --git a/engine/battle/save_trainer_name.asm b/engine/battle/save_trainer_name.asm
index 4d40fd82..b25d5a11 100644
--- a/engine/battle/save_trainer_name.asm
+++ b/engine/battle/save_trainer_name.asm
@@ -9,7 +9,7 @@ SaveTrainerName::
ld a, [hli]
ld h, [hl]
ld l, a
- ld de, wcd6d
+ ld de, wNameBuffer
.CopyCharacter
ld a, [hli]
ld [de], a
diff --git a/engine/events/cinnabar_lab.asm b/engine/events/cinnabar_lab.asm
index eb82a5b1..171fa99a 100644
--- a/engine/events/cinnabar_lab.asm
+++ b/engine/events/cinnabar_lab.asm
@@ -104,7 +104,7 @@ PrintFossilsInBag:
ldh a, [hItemCounter]
ld bc, SCREEN_WIDTH * 2
call AddNTimes
- ld de, wcd6d
+ ld de, wNameBuffer
call PlaceString
ld hl, hItemCounter
inc [hl]
diff --git a/engine/events/heal_party.asm b/engine/events/heal_party.asm
index b26bc90f..0c6ec1ea 100644
--- a/engine/events/heal_party.asm
+++ b/engine/events/heal_party.asm
@@ -37,10 +37,10 @@ HealParty:
ld hl, Moves
ld bc, MOVE_LENGTH
call AddNTimes
- ld de, wcd6d
+ ld de, wMoveData
ld a, BANK(Moves)
call FarCopyData
- ld a, [wcd6d + 5] ; PP is byte 5 of move data
+ ld a, [wMoveData + MOVE_PP]
pop bc
pop de
diff --git a/engine/events/in_game_trades.asm b/engine/events/in_game_trades.asm
index 54588e7d..c62225ba 100644
--- a/engine/events/in_game_trades.asm
+++ b/engine/events/in_game_trades.asm
@@ -79,7 +79,7 @@ InGameTrade_GetMonName:
push de
ld [wd11e], a
call GetMonName
- ld hl, wcd6d
+ ld hl, wNameBuffer
pop de
ld bc, NAME_LENGTH
jp CopyData
diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm
index e771504d..0c339451 100644
--- a/engine/items/item_effects.asm
+++ b/engine/items/item_effects.asm
@@ -2493,10 +2493,10 @@ GetMaxPP:
ld hl, Moves
ld bc, MOVE_LENGTH
call AddNTimes
- ld de, wcd6d
+ ld de, wMoveData
ld a, BANK(Moves)
call FarCopyData
- ld de, wcd6d + 5 ; PP is byte 5 of move data
+ ld de, wMoveData + MOVE_PP
ld a, [de]
ld b, a ; b = normal max PP
pop hl
diff --git a/engine/items/town_map.asm b/engine/items/town_map.asm
index ccbe0225..a9840268 100644
--- a/engine/items/town_map.asm
+++ b/engine/items/town_map.asm
@@ -1,5 +1,7 @@
DEF NOT_VISITED EQU $fe
+DEF BIRD_BASE_TILE EQU $04
+
DisplayTownMap:
call LoadTownMap
ld hl, wUpdateSpritesEnabled
@@ -12,15 +14,15 @@ DisplayTownMap:
ld a, [wCurMap]
push af
ld b, $0
- call DrawPlayerOrBirdSprite ; player sprite
+ call DrawPlayerOrBirdSprite
hlcoord 1, 0
- ld de, wcd6d
+ ld de, wNameBuffer
call PlaceString
ld hl, wShadowOAM
ld de, wTileMapBackup
ld bc, $10
call CopyData
- ld hl, vSprites tile $04
+ ld hl, vSprites tile BIRD_BASE_TILE
ld de, TownMapCursor
lb bc, BANK(TownMapCursor), (TownMapCursorEnd - TownMapCursor) / $8
call CopyVideoDataDouble
@@ -50,15 +52,15 @@ DisplayTownMap:
ld hl, wShadowOAMSprite04
call WriteTownMapSpriteOAM ; town map cursor sprite
pop hl
- ld de, wcd6d
+ ld de, wNameBuffer
.copyMapName
ld a, [hli]
ld [de], a
inc de
- cp $50
+ cp "@"
jr nz, .copyMapName
hlcoord 1, 0
- ld de, wcd6d
+ ld de, wNameBuffer
call PlaceString
ld hl, wShadowOAMSprite04
ld de, wTileMapBackup + 16
@@ -142,7 +144,7 @@ LoadTownMap_Fly::
call LoadPlayerSpriteGraphics
call LoadFontTilePatterns
ld de, BirdSprite
- ld hl, vSprites tile $04
+ ld hl, vSprites tile BIRD_BASE_TILE
lb bc, BANK(BirdSprite), 12
call CopyVideoData
ld de, TownMapUpArrow
@@ -173,10 +175,10 @@ LoadTownMap_Fly::
call ClearScreenArea
pop hl
ld a, [hl]
- ld b, $4
- call DrawPlayerOrBirdSprite ; draw bird sprite
+ ld b, BIRD_BASE_TILE
+ call DrawPlayerOrBirdSprite
hlcoord 3, 0
- ld de, wcd6d
+ ld de, wNameBuffer
call PlaceString
ld c, 15
call DelayFrames
@@ -356,7 +358,7 @@ DrawPlayerOrBirdSprite:
call TownMapCoordsToOAMCoords
call WritePlayerOrBirdSpriteOAM
pop hl
- ld de, wcd6d
+ ld de, wNameBuffer
.loop
ld a, [hli]
ld [de], a
diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm
index e5796e53..9dd66de5 100644
--- a/engine/link/cable_club.asm
+++ b/engine/link/cable_club.asm
@@ -699,7 +699,7 @@ TradeCenter_Trade:
ld a, [hl]
ld [wd11e], a
call GetMonName
- ld hl, wcd6d
+ ld hl, wNameBuffer
ld de, wNameOfPlayerMonToBeTraded
ld bc, NAME_LENGTH
call CopyData
diff --git a/engine/menus/league_pc.asm b/engine/menus/league_pc.asm
index 08ff22e4..27bccbb5 100644
--- a/engine/menus/league_pc.asm
+++ b/engine/menus/league_pc.asm
@@ -89,7 +89,7 @@ LeaguePCShowMon:
ld [wWholeScreenPaletteMonSpecies], a
ld a, [hli]
ld [wHoFMonLevel], a
- ld de, wcd6d
+ ld de, wNameBuffer
ld bc, NAME_LENGTH
call CopyData
ld b, SET_PAL_POKEMON_WHOLE_SCREEN
diff --git a/engine/menus/naming_screen.asm b/engine/menus/naming_screen.asm
index f5120518..85447300 100644
--- a/engine/menus/naming_screen.asm
+++ b/engine/menus/naming_screen.asm
@@ -45,7 +45,7 @@ AskName:
.declinedNickname
ld d, h
ld e, l
- ld hl, wcd6d
+ ld hl, wNameBuffer
ld bc, NAME_LENGTH
jp CopyData
diff --git a/engine/menus/party_menu.asm b/engine/menus/party_menu.asm
index 50a9838c..6c8cd6eb 100644
--- a/engine/menus/party_menu.asm
+++ b/engine/menus/party_menu.asm
@@ -121,19 +121,19 @@ RedrawPartyMenu_::
rl b
ld c, a
add hl, bc
- ld de, wcd6d
+ ld de, wEvoDataBuffer
ld a, BANK(EvosMovesPointerTable)
ld bc, 2
call FarCopyData
- ld hl, wcd6d
+ ld hl, wEvoDataBuffer
ld a, [hli]
ld h, [hl]
ld l, a
- ld de, wcd6d
+ ld de, wEvoDataBuffer
ld a, BANK(EvosMovesPointerTable)
ld bc, 4 * 3 + 1 ; enough for Eevee's three 4-byte evolutions and 0 terminator
call FarCopyData
- ld hl, wcd6d
+ ld hl, wEvoDataBuffer
ld de, .notAbleToEvolveText
; loop through the pokemon's evolution entries
.checkEvolutionsLoop
diff --git a/engine/movie/hall_of_fame.asm b/engine/movie/hall_of_fame.asm
index d37d95f8..6dd9aab1 100644
--- a/engine/movie/hall_of_fame.asm
+++ b/engine/movie/hall_of_fame.asm
@@ -165,7 +165,7 @@ HoFDisplayMonInfo:
ld de, HoFMonInfoText
call PlaceString
hlcoord 1, 4
- ld de, wcd6d
+ ld de, wNameBuffer
call PlaceString
ld a, [wHoFMonLevel]
hlcoord 8, 7
@@ -275,7 +275,7 @@ HoFRecordMonInfo:
ld [hli], a
ld e, l
ld d, h
- ld hl, wcd6d
+ ld hl, wNameBuffer
ld bc, NAME_LENGTH
jp CopyData
diff --git a/engine/movie/oak_speech/oak_speech2.asm b/engine/movie/oak_speech/oak_speech2.asm
index 95ebcabe..40c75f62 100644
--- a/engine/movie/oak_speech/oak_speech2.asm
+++ b/engine/movie/oak_speech/oak_speech2.asm
@@ -72,7 +72,7 @@ OakSpeechSlidePicLeft:
ld c, 10
call DelayFrames
pop de
- ld hl, wcd6d
+ ld hl, wNameBuffer
ld bc, NAME_LENGTH
call CopyData
call Delay3
@@ -209,7 +209,7 @@ GetDefaultName:
.foundName
ld h, d
ld l, e
- ld de, wcd6d
+ ld de, wNameBuffer
ld bc, NAME_BUFFER_LENGTH
jp CopyData
diff --git a/engine/movie/trade.asm b/engine/movie/trade.asm
index 9d168cc7..931538c0 100644
--- a/engine/movie/trade.asm
+++ b/engine/movie/trade.asm
@@ -188,7 +188,7 @@ LoadTradingGFXAndMonNames:
ld a, [wTradedPlayerMonSpecies]
ld [wd11e], a
call GetMonName
- ld hl, wcd6d
+ ld hl, wNameBuffer
ld de, wStringBuffer
ld bc, NAME_LENGTH
call CopyData
diff --git a/engine/movie/trade2.asm b/engine/movie/trade2.asm
index 98d1158e..a564862b 100644
--- a/engine/movie/trade2.asm
+++ b/engine/movie/trade2.asm
@@ -32,7 +32,7 @@ Trade_PrintEnemyMonInfoText:
lb bc, LEADING_ZEROES | 1, 3
call PrintNumber
hlcoord 5, 12
- ld de, wcd6d
+ ld de, wNameBuffer
call PlaceString
hlcoord 8, 14
ld de, wTradedEnemyMonOT
diff --git a/engine/pokemon/add_mon.asm b/engine/pokemon/add_mon.asm
index 0b7fb96c..73ba8071 100644
--- a/engine/pokemon/add_mon.asm
+++ b/engine/pokemon/add_mon.asm
@@ -261,13 +261,13 @@ AddPartyMon_WriteMovePP:
ld hl, Moves
ld bc, MOVE_LENGTH
call AddNTimes
- ld de, wcd6d
+ ld de, wMoveData
ld a, BANK(Moves)
call FarCopyData
pop bc
pop de
pop hl
- ld a, [wcd6d + 5] ; PP is byte 5 of move data
+ ld a, [wMoveData + MOVE_PP]
.empty
inc de
ld [de], a
diff --git a/engine/pokemon/evos_moves.asm b/engine/pokemon/evos_moves.asm
index fa6930c1..1c7c328c 100644
--- a/engine/pokemon/evos_moves.asm
+++ b/engine/pokemon/evos_moves.asm
@@ -267,7 +267,7 @@ RenameEvolvedMon:
call GetName
pop af
ld [wd0b5], a
- ld hl, wcd6d
+ ld hl, wNameBuffer
ld de, wStringBuffer
.compareNamesLoop
ld a, [de]
@@ -283,7 +283,7 @@ RenameEvolvedMon:
call AddNTimes
push hl
call GetName
- ld hl, wcd6d
+ ld hl, wNameBuffer
pop de
jp CopyData
diff --git a/engine/pokemon/learn_move.asm b/engine/pokemon/learn_move.asm
index 0377caa4..981fe13a 100644
--- a/engine/pokemon/learn_move.asm
+++ b/engine/pokemon/learn_move.asm
@@ -3,7 +3,7 @@ LearnMove:
ld a, [wWhichPokemon]
ld hl, wPartyMonNicks
call GetPartyMonName
- ld hl, wcd6d
+ ld hl, wNameBuffer
ld de, wLearnMoveMonName
ld bc, NAME_LENGTH
call CopyData
diff --git a/home/list_menu.asm b/home/list_menu.asm
index 1629b188..3d864222 100644
--- a/home/list_menu.asm
+++ b/home/list_menu.asm
@@ -156,7 +156,7 @@ DisplayListMenuIDLoop::
ld a, [wWhichPokemon]
call GetPartyMonName
.storeChosenEntry ; store the menu entry that the player chose and return
- ld de, wcd6d
+ ld de, wNameBuffer
call CopyToStringBuffer
ld a, CHOSE_MENU_ITEM
ld [wMenuExitMethod], a
diff --git a/home/names.asm b/home/names.asm
index f7751fa0..2e5e1501 100644
--- a/home/names.asm
+++ b/home/names.asm
@@ -8,14 +8,14 @@ GetMonName::
ld a, [wd11e]
dec a
ld hl, MonsterNames
- ld c, 10
+ ld c, NAME_LENGTH - 1
ld b, 0
call AddNTimes
- ld de, wcd6d
+ ld de, wNameBuffer
push de
- ld bc, 10
+ ld bc, NAME_LENGTH - 1
call CopyData
- ld hl, wcd6d + 10
+ ld hl, wNameBuffer + NAME_LENGTH - 1
ld [hl], "@"
pop de
pop af
@@ -25,8 +25,7 @@ GetMonName::
ret
GetItemName::
-; given an item ID at [wd11e], store the name of the item into a string
-; starting at wcd6d
+; given an item ID at [wd11e], store the name of the item in wNameBuffer
push hl
push bc
ld a, [wd11e]
@@ -44,13 +43,13 @@ GetItemName::
.Machine
call GetMachineName
.Finish
- ld de, wcd6d ; pointer to where item name is stored in RAM
+ ld de, wNameBuffer
pop bc
pop hl
ret
GetMachineName::
-; copies the name of the TM/HM in [wd11e] to wcd6d
+; copies the name of the TM/HM in [wd11e] to wNameBuffer
push hl
push de
push bc
@@ -69,7 +68,7 @@ GetMachineName::
ld hl, TechnicalPrefix ; points to "TM"
ld bc, 2
.WriteMachinePrefix
- ld de, wcd6d
+ ld de, wNameBuffer
call CopyData
; now get the machine number and convert it to text
@@ -136,6 +135,6 @@ GetMoveName::
ld a, BANK(MoveNames)
ld [wPredefBank], a
call GetName
- ld de, wcd6d ; pointer to where move name is stored in RAM
+ ld de, wNameBuffer
pop hl
ret
diff --git a/home/names2.asm b/home/names2.asm
index c27739d7..cd3823fd 100644
--- a/home/names2.asm
+++ b/home/names2.asm
@@ -83,7 +83,7 @@ GetName::
jr nz, .nextName
ld h, d
ld l, e
- ld de, wcd6d
+ ld de, wNameBuffer
ld bc, NAME_BUFFER_LENGTH
call CopyData
.gotPtr
diff --git a/home/pokemon.asm b/home/pokemon.asm
index 131fbd85..b228f086 100644
--- a/home/pokemon.asm
+++ b/home/pokemon.asm
@@ -435,7 +435,7 @@ GetMonHeader::
ld [MBC1RomBank], a
ret
-; copy party pokemon's name to wcd6d
+; copy party pokemon's name to wNameBuffer
GetPartyMonName2::
ld a, [wWhichPokemon] ; index within party
ld hl, wPartyMonNicks
@@ -445,7 +445,7 @@ GetPartyMonName::
push hl
push bc
call SkipFixedLengthTextEntries ; add NAME_LENGTH to hl, a times
- ld de, wcd6d
+ ld de, wNameBuffer
push de
ld bc, NAME_LENGTH
call CopyData
diff --git a/ram/wram.asm b/ram/wram.asm
index 4ff730dd..3bdf5a7b 100644
--- a/ram/wram.asm
+++ b/ram/wram.asm
@@ -876,16 +876,28 @@ wDownscaledMonSize::
wNumMovesMinusOne:: db
UNION
-wcd6d:: ds NAME_BUFFER_LENGTH ; buffer for various data
+; storage buffer for various name strings
+wNameBuffer:: ds NAME_BUFFER_LENGTH
NEXTU
- ds 4
-; temp variable used to print a move's current PP on the status screen
+; data copied from Moves for one move
+wMoveData:: ds MOVE_LENGTH
+
+NEXTU
+; amount of money made from one use of Pay Day
+wPayDayMoney:: ds 3
+
+NEXTU
+; evolution data for one mon
+wEvoDataBuffer:: ds 4 * 3 + 1 ; enough for Eevee's three 4-byte evolutions and 0 terminator
+
+NEXTU
+wBattleMenuCurrentPP:: db
+ ds 3
wStatusScreenCurrentPP:: db
ds 6
; list of normal max PP (without PP up) values
wNormalMaxPPList:: ds NUM_MOVES
- ds 5
ENDU
UNION
diff --git a/scripts/CeladonMartRoof.asm b/scripts/CeladonMartRoof.asm
index 73c12805..b5960c81 100644
--- a/scripts/CeladonMartRoof.asm
+++ b/scripts/CeladonMartRoof.asm
@@ -198,7 +198,7 @@ CeladonMartRoofScript_PrintDrinksInBag:
ldh a, [hItemCounter]
ld bc, SCREEN_WIDTH * 2
call AddNTimes
- ld de, wcd6d
+ ld de, wNameBuffer
call PlaceString
ld hl, hItemCounter
inc [hl]
diff --git a/scripts/Route15Gate2F.asm b/scripts/Route15Gate2F.asm
index 0e04367b..ad1434dc 100644
--- a/scripts/Route15Gate2F.asm
+++ b/scripts/Route15Gate2F.asm
@@ -16,7 +16,7 @@ Route15Gate2FOaksAideText:
ldh [hOaksAideRewardItem], a
ld [wd11e], a
call GetItemName
- ld hl, wcd6d
+ ld hl, wNameBuffer
ld de, wOaksAideRewardItemName
ld bc, ITEM_NAME_LENGTH
call CopyData
diff --git a/scripts/Route23.asm b/scripts/Route23.asm
index 044d5e50..da0acfea 100644
--- a/scripts/Route23.asm
+++ b/scripts/Route23.asm
@@ -81,7 +81,7 @@ Route23CopyBadgeTextScript:
ld a, [hli]
ld h, [hl]
ld l, a
- ld de, wcd6d
+ ld de, wNameBuffer
.copyTextLoop
ld a, [hli]
ld [de], a
diff --git a/scripts/Route2Gate.asm b/scripts/Route2Gate.asm
index a198dbd7..8522a149 100644
--- a/scripts/Route2Gate.asm
+++ b/scripts/Route2Gate.asm
@@ -16,7 +16,7 @@ Route2GateOaksAideText:
ldh [hOaksAideRewardItem], a
ld [wd11e], a
call GetItemName
- ld hl, wcd6d
+ ld hl, wNameBuffer
ld de, wOaksAideRewardItemName
ld bc, ITEM_NAME_LENGTH
call CopyData
diff --git a/text/ChampionsRoom.asm b/text/ChampionsRoom.asm
index 92f23f69..9e62e5de 100644
--- a/text/ChampionsRoom.asm
+++ b/text/ChampionsRoom.asm
@@ -96,7 +96,7 @@ _ChampionsRoomOakCongratulatesPlayerText::
line "much since you"
cont "first left with"
cont "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text "!"
para "<PLAYER>, you have"
diff --git a/text/CinnabarLabFossilRoom.asm b/text/CinnabarLabFossilRoom.asm
index 6701bbd0..be0bc947 100644
--- a/text/CinnabarLabFossilRoom.asm
+++ b/text/CinnabarLabFossilRoom.asm
@@ -38,7 +38,7 @@ _CinnabarLabFossilRoomScientist1FossilIsBackToLifeText::
_CinnabarLabFossilRoomScientist1SeesFossilText::
text "Oh! That is"
line "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text "!"
para "It is fossil of"
@@ -60,7 +60,7 @@ _CinnabarLabFossilRoomScientist1TakesFossilText::
para "<PLAYER> handed"
line "over @"
- text_ram wcd6d
+ text_ram wNameBuffer
text "!"
prompt
diff --git a/text/Daycare.asm b/text/Daycare.asm
index 87cde965..be9b8eab 100644
--- a/text/Daycare.asm
+++ b/text/Daycare.asm
@@ -13,7 +13,7 @@ _DaycareGentlemanWhichMonText::
_DaycareGentlemanWillLookAfterMonText::
text "Fine, I'll look"
line "after @"
- text_ram wcd6d
+ text_ram wNameBuffer
text_start
cont "for a while."
prompt
@@ -25,7 +25,7 @@ _DaycareGentlemanComeSeeMeInAWhileText::
_DaycareGentlemanMonHasGrownText::
text "Your @"
- text_ram wcd6d
+ text_ram wNameBuffer
text_start
line "has grown a lot!"
@@ -55,7 +55,7 @@ _DaycareGentlemanGotMonBackText::
_DaycareGentlemanMonNeedsMoreTimeText::
text "Back already?"
line "Your @"
- text_ram wcd6d
+ text_ram wNameBuffer
text_start
cont "needs some more"
cont "time with me."
diff --git a/text/NameRatersHouse.asm b/text/NameRatersHouse.asm
index 106a2cf0..3d2d5eaa 100644
--- a/text/NameRatersHouse.asm
+++ b/text/NameRatersHouse.asm
@@ -14,7 +14,7 @@ _NameRatersHouseNameRaterWhichPokemonText::
prompt
_NameRatersHouseNameRaterGiveItANiceNameText::
- text_ram wcd6d
+ text_ram wNameBuffer
text ", is it?"
line "That is a decent"
cont "nickname!"
@@ -48,13 +48,13 @@ _NameRatersHouseNameRaterComeAnyTimeYouLikeText::
done
_NameRatersHouseNameRaterATrulyImpeccableNameText::
- text_ram wcd6d
+ text_ram wNameBuffer
text ", is it?"
line "That is a truly"
cont "impeccable name!"
para "Take good care of"
line "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text "!"
done
diff --git a/text/OaksLab.asm b/text/OaksLab.asm
index 11accbd4..e839149e 100644
--- a/text/OaksLab.asm
+++ b/text/OaksLab.asm
@@ -51,7 +51,7 @@ _OaksLabMonEnergeticText::
_OaksLabReceivedMonText::
text "<PLAYER> received"
line "a @"
- text_ram wcd6d
+ text_ram wNameBuffer
text "!@"
text_end
@@ -243,7 +243,7 @@ _OaksLabRivalIllTakeThisOneText::
_OaksLabRivalReceivedMonText::
text "<RIVAL> received"
line "a @"
- text_ram wcd6d
+ text_ram wNameBuffer
text "!@"
text_end
diff --git a/text/Route23.asm b/text/Route23.asm
index 921b6407..cdccbf93 100644
--- a/text/Route23.asm
+++ b/text/Route23.asm
@@ -2,12 +2,12 @@ _Route23YouDontHaveTheBadgeYetText::
text "You can pass here"
line "only if you have"
cont "the @"
- text_ram wcd6d
+ text_ram wNameBuffer
text "!"
para "You don't have the"
line "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text " yet!"
para "You have to have"
@@ -19,12 +19,12 @@ _Route23OhThatIsTheBadgeText::
text "You can pass here"
line "only if you have"
cont "the @"
- text_ram wcd6d
+ text_ram wNameBuffer
text "!"
para "Oh! That is the"
line "@"
- text_ram wcd6d
+ text_ram wNameBuffer
text "!@"
text_end