summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-12-23 16:46:49 -0500
committerRangi <remy.oukaour+rangi42@gmail.com>2020-12-23 16:46:49 -0500
commit524f57703fb362dd9a131edb1eb5aebad5ffe633 (patch)
treef49e12f9e57b60128d6ea7b50116b66835874734
parentb87c45afcd9fcd06be459f112b01e6035dc3f20b (diff)
Rename some labels
- Remove "Buffer" suffix from some byte and word quantities - Change "Ptr" to "Pointer"
-rw-r--r--audio/engine.asm4
-rw-r--r--data/text/battle.asm6
-rw-r--r--data/text/common_2.asm14
-rw-r--r--engine/battle/ai/items.asm2
-rw-r--r--engine/battle/core.asm48
-rw-r--r--engine/battle/effect_commands.asm19
-rw-r--r--engine/battle/menu.asm8
-rw-r--r--engine/battle/move_effects/beat_up.asm4
-rw-r--r--engine/battle/move_effects/conversion.asm2
-rw-r--r--engine/battle/move_effects/conversion2.asm2
-rw-r--r--engine/battle/move_effects/disable.asm2
-rw-r--r--engine/battle/move_effects/magnitude.asm2
-rw-r--r--engine/battle/move_effects/mimic.asm2
-rw-r--r--engine/battle/move_effects/mirror_move.asm2
-rw-r--r--engine/battle/move_effects/sketch.asm2
-rw-r--r--engine/battle/move_effects/spite.asm4
-rw-r--r--engine/battle/move_effects/thief.asm8
-rw-r--r--engine/battle/move_effects/transform.asm2
-rw-r--r--engine/battle/read_trainer_attributes.asm4
-rw-r--r--engine/debug/color_picker.asm6
-rw-r--r--engine/debug/debug_room.asm52
-rw-r--r--engine/events/bug_contest/caught_mon.asm4
-rw-r--r--engine/events/bug_contest/display_stats.asm2
-rw-r--r--engine/events/bug_contest/judging.asm6
-rw-r--r--engine/events/haircut.asm2
-rw-r--r--engine/events/halloffame.asm4
-rw-r--r--engine/events/happiness_egg.asm4
-rw-r--r--engine/events/lucky_number.asm2
-rw-r--r--engine/events/misc_scripts.asm4
-rw-r--r--engine/events/mom_phone.asm2
-rw-r--r--engine/events/move_deleter.asm2
-rw-r--r--engine/events/name_rater.asm2
-rw-r--r--engine/events/npc_trade.asm30
-rw-r--r--engine/events/pokecenter_pc.asm32
-rw-r--r--engine/events/specials.asm8
-rw-r--r--engine/items/buy_sell_toss.asm24
-rw-r--r--engine/items/item_effects.asm12
-rw-r--r--engine/items/items.asm48
-rw-r--r--engine/items/mart.asm16
-rw-r--r--engine/items/pack.asm40
-rw-r--r--engine/items/tmhm.asm4
-rw-r--r--engine/link/init_list.asm6
-rw-r--r--engine/link/link.asm20
-rw-r--r--engine/link/mystery_gift.asm2
-rw-r--r--engine/link/time_capsule.asm2
-rw-r--r--engine/menus/menu.asm6
-rw-r--r--engine/menus/menu_2.asm6
-rw-r--r--engine/menus/naming_screen.asm2
-rw-r--r--engine/menus/scrolling_menu.asm8
-rw-r--r--engine/menus/start_menu.asm12
-rw-r--r--engine/movie/trade_animation.asm2
-rw-r--r--engine/overworld/decorations.asm4
-rw-r--r--engine/overworld/scripting.asm22
-rw-r--r--engine/overworld/select_menu.asm2
-rw-r--r--engine/overworld/time.asm6
-rw-r--r--engine/overworld/wildmons.asm16
-rw-r--r--engine/pokedex/pokedex.asm3
-rw-r--r--engine/pokegear/pokegear.asm8
-rw-r--r--engine/pokegear/radio.asm6
-rw-r--r--engine/pokemon/bills_pc.asm10
-rw-r--r--engine/pokemon/bills_pc_top.asm4
-rw-r--r--engine/pokemon/breeding.asm4
-rw-r--r--engine/pokemon/caught_nickname.asm4
-rw-r--r--engine/pokemon/evolve.asm8
-rw-r--r--engine/pokemon/learn.asm2
-rw-r--r--engine/pokemon/mail.asm4
-rw-r--r--engine/pokemon/mon_menu.asm48
-rw-r--r--engine/pokemon/mon_stats.asm2
-rw-r--r--engine/pokemon/mon_submenu.asm2
-rw-r--r--engine/pokemon/move_mon.asm8
-rw-r--r--engine/pokemon/stats_screen.asm10
-rw-r--r--engine/pokemon/types.asm4
-rw-r--r--engine/predef.asm4
-rw-r--r--engine/printer/print_party.asm6
-rw-r--r--engine/printer/printer.asm2
-rw-r--r--engine/rtc/timeset.asm4
-rw-r--r--home/farcall.asm8
-rw-r--r--home/map.asm4
-rw-r--r--home/menu.asm8
-rw-r--r--home/names.asm30
-rw-r--r--home/pokemon.asm4
-rw-r--r--home/predef.asm14
-rw-r--r--home/random.asm4
-rw-r--r--home/sprite_anims.asm8
-rw-r--r--home/video.asm6
-rw-r--r--macros/legacy.asm49
-rw-r--r--macros/scripts/events.asm6
-rw-r--r--wram.asm55
88 files changed, 452 insertions, 446 deletions
diff --git a/audio/engine.asm b/audio/engine.asm
index e24ba259..7a7d2f9a 100644
--- a/audio/engine.asm
+++ b/audio/engine.asm
@@ -210,7 +210,7 @@ _UpdateSound::
ret
UpdateChannels:
- ld hl, .ChannelFnPtrs
+ ld hl, .ChannelFunctions
ld a, [wCurChannel]
maskbits NUM_CHANNELS
add a
@@ -222,7 +222,7 @@ UpdateChannels:
ld l, a
jp hl
-.ChannelFnPtrs:
+.ChannelFunctions:
dw .Channel1
dw .Channel2
dw .Channel3
diff --git a/data/text/battle.asm b/data/text/battle.asm
index 811a8e8c..a83095bc 100644
--- a/data/text/battle.asm
+++ b/data/text/battle.asm
@@ -80,7 +80,7 @@ SandstormHitsText:
PerishCountText:
text "<USER>'s"
line "PERISH count is @"
- text_decimal wDeciramBuffer, 1, 1
+ text_decimal wTextDecimalByte, 1, 1
text "!"
prompt
@@ -656,7 +656,7 @@ SpiteEffectText:
text_ram wStringBuffer1
text " was"
cont "reduced by @"
- text_decimal wDeciramBuffer, 1, 1
+ text_decimal wTextDecimalByte, 1, 1
text "!"
prompt
@@ -1016,7 +1016,7 @@ SafeguardProtectText:
MagnitudeText:
text "Magnitude @"
- text_decimal wDeciramBuffer, 1, 1
+ text_decimal wTextDecimalByte, 1, 1
text "!"
prompt
diff --git a/data/text/common_2.asm b/data/text/common_2.asm
index 9c8516fa..52399ab9 100644
--- a/data/text/common_2.asm
+++ b/data/text/common_2.asm
@@ -282,7 +282,7 @@ _AskThrowAwayText::
_AskQuantityThrowAwayText::
text "Throw away @"
- text_decimal wItemQuantityChangeBuffer, 1, 2
+ text_decimal wItemQuantityChange, 1, 2
text_start
line "@"
text_ram wStringBuffer2
@@ -745,7 +745,7 @@ _PlayersPCHowManyWithdrawText::
_PlayersPCWithdrewItemsText::
text "Withdrew @"
- text_decimal wItemQuantityChangeBuffer, 1, 2
+ text_decimal wItemQuantityChange, 1, 2
text_start
line "@"
text_ram wStringBuffer2
@@ -768,7 +768,7 @@ _PlayersPCHowManyDepositText::
_PlayersPCDepositItemsText::
text "Deposited @"
- text_decimal wItemQuantityChangeBuffer, 1, 2
+ text_decimal wItemQuantityChange, 1, 2
text_start
line "@"
text_ram wStringBuffer2
@@ -1004,7 +1004,7 @@ _ItemsTossOutHowManyText::
_ItemsThrowAwayText::
text "Throw away @"
- text_decimal wItemQuantityChangeBuffer, 1, 2
+ text_decimal wItemQuantityChange, 1, 2
text_start
line "@"
text_ram wStringBuffer2
@@ -1401,7 +1401,7 @@ _MartHowManyText::
done
_MartFinalPriceText::
- text_decimal wItemQuantityChangeBuffer, 1, 2
+ text_decimal wItemQuantityChange, 1, 2
text " @"
text_ram wStringBuffer2
text "(S)"
@@ -1430,7 +1430,7 @@ _HerbalLadyHowManyText::
done
_HerbalLadyFinalPriceText::
- text_decimal wItemQuantityChangeBuffer, 1, 2
+ text_decimal wItemQuantityChange, 1, 2
text " @"
text_ram wStringBuffer2
text "(S)"
@@ -1513,7 +1513,7 @@ _PharmacyHowManyText::
done
_PharmacyFinalPriceText::
- text_decimal wItemQuantityChangeBuffer, 1, 2
+ text_decimal wItemQuantityChange, 1, 2
text " @"
text_ram wStringBuffer2
text "(S)"
diff --git a/engine/battle/ai/items.asm b/engine/battle/ai/items.asm
index 16e9ef20..11636fde 100644
--- a/engine/battle/ai/items.asm
+++ b/engine/battle/ai/items.asm
@@ -822,7 +822,7 @@ PrintText_UsedItemOn_AND_AIUpdateHUD:
PrintText_UsedItemOn:
ld a, [wCurEnemyItem]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld hl, wStringBuffer1
ld de, wMonOrItemNameBuffer
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 8aa0a79a..aca0185e 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -328,7 +328,7 @@ HandleBerserkGene:
push bc
callfar GetUserItem
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
sub BERSERK_GENE
pop bc
pop de
@@ -1108,7 +1108,7 @@ HandlePerishSong:
ret z
dec [hl]
ld a, [hl]
- ld [wDeciramBuffer], a
+ ld [wTextDecimalByte], a
push af
ld hl, PerishCountText
call StdBattleTextbox
@@ -1182,7 +1182,7 @@ HandleWrap:
ret nz
ld a, [de]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld [wFXAnimID], a
call GetMoveName
dec [hl]
@@ -1235,7 +1235,7 @@ HandleLeftovers:
callfar GetUserItem
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld a, b
cp HELD_LEFTOVERS
@@ -1381,7 +1381,7 @@ HandleMysteryberry:
.skip_checks
callfar GetUserItem
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
xor a
ld [hl], a
call GetPartymonItem
@@ -3491,7 +3491,7 @@ TryToRunAwayFromBattle:
push hl
push de
ld a, [wBattleMonItem]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld b, a
callfar GetItemHeldEffect
ld a, b
@@ -3797,7 +3797,7 @@ SendOutPlayerMon:
call GetBattleMonBackpic
xor a
ldh [hGraphicStartTile], a
- ld [wBattleMenuCursorBuffer], a
+ ld [wBattleMenuCursorPosition], a
ld [wCurMoveNum], a
ld [wTypeModifier], a
ld [wPlayerMoveStruct + MOVE_ANIM], a
@@ -4107,7 +4107,7 @@ UseOpponentItem:
call RefreshBattleHuds
callfar GetOpponentItem
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
callfar ConsumeHeldItem
ld hl, RecoveredUsingText
@@ -4201,7 +4201,7 @@ UseConfusionHealingItem:
.heal_status
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld a, BATTLE_VARS_SUBSTATUS3_OPP
call GetBattleVarAddr
res SUBSTATUS_CONFUSED, [hl]
@@ -4268,7 +4268,7 @@ HandleStatBoostingHeldItems:
jr nz, .loop
pop bc
ld a, [bc]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
push bc
dec hl
dec hl
@@ -4661,7 +4661,7 @@ BattleMenu:
.next
ld a, $1
ldh [hBGMapMode], a
- ld a, [wBattleMenuCursorBuffer]
+ ld a, [wBattleMenuCursorPosition]
cp $1
jp z, BattleMenu_Fight
cp $3
@@ -4736,7 +4736,7 @@ BattleMenu_Pack:
and a
jr nz, .run
callfar CheckItemPocket
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
cp BALL
jr z, .ball
call ClearBGPalettes
@@ -5144,7 +5144,7 @@ MoveSelectionScreen:
.battle_player_moves
call MoveInfoBox
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
and a
jr z, .interpret_joypad
hlcoord 5, 13
@@ -5168,7 +5168,7 @@ MoveSelectionScreen:
push af
xor a
- ld [wMoveSwapBuffer], a
+ ld [wSwappingMove], a
ld a, [wMenuCursorY]
dec a
ld [wMenuCursorY], a
@@ -5306,7 +5306,7 @@ MoveSelectionScreen:
ret
.pressed_select
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
and a
jr z, .start_swap
ld hl, wBattleMonMoves
@@ -5324,14 +5324,14 @@ MoveSelectionScreen:
ld a, [hl]
and $f
ld b, a
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
swap a
add b
ld [hl], a
jr .swap_moves_in_party_struct
.not_swapping_disabled_move
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
cp b
jr nz, .swap_moves_in_party_struct
ld a, [hl]
@@ -5359,12 +5359,12 @@ MoveSelectionScreen:
.transformed
xor a
- ld [wMoveSwapBuffer], a
+ ld [wSwappingMove], a
jp MoveSelectionScreen
.swap_bytes
push hl
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
dec a
ld c, a
ld b, 0
@@ -5386,7 +5386,7 @@ MoveSelectionScreen:
.start_swap
ld a, [wMenuCursorY]
- ld [wMoveSwapBuffer], a
+ ld [wSwappingMove], a
jp MoveSelectionScreen
MoveInfoBox:
@@ -5453,7 +5453,7 @@ MoveInfoBox:
call PrintNum
hlcoord 8, 11
- ld de, wNamedObjectIndexBuffer
+ ld de, wNamedObjectIndex
lb bc, 1, 2
call PrintNum
@@ -6157,7 +6157,7 @@ LoadEnemyMon:
ld [de], a
ld a, [wTempEnemyMonSpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
@@ -7745,7 +7745,7 @@ StartBattle:
ldh [hMapAnims], a
xor a
ld [wTempBattleMonSpecies], a
- ld [wBattleMenuCursorBuffer], a
+ ld [wBattleMenuCursorPosition], a
farcall PlayBattleMusic
ld a, 0
ld [wSpriteUpdatesEnabled], a
@@ -7964,7 +7964,7 @@ ExitBattle:
ld [wPartyMenuCursor], a
ld [wKeyItemsPocketCursor], a
ld [wItemsPocketCursor], a
- ld [wBattleMenuCursorBuffer], a
+ ld [wBattleMenuCursorPosition], a
ld [wCurMoveNum], a
ld [wBallsPocketCursor], a
ld [wLastPocket], a
diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm
index 548b7c81..58d7d016 100644
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -606,7 +606,7 @@ MoveDisabled:
ld a, BATTLE_VARS_MOVE
call GetBattleVar
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetMoveName
ld hl, DisabledMoveText
@@ -2192,7 +2192,7 @@ BattleCommand_ApplyDamage:
.focus_band_text
call GetOpponentItem
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld hl, HungOnText
jp StdBattleTextbox
@@ -3585,7 +3585,7 @@ UpdateMoveData:
ld a, BATTLE_VARS_MOVE
call GetBattleVar
ld [wCurSpecies], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
dec a
call GetMoveData
@@ -3601,7 +3601,7 @@ BattleCommand_SleepTarget:
jr nz, .not_protected_by_item
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld hl, ProtectedByText
jr .fail
@@ -3739,7 +3739,7 @@ BattleCommand_Poison:
cp HELD_PREVENT_POISON
jr nz, .do_poison
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld hl, ProtectedByText
jr .failed
@@ -4785,7 +4785,6 @@ BattleCommand_TriStatusChance:
; tristatuschance
call BattleCommand_EffectChance
-
.loop
; 1/3 chance of each status
call BattleRandom
@@ -4793,11 +4792,11 @@ BattleCommand_TriStatusChance:
and %11
jr z, .loop
dec a
- ld hl, .ptrs
+ ld hl, .StatusCommands
rst JumpTable
ret
-.ptrs
+.StatusCommands:
dw BattleCommand_ParalyzeTarget ; paralyze
dw BattleCommand_FreezeTarget ; freeze
dw BattleCommand_BurnTarget ; burn
@@ -5827,7 +5826,7 @@ BattleCommand_Confuse:
cp HELD_PREVENT_CONFUSE
jr nz, .no_item_protection
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
call AnimateFailedMove
ld hl, ProtectedByText
@@ -5917,7 +5916,7 @@ BattleCommand_Paralyze:
cp HELD_PREVENT_PARALYZE
jr nz, .no_item_protection
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
call AnimateFailedMove
ld hl, ProtectedByText
diff --git a/engine/battle/menu.asm b/engine/battle/menu.asm
index e9a7e593..4887b73b 100644
--- a/engine/battle/menu.asm
+++ b/engine/battle/menu.asm
@@ -14,11 +14,11 @@ ContestBattleMenu:
; fallthrough
CommonBattleMenu:
- ld a, [wBattleMenuCursorBuffer]
- ld [wMenuCursorBuffer], a
+ ld a, [wBattleMenuCursorPosition]
+ ld [wMenuCursorPosition], a
call _2DMenu
- ld a, [wMenuCursorBuffer]
- ld [wBattleMenuCursorBuffer], a
+ ld a, [wMenuCursorPosition]
+ ld [wBattleMenuCursorPosition], a
call ExitMenu
ret
diff --git a/engine/battle/move_effects/beat_up.asm b/engine/battle/move_effects/beat_up.asm
index 32e0112c..d2797f79 100644
--- a/engine/battle/move_effects/beat_up.asm
+++ b/engine/battle/move_effects/beat_up.asm
@@ -114,7 +114,7 @@ BattleCommand_BeatUp:
ld hl, wOTPartySpecies
add hl, bc
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
jr .got_enemy_nick
@@ -152,7 +152,7 @@ BattleCommand_BeatUp:
.wild
ld a, [wEnemyMonSpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, BeatUpAttackText
call StdBattleTextbox
diff --git a/engine/battle/move_effects/conversion.asm b/engine/battle/move_effects/conversion.asm
index b6081a6b..b67ed992 100644
--- a/engine/battle/move_effects/conversion.asm
+++ b/engine/battle/move_effects/conversion.asm
@@ -89,7 +89,7 @@ BattleCommand_Conversion:
ld [de], a
inc de
ld [de], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
farcall GetTypeName
call AnimateCurrentMove
ld hl, TransformedTypeText
diff --git a/engine/battle/move_effects/conversion2.asm b/engine/battle/move_effects/conversion2.asm
index bc866727..df6d9109 100644
--- a/engine/battle/move_effects/conversion2.asm
+++ b/engine/battle/move_effects/conversion2.asm
@@ -55,7 +55,7 @@ BattleCommand_Conversion2:
call BattleCommand_SwitchTurn
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
predef GetTypeName
ld hl, TransformedTypeText
jp StdBattleTextbox
diff --git a/engine/battle/move_effects/disable.asm b/engine/battle/move_effects/disable.asm
index de6dbc60..4020aa88 100644
--- a/engine/battle/move_effects/disable.asm
+++ b/engine/battle/move_effects/disable.asm
@@ -63,7 +63,7 @@ BattleCommand_Disable:
ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP
call GetBattleVar
ld [hl], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetMoveName
ld hl, WasDisabledText
jp StdBattleTextbox
diff --git a/engine/battle/move_effects/magnitude.asm b/engine/battle/move_effects/magnitude.asm
index f8961b66..87510db0 100644
--- a/engine/battle/move_effects/magnitude.asm
+++ b/engine/battle/move_effects/magnitude.asm
@@ -18,7 +18,7 @@ BattleCommand_GetMagnitude:
push de
inc hl
ld a, [hl]
- ld [wDeciramBuffer], a
+ ld [wTextDecimalByte], a
call BattleCommand_MoveDelay
ld hl, MagnitudeText
call StdBattleTextbox
diff --git a/engine/battle/move_effects/mimic.asm b/engine/battle/move_effects/mimic.asm
index 71eb72c6..a8bc1e11 100644
--- a/engine/battle/move_effects/mimic.asm
+++ b/engine/battle/move_effects/mimic.asm
@@ -37,7 +37,7 @@ BattleCommand_Mimic:
ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP
call GetBattleVar
ld [hl], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld bc, wBattleMonPP - wBattleMonMoves
add hl, bc
ld [hl], 5
diff --git a/engine/battle/move_effects/mirror_move.asm b/engine/battle/move_effects/mirror_move.asm
index 86259d11..e3ac3e1c 100644
--- a/engine/battle/move_effects/mirror_move.asm
+++ b/engine/battle/move_effects/mirror_move.asm
@@ -24,7 +24,7 @@ BattleCommand_MirrorMove:
.use
ld a, b
ld [hl], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
push af
ld a, BATTLE_VARS_MOVE_ANIM
diff --git a/engine/battle/move_effects/sketch.asm b/engine/battle/move_effects/sketch.asm
index 654fb3f5..aa541098 100644
--- a/engine/battle/move_effects/sketch.asm
+++ b/engine/battle/move_effects/sketch.asm
@@ -34,7 +34,7 @@ BattleCommand_Sketch:
.get_last_move
ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP
call GetBattleVar
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld b, a
; Fail if move is invalid or is Struggle.
and a
diff --git a/engine/battle/move_effects/spite.asm b/engine/battle/move_effects/spite.asm
index 3e1c2f9b..0244f778 100644
--- a/engine/battle/move_effects/spite.asm
+++ b/engine/battle/move_effects/spite.asm
@@ -24,7 +24,7 @@ BattleCommand_Spite:
ld a, [hli]
cp b
jr nz, .loop
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
dec hl
ld b, 0
push bc
@@ -78,7 +78,7 @@ BattleCommand_Spite:
call AnimateCurrentMove
pop de
ld a, d
- ld [wDeciramBuffer], a
+ ld [wTextDecimalByte], a
ld hl, SpiteEffectText
jp StdBattleTextbox
diff --git a/engine/battle/move_effects/thief.asm b/engine/battle/move_effects/thief.asm
index e588c5ff..03e3fb6a 100644
--- a/engine/battle/move_effects/thief.asm
+++ b/engine/battle/move_effects/thief.asm
@@ -21,7 +21,7 @@ BattleCommand_Thief:
; Can't steal mail.
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld d, a
farcall ItemIsMail
ret c
@@ -45,7 +45,7 @@ BattleCommand_Thief:
ld [de], a
call .playeritem
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
ld [hl], a
ld [de], a
jr .stole
@@ -68,7 +68,7 @@ BattleCommand_Thief:
; Can't steal mail!
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld d, a
farcall ItemIsMail
ret c
@@ -86,7 +86,7 @@ BattleCommand_Thief:
ld [de], a
call .enemyitem
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
ld [hl], a
ld [de], a
diff --git a/engine/battle/move_effects/transform.asm b/engine/battle/move_effects/transform.asm
index 8b3226f3..e7e0a53f 100644
--- a/engine/battle/move_effects/transform.asm
+++ b/engine/battle/move_effects/transform.asm
@@ -99,7 +99,7 @@ BattleCommand_Transform:
jr nz, .pp_loop
pop hl
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wEnemyStats
ld de, wPlayerStats
diff --git a/engine/battle/read_trainer_attributes.asm b/engine/battle/read_trainer_attributes.asm
index 3f4d4a98..9dc7d2fe 100644
--- a/engine/battle/read_trainer_attributes.asm
+++ b/engine/battle/read_trainer_attributes.asm
@@ -6,7 +6,7 @@ GetTrainerClassName:
ld [wCurSpecies], a
ld a, TRAINER_NAME
- ld [wNamedObjectTypeBuffer], a
+ ld [wNamedObjectType], a
call GetName
ld de, wStringBuffer1
ret
@@ -32,7 +32,7 @@ GetOTName:
ld [wCurSpecies], a
ld a, TRAINER_NAME
- ld [wNamedObjectTypeBuffer], a
+ ld [wNamedObjectType], a
call GetName
ld hl, wStringBuffer1
diff --git a/engine/debug/color_picker.asm b/engine/debug/color_picker.asm
index 2ebf4861..2538b749 100644
--- a/engine/debug/color_picker.asm
+++ b/engine/debug/color_picker.asm
@@ -312,9 +312,9 @@ DebugColor_InitScreen:
ld a, [wDebugColorCurMon]
inc a
ld [wCurPartySpecies], a
- ld [wDeciramBuffer], a
+ ld [wTextDecimalByte], a
hlcoord 0, 1
- ld de, wDeciramBuffer
+ ld de, wTextDecimalByte
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
call PrintNum
ld a, [wDebugColorIsTrainer]
@@ -356,7 +356,7 @@ DebugColor_InitScreen:
jr .done
.trainer
- ld a, [wDeciramBuffer]
+ ld a, [wTextDecimalByte]
ld [wTrainerClass], a
callfar GetTrainerAttributes
ld de, wStringBuffer1
diff --git a/engine/debug/debug_room.asm b/engine/debug/debug_room.asm
index 19f7f9e0..3af67311 100644
--- a/engine/debug/debug_room.asm
+++ b/engine/debug/debug_room.asm
@@ -392,9 +392,9 @@ DebugRoom_EditPagedValues:
ld a, [hli]
ld [wDebugRoomPageCount], a
ld a, l
- ld [wDebugRoomPagedValuesPtr], a
+ ld [wDebugRoomPagesPointer], a
ld a, h
- ld [wDebugRoomPagedValuesPtr+1], a
+ ld [wDebugRoomPagesPointer+1], a
ld hl, hInMenu
ld a, [hl]
push af
@@ -488,7 +488,7 @@ DebugRoom_PageString:
db " P @"
DebugRoom_IncrementPagedValue:
- call DebugRoom_GetCurPagedValuePtr
+ call DebugRoom_GetCurPagedValuePointer
ld e, [hl] ; de = value address
inc hl
ld d, [hl]
@@ -503,7 +503,7 @@ DebugRoom_IncrementPagedValue:
ret
DebugRoom_DecrementPagedValue:
- call DebugRoom_GetCurPagedValuePtr
+ call DebugRoom_GetCurPagedValuePointer
ld e, [hl] ; de = value address
inc hl
ld d, [hl]
@@ -528,7 +528,7 @@ DebugRoom_NextPage:
ld [wDebugRoomCurPage], a
call DebugRoom_PrintPage
ld a, [wDebugRoomCurPage]
- call DebugRoom_GetNthPagePtr
+ call DebugRoom_GetNthPagePointer
ld a, [wDebugRoomCurValue]
cp [hl]
jr c, .skip
@@ -550,7 +550,7 @@ DebugRoom_PrevPage:
ld [wDebugRoomCurPage], a
call DebugRoom_PrintPage
ld a, [wDebugRoomCurPage]
- call DebugRoom_GetNthPagePtr
+ call DebugRoom_GetNthPagePointer
ld a, [wDebugRoomCurValue]
cp [hl]
jr c, .skip
@@ -566,7 +566,7 @@ DebugRoom_NextPagedValue:
ld a, " "
call DebugRoom_ShowHideCursor
ld a, [wDebugRoomCurPage]
- call DebugRoom_GetNthPagePtr
+ call DebugRoom_GetNthPagePointer
ld a, [wDebugRoomCurValue]
inc a
cp [hl] ; incremented value < paged_value count?
@@ -595,15 +595,15 @@ DebugRoom_PrevPagedValue:
dec a
jr DebugRoom_UpdateValueCursor
-DebugRoom_GetNthPagePtr:
+DebugRoom_GetNthPagePointer:
; Input: a = page index
; Output: hl = pointer to paged_data list
ld h, 0
ld l, a
add hl, hl
- ld a, [wDebugRoomPagedValuesPtr]
+ ld a, [wDebugRoomPagesPointer]
ld e, a
- ld a, [wDebugRoomPagedValuesPtr+1]
+ ld a, [wDebugRoomPagesPointer+1]
ld d, a
add hl, de
ld a, [hli]
@@ -611,10 +611,10 @@ DebugRoom_GetNthPagePtr:
ld l, a
ret
-_DebugRoom_GetPageBValueCPtr:
+_DebugRoom_GetPageBValueCPointer:
push bc
ld a, b
- call DebugRoom_GetNthPagePtr
+ call DebugRoom_GetNthPagePointer
pop bc
inc hl
ld a, c
@@ -622,12 +622,12 @@ _DebugRoom_GetPageBValueCPtr:
call AddNTimes
ret
-DebugRoom_GetCurPagedValuePtr:
+DebugRoom_GetCurPagedValuePointer:
ld a, [wDebugRoomCurPage]
ld b, a
ld a, [wDebugRoomCurValue]
ld c, a
- jr _DebugRoom_GetPageBValueCPtr
+ jr _DebugRoom_GetPageBValueCPointer
DebugRoom_ShowHideCursor:
push af
@@ -656,9 +656,9 @@ DebugRoom_InitializePagedValues:
ld h, 0
ld l, a
add hl, hl
- ld a, [wDebugRoomPagedValuesPtr]
+ ld a, [wDebugRoomPagesPointer]
ld e, a
- ld a, [wDebugRoomPagedValuesPtr+1]
+ ld a, [wDebugRoomPagesPointer+1]
ld d, a
add hl, de
ld a, [hli]
@@ -679,9 +679,9 @@ DebugRoom_InitializePagedValues:
ld h, 0
ld l, b
add hl, hl
- ld a, [wDebugRoomPagedValuesPtr]
+ ld a, [wDebugRoomPagesPointer]
ld e, a
- ld a, [wDebugRoomPagedValuesPtr+1]
+ ld a, [wDebugRoomPagesPointer+1]
ld d, a
add hl, de
ld a, [hli]
@@ -716,9 +716,9 @@ DebugRoom_PrintPage:
ld h, 0
ld l, a
add hl, hl
- ld a, [wDebugRoomPagedValuesPtr]
+ ld a, [wDebugRoomPagesPointer]
ld e, a
- ld a, [wDebugRoomPagedValuesPtr+1]
+ ld a, [wDebugRoomPagesPointer+1]
ld d, a
add hl, de
ld a, [hli]
@@ -746,9 +746,9 @@ DebugRoom_PrintPagedValue:
ld h, 0
ld l, b
add hl, hl
- ld a, [wDebugRoomPagedValuesPtr]
+ ld a, [wDebugRoomPagesPointer]
ld e, a
- ld a, [wDebugRoomPagedValuesPtr+1]
+ ld a, [wDebugRoomPagesPointer+1]
ld d, a
add hl, de
ld a, [hli]
@@ -902,7 +902,7 @@ DebugRoom_SaveItem:
done
DebugRoom_PrintItemName:
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
push bc
call GetItemName
pop hl
@@ -1048,19 +1048,19 @@ DebugRoom_SavePokemon:
done
DebugRoom_PrintPokemonName:
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
push bc
call GetPokemonName
jr _DebugRoom_FinishGetName
DebugRoom_PrintItemName2:
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
push bc
call GetItemName
jr _DebugRoom_FinishGetName
DebugRoom_PrintMoveName:
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
push bc
call GetMoveName
jr _DebugRoom_FinishGetName
diff --git a/engine/events/bug_contest/caught_mon.asm b/engine/events/bug_contest/caught_mon.asm
index b2cc044a..533eae2b 100644
--- a/engine/events/bug_contest/caught_mon.asm
+++ b/engine/events/bug_contest/caught_mon.asm
@@ -2,7 +2,7 @@ BugContest_SetCaughtContestMon:
ld a, [wContestMon]
and a
jr z, .firstcatch
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
farcall DisplayAlreadyCaughtText
farcall DisplayCaughtContestMonStats
lb bc, 14, 7
@@ -12,7 +12,7 @@ BugContest_SetCaughtContestMon:
.firstcatch
call .generatestats
ld a, [wTempEnemyMonSpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, .ContestCaughtMonText
call PrintText
diff --git a/engine/events/bug_contest/display_stats.asm b/engine/events/bug_contest/display_stats.asm
index bfa6d90b..2507dfab 100644
--- a/engine/events/bug_contest/display_stats.asm
+++ b/engine/events/bug_contest/display_stats.asm
@@ -36,7 +36,7 @@ DisplayCaughtContestMonStats:
call PlaceString
ld a, [wContestMon]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld de, wStringBuffer1
hlcoord 1, 2
diff --git a/engine/events/bug_contest/judging.asm b/engine/events/bug_contest/judging.asm
index da48eb96..e0eca385 100644
--- a/engine/events/bug_contest/judging.asm
+++ b/engine/events/bug_contest/judging.asm
@@ -4,21 +4,21 @@ _BugContestJudging:
ld a, [wBugContestThirdPlaceWinnerID]
call LoadContestantName
ld a, [wBugContestThirdPlaceMon]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, ContestJudging_ThirdPlaceText
call PrintText
ld a, [wBugContestSecondPlaceWinnerID]
call LoadContestantName
ld a, [wBugContestSecondPlaceMon]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, ContestJudging_SecondPlaceText
call PrintText
ld a, [wBugContestFirstPlaceWinnerID]
call LoadContestantName
ld a, [wBugContestFirstPlaceMon]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, ContestJudging_FirstPlaceText
call PrintText
diff --git a/engine/events/haircut.asm b/engine/events/haircut.asm
index 32043af1..d03e6a09 100644
--- a/engine/events/haircut.asm
+++ b/engine/events/haircut.asm
@@ -3,7 +3,7 @@ BillsGrandfather:
jr c, .cancel
ld a, [wCurPartySpecies]
ld [wScriptVar], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
jp CopyPokemonName_Buffer1_Buffer3
diff --git a/engine/events/halloffame.asm b/engine/events/halloffame.asm
index acc73d48..cbce608c 100644
--- a/engine/events/halloffame.asm
+++ b/engine/events/halloffame.asm
@@ -459,7 +459,7 @@ DisplayHOFMon:
call Textbox
ld a, [wTempMonSpecies]
ld [wCurPartySpecies], a
- ld [wDeciramBuffer], a
+ ld [wTextDecimalByte], a
ld hl, wTempMonDVs
predef GetUnownLetter
xor a
@@ -474,7 +474,7 @@ DisplayHOFMon:
ld [hli], a
ld [hl], "."
hlcoord 3, 13
- ld de, wDeciramBuffer
+ ld de, wTextDecimalByte
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
call PrintNum
call GetBasePokemonName
diff --git a/engine/events/happiness_egg.asm b/engine/events/happiness_egg.asm
index bb2e949c..ac3e165b 100644
--- a/engine/events/happiness_egg.asm
+++ b/engine/events/happiness_egg.asm
@@ -11,7 +11,7 @@ GetFirstPokemonHappiness:
jr .loop
.done
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld a, [hl]
ld [wScriptVar], a
call GetPokemonName
@@ -19,7 +19,7 @@ GetFirstPokemonHappiness:
CheckFirstMonIsEgg:
ld a, [wPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
cp EGG
ld a, TRUE
jr z, .egg
diff --git a/engine/events/lucky_number.asm b/engine/events/lucky_number.asm
index 8f4e7fdc..e4189245 100644
--- a/engine/events/lucky_number.asm
+++ b/engine/events/lucky_number.asm
@@ -110,7 +110,7 @@ CheckForLuckyNumberWinners:
and a
push af
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, .LuckyNumberMatchPartyText
pop af
diff --git a/engine/events/misc_scripts.asm b/engine/events/misc_scripts.asm
index e9006332..24e4088e 100644
--- a/engine/events/misc_scripts.asm
+++ b/engine/events/misc_scripts.asm
@@ -39,14 +39,14 @@ FindItemInBallScript::
xor a
ld [wScriptVar], a
ld a, [wItemBallItemID]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld hl, wStringBuffer3
call CopyName2
ld a, [wItemBallItemID]
ld [wCurItem], a
ld a, [wItemBallQuantity]
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld hl, wNumItems
call ReceiveItem
ret nc
diff --git a/engine/events/mom_phone.asm b/engine/events/mom_phone.asm
index 697a47a6..930eaac1 100644
--- a/engine/events/mom_phone.asm
+++ b/engine/events/mom_phone.asm
@@ -146,7 +146,7 @@ Mom_GiveItemOrDoll:
ld a, [hl]
ld [wCurItem], a
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld hl, wNumPCItems
call ReceiveItem
ret
diff --git a/engine/events/move_deleter.asm b/engine/events/move_deleter.asm
index f9f83fab..2d6841e4 100644
--- a/engine/events/move_deleter.asm
+++ b/engine/events/move_deleter.asm
@@ -28,7 +28,7 @@ MoveDeletion:
ld a, [wMenuCursorY]
push af
ld a, [wCurSpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetMoveName
ld hl, .AskDeleteMoveText
call PrintText
diff --git a/engine/events/name_rater.asm b/engine/events/name_rater.asm
index e2b24c4c..d3a1dc58 100644
--- a/engine/events/name_rater.asm
+++ b/engine/events/name_rater.asm
@@ -29,7 +29,7 @@ _NameRater:
xor a ; PARTYMON
ld [wMonType], a
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld [wCurSpecies], a
call GetBaseData
ld b, NAME_MON
diff --git a/engine/events/npc_trade.asm b/engine/events/npc_trade.asm
index 94773f2f..b4393ebd 100644
--- a/engine/events/npc_trade.asm
+++ b/engine/events/npc_trade.asm
@@ -21,7 +21,7 @@ NPCTrade::
jr c, .done
ld e, NPCTRADE_GIVEMON
- call GetTradeAttribute
+ call GetTradeAttr
ld a, [wCurPartySpecies]
cp [hl]
ld a, TRADE_DIALOG_WRONG
@@ -72,7 +72,7 @@ CheckTradeGender:
ld [wMonType], a
ld e, NPCTRADE_GENDER
- call GetTradeAttribute
+ call GetTradeAttr
ld a, [hl]
and a ; TRADE_GENDER_EITHER
jr z, .matching
@@ -106,19 +106,19 @@ TradeFlagAction:
Trade_GetDialog:
ld e, NPCTRADE_DIALOG
- call GetTradeAttribute
+ call GetTradeAttr
ld a, [hl]
ld [wTradeDialog], a
ret
DoNPCTrade:
ld e, NPCTRADE_GIVEMON
- call GetTradeAttribute
+ call GetTradeAttr
ld a, [hl]
ld [wPlayerTrademonSpecies], a
ld e, NPCTRADE_GETMON
- call GetTradeAttribute
+ call GetTradeAttr
ld a, [hl]
ld [wOTTrademonSpecies], a
@@ -168,7 +168,7 @@ DoNPCTrade:
predef TryAddMonToParty
ld e, NPCTRADE_NICK
- call GetTradeAttribute
+ call GetTradeAttr
ld de, wOTTrademonNickname
call CopyTradeName
@@ -179,7 +179,7 @@ DoNPCTrade:
call CopyTradeName
ld e, NPCTRADE_OT_NAME
- call GetTradeAttribute
+ call GetTradeAttr
push hl
ld de, wOTTrademonOTName
call CopyTradeName
@@ -194,7 +194,7 @@ DoNPCTrade:
call CopyTradeName
ld e, NPCTRADE_DVS
- call GetTradeAttribute
+ call GetTradeAttr
ld de, wOTTrademonDVs
call Trade_CopyTwoBytes
@@ -205,7 +205,7 @@ DoNPCTrade:
call Trade_CopyTwoBytes
ld e, NPCTRADE_OT_ID
- call GetTradeAttribute
+ call GetTradeAttr
ld de, wOTTrademonID + 1
call Trade_CopyTwoBytesReverseEndian
@@ -216,7 +216,7 @@ DoNPCTrade:
call Trade_CopyTwoBytes
ld e, NPCTRADE_ITEM
- call GetTradeAttribute
+ call GetTradeAttr
push hl
ld hl, wPartyMon1Item
ld bc, PARTYMON_STRUCT_LENGTH
@@ -243,7 +243,7 @@ DoNPCTrade:
pop af
ret
-GetTradeAttribute:
+GetTradeAttr:
ld d, 0
push de
ld a, [wJumptableIndex]
@@ -273,7 +273,7 @@ Trade_GetAttributeOfLastPartymon:
GetTradeMonName:
push de
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetBasePokemonName
ld hl, wStringBuffer1
pop de
@@ -316,7 +316,7 @@ Trade_CopyTwoBytesReverseEndian:
GetTradeMonNames:
ld e, NPCTRADE_GETMON
- call GetTradeAttribute
+ call GetTradeAttr
ld a, [hl]
call GetTradeMonName
@@ -324,7 +324,7 @@ GetTradeMonNames:
call CopyTradeName
ld e, NPCTRADE_GIVEMON
- call GetTradeAttribute
+ call GetTradeAttr
ld a, [hl]
call GetTradeMonName
@@ -340,7 +340,7 @@ GetTradeMonNames:
dec hl
push hl
ld e, NPCTRADE_GENDER
- call GetTradeAttribute
+ call GetTradeAttr
ld a, [hl]
pop hl
and a ; TRADE_GENDER_EITHER
diff --git a/engine/events/pokecenter_pc.asm b/engine/events/pokecenter_pc.asm
index 74645a92..9a8a3334 100644
--- a/engine/events/pokecenter_pc.asm
+++ b/engine/events/pokecenter_pc.asm
@@ -342,13 +342,13 @@ PlayerWithdrawItemMenu:
.Submenu:
; check if the item has a quantity
farcall _CheckTossableItem
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
and a
jr z, .askquantity
; items without quantity are always ×1
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
jr .withdraw
.askquantity
@@ -360,15 +360,15 @@ PlayerWithdrawItemMenu:
jr c, .done
.withdraw
- ld a, [wItemQuantityChangeBuffer]
- ld [wPCItemQuantityChangeBuffer], a
+ ld a, [wItemQuantityChange]
+ ld [wPCItemQuantityChange], a
ld a, [wCurItemQuantity]
ld [wPCItemQuantity], a
ld hl, wNumItems
call ReceiveItem
jr nc, .PackFull
- ld a, [wPCItemQuantityChangeBuffer]
- ld [wItemQuantityChangeBuffer], a
+ ld a, [wPCItemQuantityChange]
+ ld [wItemQuantityChange], a
ld a, [wPCItemQuantity]
ld [wCurItemQuantity], a
ld hl, wNumPCItems
@@ -469,7 +469,7 @@ PlayerDepositItemMenu:
ld a, FALSE
ld [wSpriteUpdatesEnabled], a
farcall CheckItemMenu
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
ld hl, .dw
rst JumpTable
pop af
@@ -490,7 +490,7 @@ PlayerDepositItemMenu:
ret
.tossable
- ld a, [wPCItemQuantityChangeBuffer]
+ ld a, [wPCItemQuantityChange]
push af
ld a, [wPCItemQuantity]
push af
@@ -498,16 +498,16 @@ PlayerDepositItemMenu:
pop af
ld [wPCItemQuantity], a
pop af
- ld [wPCItemQuantityChangeBuffer], a
+ ld [wPCItemQuantityChange], a
ret
.DepositItem:
farcall _CheckTossableItem
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
and a
jr z, .AskQuantity
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
jr .ContinueDeposit
.AskQuantity:
@@ -521,15 +521,15 @@ PlayerDepositItemMenu:
jr c, .DeclinedToDeposit
.ContinueDeposit:
- ld a, [wItemQuantityChangeBuffer]
- ld [wPCItemQuantityChangeBuffer], a
+ ld a, [wItemQuantityChange]
+ ld [wPCItemQuantityChange], a
ld a, [wCurItemQuantity]
ld [wPCItemQuantity], a
ld hl, wNumPCItems
call ReceiveItem
jr nc, .NoRoomInPC
- ld a, [wPCItemQuantityChangeBuffer]
- ld [wItemQuantityChangeBuffer], a
+ ld a, [wPCItemQuantityChange]
+ ld [wItemQuantityChange], a
ld a, [wPCItemQuantity]
ld [wCurItemQuantity], a
ld hl, wNumItems
@@ -580,7 +580,7 @@ PCItemsJoypad:
ld c, 18
call Textbox
ld a, [wPCItemsCursor]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, [wPCItemsScrollPosition]
ld [wMenuScrollPosition], a
call ScrollingMenu
diff --git a/engine/events/specials.asm b/engine/events/specials.asm
index efa99822..913bf0bc 100644
--- a/engine/events/specials.asm
+++ b/engine/events/specials.asm
@@ -28,7 +28,7 @@ GameCornerPrizeMonCheckDex:
call SetSeenAndCaughtMon
call FadeToMenu
ld a, [wScriptVar]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
farcall NewPokedexEntry
call ExitAllMenus
ret
@@ -142,7 +142,7 @@ GetMysteryGiftItem:
ld a, [sMysteryGiftItem]
ld [wCurItem], a
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld hl, wNumItems
call ReceiveItem
jr nc, .no_room
@@ -150,7 +150,7 @@ GetMysteryGiftItem:
ld [sMysteryGiftItem], a
call CloseSRAM
ld a, [wCurItem]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld hl, .ReceiveItemText
call PrintText
@@ -350,7 +350,7 @@ SelectApricornForKurt:
ret z
ld [wCurItem], a
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld hl, wNumItems
call TossItem
ret
diff --git a/engine/items/buy_sell_toss.asm b/engine/items/buy_sell_toss.asm
index 07aaaf38..da9b5ef6 100644
--- a/engine/items/buy_sell_toss.asm
+++ b/engine/items/buy_sell_toss.asm
@@ -28,7 +28,7 @@ SelectQuantityToSell:
Toss_Sell_Loop:
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
.loop
call BuySellToss_UpdateQuantityDisplay ; update display
call BuySellToss_InterpretJoypad ; joy action
@@ -70,10 +70,10 @@ BuySellToss_InterpretJoypad:
ret
.down
- ld hl, wItemQuantityChangeBuffer
+ ld hl, wItemQuantityChange
dec [hl]
jr nz, .finish_down
- ld a, [wItemQuantityBuffer]
+ ld a, [wItemQuantity]
ld [hl], a
.finish_down
@@ -81,9 +81,9 @@ BuySellToss_InterpretJoypad:
ret
.up
- ld hl, wItemQuantityChangeBuffer
+ ld hl, wItemQuantityChange
inc [hl]
- ld a, [wItemQuantityBuffer]
+ ld a, [wItemQuantity]
cp [hl]
jr nc, .finish_up
ld [hl], 1
@@ -93,7 +93,7 @@ BuySellToss_InterpretJoypad:
ret
.left
- ld a, [wItemQuantityChangeBuffer]
+ ld a, [wItemQuantityChange]
sub 10
jr c, .load_1
jr z, .load_1
@@ -103,22 +103,22 @@ BuySellToss_InterpretJoypad:
ld a, 1
.finish_left
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
and a
ret
.right
- ld a, [wItemQuantityChangeBuffer]
+ ld a, [wItemQuantityChange]
add 10
ld b, a
- ld a, [wItemQuantityBuffer]
+ ld a, [wItemQuantity]
cp b
jr nc, .finish_right
ld b, a
.finish_right
ld a, b
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
and a
ret
@@ -129,7 +129,7 @@ BuySellToss_UpdateQuantityDisplay:
add hl, de
ld [hl], "×"
inc hl
- ld de, wItemQuantityChangeBuffer
+ ld de, wItemQuantityChange
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
call PrintNum
ld a, [wMenuDataPointer]
@@ -161,7 +161,7 @@ BuySell_MultiplyPrice:
ldh [hMultiplicand + 1], a
ld a, [wBuySellItemPrice + 1]
ldh [hMultiplicand + 2], a
- ld a, [wItemQuantityChangeBuffer]
+ ld a, [wItemQuantityChange]
ldh [hMultiplier], a
push hl
call Multiply
diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm
index ee65a29a..9f8c14c3 100644
--- a/engine/items/item_effects.asm
+++ b/engine/items/item_effects.asm
@@ -1,6 +1,6 @@
_DoItemEffect::
ld a, [wCurItem]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
call CopyName1
ld a, 1
@@ -556,7 +556,7 @@ PokeBallEffect:
call PrintText
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
call YesNoBox
@@ -614,7 +614,7 @@ PokeBallEffect:
call PrintText
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
call YesNoBox
@@ -690,7 +690,7 @@ PokeBallEffect:
.toss
ld hl, wNumItems
inc a
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
jp TossItem
.used_park_ball
@@ -2295,7 +2295,7 @@ RestorePPEffect:
push hl
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetMoveName
call CopyName1
pop hl
@@ -2556,7 +2556,7 @@ UseItemText:
UseDisposableItem:
ld hl, wNumItems
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
jp TossItem
UseBallInTrainerBattle:
diff --git a/engine/items/items.asm b/engine/items/items.asm
index cfdd4a4c..1f9cb443 100644
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -4,7 +4,7 @@ _ReceiveItem::
push hl
call CheckItemPocket
pop de
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
dec a
ld hl, .Pockets
rst JumpTable
@@ -45,7 +45,7 @@ _TossItem::
push hl
call CheckItemPocket
pop de
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
dec a
ld hl, .Pockets
rst JumpTable
@@ -88,7 +88,7 @@ _CheckItem::
push hl
call CheckItemPocket
pop de
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
dec a
ld hl, .Pockets
rst JumpTable
@@ -172,7 +172,7 @@ PutItemInPocket:
sub [hl]
add b
ld b, a
- ld a, [wItemQuantityChangeBuffer]
+ ld a, [wItemQuantityChange]
cp b
jr z, .ok
jr c, .ok
@@ -194,8 +194,8 @@ PutItemInPocket:
ld l, e
ld a, [wCurItem]
ld c, a
- ld a, [wItemQuantityChangeBuffer]
- ld [wItemQuantityBuffer], a
+ ld a, [wItemQuantityChange]
+ ld [wItemQuantity], a
.loop2
inc hl
ld a, [hli]
@@ -203,7 +203,7 @@ PutItemInPocket:
jr z, .terminator2
cp c
jr nz, .loop2
- ld a, [wItemQuantityBuffer]
+ ld a, [wItemQuantity]
add [hl]
cp MAX_ITEM_STACK + 1
jr nc, .newstack
@@ -213,14 +213,14 @@ PutItemInPocket:
.newstack
ld [hl], MAX_ITEM_STACK
sub MAX_ITEM_STACK
- ld [wItemQuantityBuffer], a
+ ld [wItemQuantity], a
jr .loop2
.terminator2
dec hl
ld a, [wCurItem]
ld [hli], a
- ld a, [wItemQuantityBuffer]
+ ld a, [wItemQuantity]
ld [hli], a
ld [hl], -1
ld h, d
@@ -264,13 +264,13 @@ RemoveItemFromPocket:
jr .loop
.skip
- ld a, [wItemQuantityChangeBuffer]
+ ld a, [wItemQuantityChange]
ld b, a
ld a, [hl]
sub b
jr c, .nope
ld [hl], a
- ld [wItemQuantityBuffer], a
+ ld [wItemQuantity], a
and a
jr nz, .yup
dec hl
@@ -406,7 +406,7 @@ ReceiveTMHM:
ld b, 0
ld hl, wTMsHMs
add hl, bc
- ld a, [wItemQuantityChangeBuffer]
+ ld a, [wItemQuantityChange]
add [hl]
cp MAX_ITEM_STACK + 1
jr nc, .toomany
@@ -423,13 +423,13 @@ TossTMHM:
ld b, 0
ld hl, wTMsHMs
add hl, bc
- ld a, [wItemQuantityChangeBuffer]
+ ld a, [wItemQuantityChange]
ld b, a
ld a, [hl]
sub b
jr c, .nope
ld [hl], a
- ld [wItemQuantityBuffer], a
+ ld [wItemQuantity], a
jr nz, .yup
ld a, [wTMHMPocketScrollPosition]
and a
@@ -492,7 +492,7 @@ GetNumberedTMHM:
ret
_CheckTossableItem::
-; Return 1 in wItemAttributeParamBuffer and carry if wCurItem can't be removed from the bag.
+; Return 1 in wItemAttributeValue and carry if wCurItem can't be removed from the bag.
ld a, ITEMATTR_PERMISSIONS
call GetItemAttr
bit CANT_TOSS_F, a
@@ -501,7 +501,7 @@ _CheckTossableItem::
ret
CheckSelectableItem:
-; Return 1 in wItemAttributeParamBuffer and carry if wCurItem can't be selected.
+; Return 1 in wItemAttributeValue and carry if wCurItem can't be selected.
ld a, ITEMATTR_PERMISSIONS
call GetItemAttr
bit CANT_SELECT_F, a
@@ -510,28 +510,28 @@ CheckSelectableItem:
ret
CheckItemPocket::
-; Return the pocket for wCurItem in wItemAttributeParamBuffer.
+; Return the pocket for wCurItem in wItemAttributeValue.
ld a, ITEMATTR_POCKET
call GetItemAttr
and $f
- ld [wItemAttributeParamBuffer], a
+ ld [wItemAttributeValue], a
ret
CheckItemContext:
-; Return the context for wCurItem in wItemAttributeParamBuffer.
+; Return the context for wCurItem in wItemAttributeValue.
ld a, ITEMATTR_HELP
call GetItemAttr
and $f
- ld [wItemAttributeParamBuffer], a
+ ld [wItemAttributeValue], a
ret
CheckItemMenu:
-; Return the menu for wCurItem in wItemAttributeParamBuffer.
+; Return the menu for wCurItem in wItemAttributeValue.
ld a, ITEMATTR_HELP
call GetItemAttr
swap a
and $f
- ld [wItemAttributeParamBuffer], a
+ ld [wItemAttributeValue], a
ret
GetItemAttr:
@@ -546,7 +546,7 @@ GetItemAttr:
add hl, bc
xor a
- ld [wItemAttributeParamBuffer], a
+ ld [wItemAttributeValue], a
ld a, [wCurItem]
dec a
@@ -562,7 +562,7 @@ GetItemAttr:
ItemAttr_ReturnCarry:
ld a, 1
- ld [wItemAttributeParamBuffer], a
+ ld [wItemAttributeValue], a
scf
ret
diff --git a/engine/items/mart.asm b/engine/items/mart.asm
index 2ab56231..232ff35d 100644
--- a/engine/items/mart.asm
+++ b/engine/items/mart.asm
@@ -316,7 +316,7 @@ BuyMenu:
xor a
ld [wMenuScrollPositionBackup], a
ld a, 1
- ld [wMenuCursorBufferBackup], a
+ ld [wMenuCursorPositionBackup], a
.loop
call BuyMenuLoop ; menu loop
jr nc, .loop
@@ -405,15 +405,15 @@ BuyMenuLoop:
call UpdateSprites
ld hl, MenuHeader_Buy
call CopyMenuHeader
- ld a, [wMenuCursorBufferBackup]
- ld [wMenuCursorBuffer], a
+ ld a, [wMenuCursorPositionBackup]
+ ld [wMenuCursorPosition], a
ld a, [wMenuScrollPositionBackup]
ld [wMenuScrollPosition], a
call ScrollingMenu
ld a, [wMenuScrollPosition]
ld [wMenuScrollPositionBackup], a
ld a, [wMenuCursorY]
- ld [wMenuCursorBufferBackup], a
+ ld [wMenuCursorPositionBackup], a
call SpeechTextbox
ld a, [wMenuJoypad]
cp B_BUTTON
@@ -473,7 +473,7 @@ BuyMenuLoop:
StandardMartAskPurchaseQuantity:
ld a, MAX_ITEM_STACK
- ld [wItemQuantityBuffer], a
+ ld [wItemQuantity], a
ld a, MARTTEXT_HOW_MANY
call LoadBuyMenuText
farcall SelectQuantityToBuy
@@ -489,7 +489,7 @@ MartConfirmPurchase:
BargainShopAskPurchaseQuantity:
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld a, [wMartItemID]
ld e, a
ld d, 0
@@ -680,7 +680,7 @@ SellMenu:
.TryToSellItem:
farcall CheckItemMenu
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
ld hl, .dw
rst JumpTable
ret
@@ -699,7 +699,7 @@ SellMenu:
.try_sell
farcall _CheckTossableItem
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
and a
jr z, .okay_to_sell
ld hl, MartCantBuyText
diff --git a/engine/items/pack.asm b/engine/items/pack.asm
index 994c7c5a..0479fb3c 100644
--- a/engine/items/pack.asm
+++ b/engine/items/pack.asm
@@ -74,7 +74,7 @@ Pack:
ld hl, ItemsPocketMenuHeader
call CopyMenuHeader
ld a, [wItemsPocketCursor]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, [wItemsPocketScrollPosition]
ld [wMenuScrollPosition], a
call ScrollingMenu
@@ -102,7 +102,7 @@ Pack:
ld hl, KeyItemsPocketMenuHeader
call CopyMenuHeader
ld a, [wKeyItemsPocketCursor]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, [wKeyItemsPocketScrollPosition]
ld [wMenuScrollPosition], a
call ScrollingMenu
@@ -135,7 +135,7 @@ Pack:
call Pack_InterpretJoypad
ret c
farcall _CheckTossableItem
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
and a
jr nz, .use_quit
ld hl, .MenuHeader2
@@ -224,7 +224,7 @@ Pack:
ld hl, BallsPocketMenuHeader
call CopyMenuHeader
ld a, [wBallsPocketCursor]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, [wBallsPocketScrollPosition]
ld [wMenuScrollPosition], a
call ScrollingMenu
@@ -241,29 +241,29 @@ Pack:
.ItemBallsKey_LoadSubmenu:
farcall _CheckTossableItem
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
and a
jr nz, .tossable
farcall CheckSelectableItem
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
and a
jr nz, .selectable
farcall CheckItemMenu
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
and a
jr nz, .usable
jr .unusable
.selectable
farcall CheckItemMenu
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
and a
jr nz, .selectable_usable
jr .selectable_unusable
.tossable
farcall CheckSelectableItem
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
and a
jr nz, .tossable_selectable
jr .tossable_unselectable
@@ -424,7 +424,7 @@ Jumptable_GiveTossQuit:
UseItem:
farcall CheckItemMenu
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
ld hl, .dw
rst JumpTable
ret
@@ -529,7 +529,7 @@ ResetPocketCursorPositions: ; unreferenced
RegisterItem:
farcall CheckSelectableItem
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
and a
jr nz, .cant_register
ld a, [wCurPocket]
@@ -683,7 +683,7 @@ BattlePack:
ld hl, ItemsPocketMenuHeader
call CopyMenuHeader
ld a, [wItemsPocketCursor]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, [wItemsPocketScrollPosition]
ld [wMenuScrollPosition], a
call ScrollingMenu
@@ -711,7 +711,7 @@ BattlePack:
ld hl, KeyItemsPocketMenuHeader
call CopyMenuHeader
ld a, [wKeyItemsPocketCursor]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, [wKeyItemsPocketScrollPosition]
ld [wMenuScrollPosition], a
call ScrollingMenu
@@ -762,7 +762,7 @@ BattlePack:
ld hl, BallsPocketMenuHeader
call CopyMenuHeader
ld a, [wBallsPocketCursor]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, [wBallsPocketScrollPosition]
ld [wMenuScrollPosition], a
call ScrollingMenu
@@ -779,7 +779,7 @@ BattlePack:
ItemSubmenu:
farcall CheckItemContext
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
TMHMSubmenu:
and a
jr z, .NoUse
@@ -834,7 +834,7 @@ TMHMSubmenu:
.Use:
farcall CheckItemContext
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
ld hl, .ItemFunctionJumptable
rst JumpTable
ret
@@ -951,7 +951,7 @@ DepositSellPack:
ld hl, PC_Mart_ItemsPocketMenuHeader
call CopyMenuHeader
ld a, [wItemsPocketCursor]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, [wItemsPocketScrollPosition]
ld [wMenuScrollPosition], a
call ScrollingMenu
@@ -967,7 +967,7 @@ DepositSellPack:
ld hl, PC_Mart_KeyItemsPocketMenuHeader
call CopyMenuHeader
ld a, [wKeyItemsPocketCursor]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, [wKeyItemsPocketScrollPosition]
ld [wMenuScrollPosition], a
call ScrollingMenu
@@ -992,7 +992,7 @@ DepositSellPack:
ld hl, PC_Mart_BallsPocketMenuHeader
call CopyMenuHeader
ld a, [wBallsPocketCursor]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, [wBallsPocketScrollPosition]
ld [wMenuScrollPosition], a
call ScrollingMenu
@@ -1404,7 +1404,7 @@ INCBIN "gfx/pack/pack_menu.tilemap"
Pack_GetItemName:
ld a, [wCurItem]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
call CopyName1
ret
diff --git a/engine/items/tmhm.asm b/engine/items/tmhm.asm
index e8cbbb00..c240282f 100644
--- a/engine/items/tmhm.asm
+++ b/engine/items/tmhm.asm
@@ -15,7 +15,7 @@ TMHMPocket:
ld b, 0
add hl, bc
ld a, [hl]
- ld [wItemQuantityBuffer], a
+ ld [wItemQuantity], a
call .ConvertItemToTMHMNumber
scf
ret
@@ -375,7 +375,7 @@ TMHM_DisplayPocketItems:
ld [wTempTMHM], a
.okay
predef GetTMHMMove
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
ld [wPutativeTMHMMove], a
call GetMoveName
pop hl
diff --git a/engine/link/init_list.asm b/engine/link/init_list.asm
index 3e16d349..8f578476 100644
--- a/engine/link/init_list.asm
+++ b/engine/link/init_list.asm
@@ -38,7 +38,7 @@ InitList:
ld de, ItemNames
ld a, ITEM_NAME
.done
- ld [wNamedObjectTypeBuffer], a
+ ld [wNamedObjectType], a
ld a, l
ld [wListPointer], a
ld a, h
@@ -49,7 +49,7 @@ InitList:
ld [wUnusedNamesPointer + 1], a
ld bc, ItemAttributes
ld a, c
- ld [wItemAttributesPtr], a
+ ld [wItemAttributesPointer], a
ld a, b
- ld [wItemAttributesPtr + 1], a
+ ld [wItemAttributesPointer + 1], a
ret
diff --git a/engine/link/link.asm b/engine/link/link.asm
index 90dda4b9..3dc46e50 100644
--- a/engine/link/link.asm
+++ b/engine/link/link.asm
@@ -898,7 +898,7 @@ Link_ConvertPartyStruct1to2:
ld d, h
ld e, l
ld bc, wLinkOTPartyMonTypes
- ld hl, wCurLinkOTPartyMonTypePtr
+ ld hl, wCurLinkOTPartyMonTypePointer
ld a, c
ld [hli], a
ld [hl], b
@@ -948,7 +948,7 @@ Link_ConvertPartyStruct1to2:
ld a, [de]
inc de
ld [hl], a
- ld hl, wCurLinkOTPartyMonTypePtr
+ ld hl, wCurLinkOTPartyMonTypePointer
ld a, [hli]
ld h, [hl]
ld l, a
@@ -959,9 +959,9 @@ Link_ConvertPartyStruct1to2:
ld [hli], a
inc de
ld a, l
- ld [wCurLinkOTPartyMonTypePtr], a
+ ld [wCurLinkOTPartyMonTypePointer], a
ld a, h
- ld [wCurLinkOTPartyMonTypePtr + 1], a
+ ld [wCurLinkOTPartyMonTypePointer + 1], a
push bc
ld hl, MON_ITEM
add hl, bc
@@ -1382,7 +1382,7 @@ LinkTrade_TradeStatsMenu:
ld b, 0
add hl, bc
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
hlcoord 0, 12
ld b, 4
@@ -1525,7 +1525,7 @@ LinkTrade:
ld b, 0
add hl, bc
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
ld de, wBufferTrademonNick
@@ -1537,7 +1537,7 @@ LinkTrade:
ld b, 0
add hl, bc
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, LinkAskTradeForText
bccoord 1, 14
@@ -1989,14 +1989,14 @@ CheckTimeCapsuleCompatibility:
jr .done
.mon_too_new
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld a, $1
jr .done
.move_too_new
push bc
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetMoveName
call CopyName1
pop bc
@@ -2022,7 +2022,7 @@ GetIncompatibleMonName:
ld hl, wPartyCount
add hl, bc
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ret
diff --git a/engine/link/mystery_gift.asm b/engine/link/mystery_gift.asm
index e3fef8dd..c4cf3613 100644
--- a/engine/link/mystery_gift.asm
+++ b/engine/link/mystery_gift.asm
@@ -118,7 +118,7 @@ DoMysteryGift:
farcall MysteryGiftGetItem
ld a, c
ld [sBackupMysteryGiftItem], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call CloseSRAM
call GetItemName
ld hl, .MysteryGiftSentText ; sent item/decoration
diff --git a/engine/link/time_capsule.asm b/engine/link/time_capsule.asm
index 3c1cfb5f..e7285a5e 100644
--- a/engine/link/time_capsule.asm
+++ b/engine/link/time_capsule.asm
@@ -118,7 +118,7 @@ PlaceTradePartnerNamesAndParty:
ld a, [de]
cp -1
ret z
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
push bc
push hl
push de
diff --git a/engine/menus/menu.asm b/engine/menus/menu.asm
index 72dd6b41..7ff696c9 100644
--- a/engine/menus/menu.asm
+++ b/engine/menus/menu.asm
@@ -32,7 +32,7 @@ _2DMenu_::
ld c, a
ld a, [wMenuCursorX]
add c
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
and a
ret
@@ -113,7 +113,7 @@ Init2DMenuCursorPosition:
call .InitFlags_c
ld a, [w2DMenuNumCols]
ld e, a
- ld a, [wMenuCursorBuffer]
+ ld a, [wMenuCursorPosition]
ld b, a
xor a
ld d, 0
@@ -653,7 +653,7 @@ _InitVerticalMenuCursor::
.skip_bit_1
ld [hli], a
; wMenuCursorY
- ld a, [wMenuCursorBuffer]
+ ld a, [wMenuCursorPosition]
and a
jr z, .load_at_the_top
ld c, a
diff --git a/engine/menus/menu_2.asm b/engine/menus/menu_2.asm
index a0af3223..ea94f67b 100644
--- a/engine/menus/menu_2.asm
+++ b/engine/menus/menu_2.asm
@@ -1,7 +1,7 @@
PlaceMenuItemName:
push de
ld a, [wMenuSelection]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
pop hl
call PlaceString
@@ -12,7 +12,7 @@ PlaceMenuItemQuantity:
ld a, [wMenuSelection]
ld [wCurItem], a
farcall _CheckTossableItem
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
pop hl
and a
jr nz, .done
@@ -171,7 +171,7 @@ StartMenu_PrintBugContestStatus:
and a
ld de, .NoneString
jr z, .no_contest_mon
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
.no_contest_mon
diff --git a/engine/menus/naming_screen.asm b/engine/menus/naming_screen.asm
index befc0af3..63e97773 100644
--- a/engine/menus/naming_screen.asm
+++ b/engine/menus/naming_screen.asm
@@ -91,7 +91,7 @@ NamingScreen:
ld e, MONICON_NAMINGSCREEN
rst FarCall
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
hlcoord 5, 2
call PlaceString
diff --git a/engine/menus/scrolling_menu.asm b/engine/menus/scrolling_menu.asm
index 6a8d6fd4..3b674754 100644
--- a/engine/menus/scrolling_menu.asm
+++ b/engine/menus/scrolling_menu.asm
@@ -91,7 +91,7 @@ ScrollingMenuJoyAction:
ld a, [wMenuSelection]
ld [wCurItem], a
ld a, [wMenuSelectionQuantity]
- ld [wItemQuantityBuffer], a
+ ld [wItemQuantity], a
call ScrollingMenu_GetCursorPosition
dec a
ld [wScrollingMenuCursorPosition], a
@@ -238,7 +238,7 @@ InitScrollingMenuCursor:
.skip
ld a, [wMenuScrollPosition]
ld c, a
- ld a, [wMenuCursorBuffer]
+ ld a, [wMenuCursorPosition]
add c
ld b, a
ld a, [wScrollingMenuListSize]
@@ -251,7 +251,7 @@ InitScrollingMenuCursor:
xor a
ld [wMenuScrollPosition], a
ld a, $1
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
.done
ret
@@ -307,7 +307,7 @@ ScrollingMenu_InitFlags:
ld [wMenuJoypadFilter], a
ld a, [w2DMenuNumRows]
ld b, a
- ld a, [wMenuCursorBuffer]
+ ld a, [wMenuCursorPosition]
and a
jr z, .reset_cursor
cp b
diff --git a/engine/menus/start_menu.asm b/engine/menus/start_menu.asm
index 9d520592..42a39c7d 100644
--- a/engine/menus/start_menu.asm
+++ b/engine/menus/start_menu.asm
@@ -27,8 +27,8 @@ StartMenu::
.GotMenuData:
call LoadMenuHeader
call .SetUpMenuItems
- ld a, [wBattleMenuCursorBuffer]
- ld [wMenuCursorBuffer], a
+ ld a, [wBattleMenuCursorPosition]
+ ld [wMenuCursorPosition], a
call .DrawMenuAccount
call DrawVariableLengthMenuBox
call .DrawBugContestStatusBox
@@ -43,15 +43,15 @@ StartMenu::
call UpdateSprites
call UpdateTimePals
call .SetUpMenuItems
- ld a, [wBattleMenuCursorBuffer]
- ld [wMenuCursorBuffer], a
+ ld a, [wBattleMenuCursorPosition]
+ ld [wMenuCursorPosition], a
.Select:
call .GetInput
jr c, .Exit
call ._DrawMenuAccount
- ld a, [wMenuCursorBuffer]
- ld [wBattleMenuCursorBuffer], a
+ ld a, [wMenuCursorPosition]
+ ld [wBattleMenuCursorPosition], a
call PlayClickSFX
call PlaceHollowCursor
call .OpenMenu
diff --git a/engine/movie/trade_animation.asm b/engine/movie/trade_animation.asm
index 97c2e9d6..1d6fda65 100644
--- a/engine/movie/trade_animation.asm
+++ b/engine/movie/trade_animation.asm
@@ -806,7 +806,7 @@ TradeAnim_GetFrontpic:
TradeAnim_GetNickname:
push de
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
pop de
diff --git a/engine/overworld/decorations.asm b/engine/overworld/decorations.asm
index 24cf578a..e8baea19 100644
--- a/engine/overworld/decorations.asm
+++ b/engine/overworld/decorations.asm
@@ -16,7 +16,7 @@ _PlayerDecorationMenu:
ld [wCurDecorationCategory], a
.top_loop
ld a, [wCurDecorationCategory]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
call .FindCategoriesWithOwnedDecos
call DoNthMenu
ld a, [wMenuCursorY]
@@ -554,7 +554,7 @@ GetDecoName:
.getpokename
push bc
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
pop bc
jr .copy
diff --git a/engine/overworld/scripting.asm b/engine/overworld/scripting.asm
index 0ca066f3..b72b6099 100644
--- a/engine/overworld/scripting.asm
+++ b/engine/overworld/scripting.asm
@@ -137,7 +137,7 @@ ScriptCommandTable:
dw Script_opentext ; 47
dw Script_refreshscreen ; 48
dw Script_closetext ; 49
- dw Script_writeunusedbytebuffer ; 4a
+ dw Script_writeunusedbyte ; 4a
dw Script_farwritetext ; 4b
dw Script_writetext ; 4c
dw Script_repeattext ; 4d
@@ -415,7 +415,7 @@ Script__2dmenu:
ld a, [wScriptBank]
ld hl, _2DMenu
rst FarCall
- ld a, [wMenuCursorBuffer]
+ ld a, [wMenuCursorPosition]
jr nc, .ok
xor a
.ok
@@ -472,7 +472,7 @@ Script_pocketisfull:
Script_specialsound:
farcall CheckItemPocket
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
cp TM_HM
ld de, SFX_GET_TM
jr z, .play
@@ -484,7 +484,7 @@ Script_specialsound:
GetPocketName:
farcall CheckItemPocket
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
dec a
ld hl, ItemPocketNames
maskbits NUM_POCKETS
@@ -503,7 +503,7 @@ INCLUDE "data/items/pocket_names.asm"
CurItemName:
ld a, [wCurItem]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ret
@@ -1483,7 +1483,7 @@ Script_getmonname:
jr nz, .gotit
ld a, [wScriptVar]
.gotit
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld de, wStringBuffer1
@@ -1507,7 +1507,7 @@ Script_getitemname:
jr nz, .ok
ld a, [wScriptVar]
.ok
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld de, wStringBuffer1
jr GetStringBuffer
@@ -1612,7 +1612,7 @@ Script_giveitem:
.ok
ld [wCurItem], a
call GetScriptByte
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld hl, wNumItems
call ReceiveItem
jr nc, .full
@@ -1630,7 +1630,7 @@ Script_takeitem:
call GetScriptByte
ld [wCurItem], a
call GetScriptByte
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld a, -1
ld [wCurItemQuantity], a
ld hl, wNumItems
@@ -2082,9 +2082,9 @@ Script_refreshscreen:
call GetScriptByte
ret
-Script_writeunusedbytebuffer:
+Script_writeunusedbyte:
call GetScriptByte
- ld [wUnusedScriptByteBuffer], a
+ ld [wUnusedScriptByte], a
ret
UnusedClosetextScript: ; unreferenced
diff --git a/engine/overworld/select_menu.asm b/engine/overworld/select_menu.asm
index 18532eda..bdd3633e 100644
--- a/engine/overworld/select_menu.asm
+++ b/engine/overworld/select_menu.asm
@@ -109,7 +109,7 @@ CheckRegisteredItem:
UseRegisteredItem:
farcall CheckItemMenu
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
ld hl, .SwitchTo
rst JumpTable
ret
diff --git a/engine/overworld/time.asm b/engine/overworld/time.asm
index 1366815f..f72b653f 100644
--- a/engine/overworld/time.asm
+++ b/engine/overworld/time.asm
@@ -4,7 +4,7 @@ _InitializeStartDay:
ClearDailyTimers:
xor a
- ld [wLuckyNumberDayBuffer], a
+ ld [wLuckyNumberDayTimer], a
ld [wUnusedTwoDayTimer], a
ld [wDailyResetTimer], a
ret
@@ -190,7 +190,7 @@ UnusedCheckSwarmFlag: ; unreferenced
RestartLuckyNumberCountdown:
call .GetDaysUntilNextFriday
- ld hl, wLuckyNumberDayBuffer
+ ld hl, wLuckyNumberDayTimer
jp InitNDaysCountdown
.GetDaysUntilNextFriday:
@@ -208,7 +208,7 @@ RestartLuckyNumberCountdown:
ret
_CheckLuckyNumberShowFlag:
- ld hl, wLuckyNumberDayBuffer
+ ld hl, wLuckyNumberDayTimer
jp CheckDayDependentEventHL
DoMysteryGiftIfDayHasPassed:
diff --git a/engine/overworld/wildmons.asm b/engine/overworld/wildmons.asm
index 124a7bbf..fee9675c 100644
--- a/engine/overworld/wildmons.asm
+++ b/engine/overworld/wildmons.asm
@@ -28,7 +28,7 @@ LoadWildMonData:
FindNest:
; Parameters:
; e: 0 = Johto, 1 = Kanto
-; wNamedObjectIndexBuffer: species
+; wNamedObjectIndex: species
hlcoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
xor a
@@ -103,7 +103,7 @@ FindNest:
inc hl
.ScanMapLoop:
push af
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
cp [hl]
jr z, .found
inc hl
@@ -145,7 +145,7 @@ FindNest:
.RoamMon1:
ld a, [wRoamMon1Species]
ld b, a
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
cp b
ret nz
ld a, [wRoamMon1MapGroup]
@@ -161,7 +161,7 @@ FindNest:
.RoamMon2:
ld a, [wRoamMon2Species]
ld b, a
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
cp b
ret nz
ld a, [wRoamMon2MapGroup]
@@ -177,7 +177,7 @@ FindNest:
.RoamMon3:
ld a, [wRoamMon3Species]
ld b, a
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
cp b
ret nz
ld a, [wRoamMon3MapGroup]
@@ -827,7 +827,7 @@ RandomUnseenWildMon:
ld de, wStringBuffer1
call CopyName1
ld a, c
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, .JustSawSomeRareMonText
call PrintText
@@ -876,7 +876,7 @@ RandomPhoneWildMon:
add hl, bc
inc hl
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
ld de, wStringBuffer4
@@ -959,7 +959,7 @@ RandomPhoneMon:
inc hl ; species
ld a, BANK(Trainers)
call GetFarByte
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
ld de, wStringBuffer4
diff --git a/engine/pokedex/pokedex.asm b/engine/pokedex/pokedex.asm
index 85293010..d4933646 100644
--- a/engine/pokedex/pokedex.asm
+++ b/engine/pokedex/pokedex.asm
@@ -1493,7 +1493,8 @@ Pokedex_PrintListing:
.loop
push af
ld a, [de]
- ld [wTempSpecies], a ; also sets wNamedObjectIndexBuffer
+ ld [wTempSpecies], a ; also sets wNamedObjectIndex
+ assert wTempSpecies == wNamedObjectIndex
push de
push hl
call .PrintEntry
diff --git a/engine/pokegear/pokegear.asm b/engine/pokegear/pokegear.asm
index f7861f0b..acef7b42 100644
--- a/engine/pokegear/pokegear.asm
+++ b/engine/pokegear/pokegear.asm
@@ -1023,13 +1023,13 @@ PokegearPhone_UpdateDisplayList:
ld hl, wPhoneList
add hl, de
xor a
- ld [wPokegearPhoneLoadNameBuffer], a
+ ld [wPokegearPhoneDisplayPosition], a
.loop
ld a, [hli]
push hl
push af
hlcoord 2, 4
- ld a, [wPokegearPhoneLoadNameBuffer]
+ ld a, [wPokegearPhoneDisplayPosition]
ld bc, 2 * SCREEN_WIDTH
call AddNTimes
ld d, h
@@ -1038,9 +1038,9 @@ PokegearPhone_UpdateDisplayList:
ld b, a
call GetCallerClassAndName
pop hl
- ld a, [wPokegearPhoneLoadNameBuffer]
+ ld a, [wPokegearPhoneDisplayPosition]
inc a
- ld [wPokegearPhoneLoadNameBuffer], a
+ ld [wPokegearPhoneDisplayPosition], a
cp PHONE_DISPLAY_HEIGHT
jr c, .loop
call PokegearPhone_UpdateCursor
diff --git a/engine/pokegear/radio.asm b/engine/pokegear/radio.asm
index 459cf1ac..ef410d51 100644
--- a/engine/pokegear/radio.asm
+++ b/engine/pokegear/radio.asm
@@ -235,7 +235,7 @@ endr
inc hl ; skip level
ld a, BANK(JohtoGrassWildMons)
call GetFarByte
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld [wCurPartySpecies], a
call GetPokemonName
ld hl, wStringBuffer1
@@ -297,7 +297,7 @@ OPT_OakText3:
OaksPKMNTalk7:
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, OPT_MaryText1
ld a, OAKS_POKEMON_TALK_8
@@ -629,7 +629,7 @@ PokedexShow1:
inc c
ld a, c
ld [wCurPartySpecies], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, PokedexShowText
ld a, POKEDEX_SHOW_2
diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm
index 2ba4c48c..2902d9ef 100644
--- a/engine/pokemon/bills_pc.asm
+++ b/engine/pokemon/bills_pc.asm
@@ -130,7 +130,7 @@ _DepositPKMN:
ld hl, BillsPCDepositMenuHeader
call CopyMenuHeader
ld a, [wMenuCursorY]
- call StoreTo_wMenuCursorBuffer
+ call StoreMenuCursorPosition
call VerticalMenu
jp c, BillsPCDepositFuncCancel
ld a, [wMenuCursorY]
@@ -372,7 +372,7 @@ BillsPC_Withdraw:
ld hl, .MenuHeader
call CopyMenuHeader
ld a, [wMenuCursorY]
- call StoreTo_wMenuCursorBuffer
+ call StoreMenuCursorPosition
call VerticalMenu
jp c, .cancel
ld a, [wMenuCursorY]
@@ -623,7 +623,7 @@ _MovePKMNWithoutMail:
ld hl, .MenuHeader
call CopyMenuHeader
ld a, [wMenuCursorY]
- call StoreTo_wMenuCursorBuffer
+ call StoreMenuCursorPosition
call VerticalMenu
jp c, .Cancel
ld a, [wMenuCursorY]
@@ -2292,9 +2292,9 @@ BillsPC_PrintBoxCountAndCapacity:
ld de, .Pokemon
call PlaceString
call GetBoxCount
- ld [wDeciramBuffer], a
+ ld [wTextDecimalByte], a
hlcoord 13, 11
- ld de, wDeciramBuffer
+ ld de, wTextDecimalByte
lb bc, 1, 2
call PrintNum
ld de, .out_of_20
diff --git a/engine/pokemon/bills_pc_top.asm b/engine/pokemon/bills_pc_top.asm
index e4d82e41..1e4cf872 100644
--- a/engine/pokemon/bills_pc_top.asm
+++ b/engine/pokemon/bills_pc_top.asm
@@ -47,14 +47,14 @@ _BillsPC:
call LoadMenuHeader
ld a, $1
.loop
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
call SetPalettes
xor a
ld [wWhichIndexSet], a
ldh [hBGMapMode], a
call DoNthMenu
jr c, .cancel
- ld a, [wMenuCursorBuffer]
+ ld a, [wMenuCursorPosition]
push af
ld a, [wMenuSelection]
ld hl, .Jumptable
diff --git a/engine/pokemon/breeding.asm b/engine/pokemon/breeding.asm
index eba42c0c..4b68a1d3 100644
--- a/engine/pokemon/breeding.asm
+++ b/engine/pokemon/breeding.asm
@@ -248,7 +248,7 @@ HatchEggs:
ld a, [wCurPartySpecies]
dec de
ld [de], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld [wCurSpecies], a
call GetPokemonName
xor a
@@ -661,7 +661,7 @@ EggHatch_DoAnimFrame:
ret
EggHatch_AnimationSequence:
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
ld [wJumptableIndex], a
ld a, [wCurSpecies]
push af
diff --git a/engine/pokemon/caught_nickname.asm b/engine/pokemon/caught_nickname.asm
index 562702c9..ff26887d 100644
--- a/engine/pokemon/caught_nickname.asm
+++ b/engine/pokemon/caught_nickname.asm
@@ -38,7 +38,7 @@ CheckPartyFullAfterContest:
ld hl, wPlayerName
call CopyBytes
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
ld de, wMonOrItemNameBuffer
@@ -89,7 +89,7 @@ CheckPartyFullAfterContest:
call CopyBytes
callfar InsertPokemonIntoBox
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
call GiveANickname_YesNo
ld hl, wStringBuffer1
diff --git a/engine/pokemon/evolve.asm b/engine/pokemon/evolve.asm
index db95a85b..b5ac3074 100644
--- a/engine/pokemon/evolve.asm
+++ b/engine/pokemon/evolve.asm
@@ -235,7 +235,7 @@ EvolveAfterBattle_MasterLoop:
ld [wCurSpecies], a
ld [wTempMonSpecies], a
ld [wEvolutionNewSpecies], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
push hl
@@ -348,7 +348,7 @@ UpdateSpeciesNameIfNotNicknamed:
ld a, [wCurSpecies]
push af
ld a, [wBaseDexNo]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
pop af
ld [wCurSpecies], a
@@ -369,7 +369,7 @@ UpdateSpeciesNameIfNotNicknamed:
call AddNTimes
push hl
ld a, [wCurSpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
pop de
@@ -462,7 +462,7 @@ LearnLevelMoves:
.learn
ld a, d
ld [wPutativeTMHMMove], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetMoveName
call CopyName1
predef LearnMove
diff --git a/engine/pokemon/learn.asm b/engine/pokemon/learn.asm
index 183551bc..2c597c7b 100644
--- a/engine/pokemon/learn.asm
+++ b/engine/pokemon/learn.asm
@@ -36,7 +36,7 @@ LearnMove:
push hl
push de
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld b, a
ld a, [wBattleMode]
diff --git a/engine/pokemon/mail.asm b/engine/pokemon/mail.asm
index e3b88146..07030da5 100644
--- a/engine/pokemon/mail.asm
+++ b/engine/pokemon/mail.asm
@@ -382,7 +382,7 @@ MailboxPC:
call UpdateSprites
ld a, [wCurMessageIndex]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, [wCurMessageScrollPosition]
ld [wMenuScrollPosition], a
call ScrollingMenu
@@ -439,7 +439,7 @@ MailboxPC:
dec a
call .GetMailType
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld hl, wNumItems
call ReceiveItem
jr c, .put_in_bag
diff --git a/engine/pokemon/mon_menu.asm b/engine/pokemon/mon_menu.asm
index aaafad18..5289cb69 100644
--- a/engine/pokemon/mon_menu.asm
+++ b/engine/pokemon/mon_menu.asm
@@ -26,7 +26,7 @@ TossItemFromPC:
push de
call PartyMonItemName
farcall _CheckTossableItem
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
and a
jr nz, .key_item
ld hl, .ItemsTossOutHowManyText
@@ -93,7 +93,7 @@ ItemsOakWarningText:
PartyMonItemName:
ld a, [wCurItem]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
call CopyName1
ret
@@ -252,7 +252,7 @@ GiveTakePartyMonItem:
jr z, .next
call CheckTossableItem
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
and a
jr nz, .next
@@ -296,17 +296,17 @@ TryGiveItemToPartymon:
ret
.already_holding_item
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld hl, PokemonAskSwapItemText
call StartMenuYesNo
jr c, .abort
call GiveItemToPokemon
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
push af
ld a, [wCurItem]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
pop af
ld [wCurItem], a
call ReceiveItemFromPokemon
@@ -314,13 +314,13 @@ TryGiveItemToPartymon:
ld hl, PokemonSwapItemText
call MenuTextboxBackup
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
ld [wCurItem], a
call GivePartyItem
ret
.bag_full
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
ld [wCurItem], a
call ReceiveItemFromPokemon
ld hl, ItemStorageFullText
@@ -355,7 +355,7 @@ TakePartyItem:
farcall ItemIsMail
call GetPartyItemLocation
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld [hl], NO_ITEM
call GetItemName
ld hl, PokemonTookItemText
@@ -427,13 +427,13 @@ GetPartyItemLocation:
ReceiveItemFromPokemon:
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld hl, wNumItems
jp ReceiveItem
GiveItemToPokemon:
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld hl, wNumItems
jp TossItem
@@ -898,7 +898,7 @@ MoveScreenLoop:
.skip_joy
call PrepareToPlaceMoveData
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
and a
jr nz, .moving_move
call PlaceMoveData
@@ -919,21 +919,21 @@ MoveScreenLoop:
.b_button
call PlayClickSFX
call WaitSFX
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
and a
jp z, .exit
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
ld [wMenuCursorY], a
xor a
- ld [wMoveSwapBuffer], a
+ ld [wSwappingMove], a
hlcoord 1, 2
lb bc, 8, SCREEN_WIDTH - 2
call ClearBox
jp .loop
.d_right
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
and a
jp nz, .joy_loop
@@ -948,7 +948,7 @@ MoveScreenLoop:
jp MoveScreenLoop
.d_left
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
and a
jp nz, .joy_loop
ld a, [wCurPartyMon]
@@ -999,11 +999,11 @@ MoveScreenLoop:
.a_button
call PlayClickSFX
call WaitSFX
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
and a
jr nz, .place_move
ld a, [wMenuCursorY]
- ld [wMoveSwapBuffer], a
+ ld [wSwappingMove], a
call PlaceHollowCursor
jp .moving_move
@@ -1056,7 +1056,7 @@ MoveScreenLoop:
ld d, h
ld e, l
pop hl
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
dec a
ld c, a
ld b, 0
@@ -1070,7 +1070,7 @@ MoveScreenLoop:
.exit
xor a
- ld [wMoveSwapBuffer], a
+ ld [wSwappingMove], a
ld hl, w2DMenuFlags1
res 6, [hl]
call ClearSprites
@@ -1136,7 +1136,7 @@ SetUpMoveScreenBG:
SetUpMoveList:
xor a
ldh [hBGMapMode], a
- ld [wMoveSwapBuffer], a
+ ld [wSwappingMove], a
ld [wMonType], a
predef CopyMonToTempMon
ld hl, wTempMonMoves
@@ -1201,8 +1201,8 @@ PlaceMoveData:
hlcoord 16, 12
cp 2
jr c, .no_power
- ld [wDeciramBuffer], a
- ld de, wDeciramBuffer
+ ld [wTextDecimalByte], a
+ ld de, wTextDecimalByte
lb bc, 1, 3
call PrintNum
jr .description
diff --git a/engine/pokemon/mon_stats.asm b/engine/pokemon/mon_stats.asm
index d54f6c07..c8fbff28 100644
--- a/engine/pokemon/mon_stats.asm
+++ b/engine/pokemon/mon_stats.asm
@@ -435,7 +435,7 @@ ListMoves:
push hl
ld [wCurSpecies], a
ld a, MOVE_NAME
- ld [wNamedObjectTypeBuffer], a
+ ld [wNamedObjectType], a
call GetName
ld de, wStringBuffer1
pop hl
diff --git a/engine/pokemon/mon_submenu.asm b/engine/pokemon/mon_submenu.asm
index 9dc59231..8d7da929 100644
--- a/engine/pokemon/mon_submenu.asm
+++ b/engine/pokemon/mon_submenu.asm
@@ -100,7 +100,7 @@ GetMonMenuString:
jr z, .NotMove
inc hl
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetMoveName
ret
diff --git a/engine/pokemon/move_mon.asm b/engine/pokemon/move_mon.asm
index 941a0697..edd7565e 100644
--- a/engine/pokemon/move_mon.asm
+++ b/engine/pokemon/move_mon.asm
@@ -54,7 +54,7 @@ TryAddMonToParty:
and a
jr nz, .skipnickname
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wPartyMonNicknames
ldh a, [hMoveMon]
@@ -444,7 +444,7 @@ AddTempmonToParty:
call CopyBytes
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
cp EGG
jr z, .egg
dec a
@@ -972,7 +972,7 @@ SendMonIntoBox:
call CopyBytes
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld de, sBoxMonNicknames
@@ -1684,7 +1684,7 @@ GivePoke::
.done
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld [wTempEnemyMonSpecies], a
call GetPokemonName
ld hl, wStringBuffer1
diff --git a/engine/pokemon/stats_screen.asm b/engine/pokemon/stats_screen.asm
index e7c7329b..d35d0d75 100644
--- a/engine/pokemon/stats_screen.asm
+++ b/engine/pokemon/stats_screen.asm
@@ -271,14 +271,14 @@ StatsScreen_InitUpperHalf:
xor a
ldh [hBGMapMode], a
ld a, [wBaseDexNo]
- ld [wDeciramBuffer], a
+ ld [wTextDecimalByte], a
ld [wCurSpecies], a
hlcoord 8, 0
ld [hl], "№"
inc hl
ld [hl], "."
inc hl
- ld de, wDeciramBuffer
+ ld de, wTextDecimalByte
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
call PrintNum
hlcoord 14, 0
@@ -311,7 +311,7 @@ StatsScreen_InitUpperHalf:
ld a, "/"
ld [hli], a
ld a, [wBaseDexNo]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
call PlaceString
call StatsScreen_PlaceHorizontalDivider
@@ -346,7 +346,7 @@ LoadPinkPage:
xor a
ldh [hBGMapMode], a
ld a, [wBaseDexNo]
- ld [wDeciramBuffer], a
+ ld [wTextDecimalByte], a
ld [wCurSpecies], a
ld b, PINK_PAGE
call StatsScreen_LoadPageIndicators
@@ -573,7 +573,7 @@ LoadGreenPage:
ld b, a
farcall TimeCapsule_ReplaceTeruSama
ld a, b
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
.got_item_name
hlcoord 6, 8
diff --git a/engine/pokemon/types.asm b/engine/pokemon/types.asm
index d546dbca..e925784d 100644
--- a/engine/pokemon/types.asm
+++ b/engine/pokemon/types.asm
@@ -74,9 +74,9 @@ PrintType:
jp PlaceString
GetTypeName:
-; Copy the name of type [wNamedObjectIndexBuffer] to wStringBuffer1.
+; Copy the name of type [wNamedObjectIndex] to wStringBuffer1.
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
ld hl, TypeNames
ld e, a
ld d, 0
diff --git a/engine/predef.asm b/engine/predef.asm
index e18765b0..26c61d96 100644
--- a/engine/predef.asm
+++ b/engine/predef.asm
@@ -3,9 +3,9 @@ GetPredefPointer::
; Save hl for later (back in Predef)
ld a, h
- ld [wPredefTemp], a
+ ld [wPredefHL], a
ld a, l
- ld [wPredefTemp + 1], a
+ ld [wPredefHL + 1], a
push de
ld a, [wPredefID]
diff --git a/engine/printer/print_party.asm b/engine/printer/print_party.asm
index 576efcff..b2a7e821 100644
--- a/engine/printer/print_party.asm
+++ b/engine/printer/print_party.asm
@@ -170,7 +170,7 @@ PrintPartyMonPage1:
lb bc, 2, 3
call PrintNum
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld [wCurSpecies], a
ld hl, wPartyMonNicknames
call GetCurPartyMonName
@@ -186,7 +186,7 @@ PrintPartyMonPage1:
inc hl
ld [hl], "."
inc hl
- ld de, wNamedObjectIndexBuffer
+ ld de, wNamedObjectIndex
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
call PrintNum
hlcoord 1, 9
@@ -304,7 +304,7 @@ PlaceMoveNameString:
and a
jr z, .no_move
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetMoveName
jr .got_string
diff --git a/engine/printer/printer.asm b/engine/printer/printer.asm
index 214ee9b9..71af6f2e 100644
--- a/engine/printer/printer.asm
+++ b/engine/printer/printer.asm
@@ -724,7 +724,7 @@ Printer_PrintBoxListSegment:
ld a, [de]
cp $ff
jp z, .finish
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld [wCurPartySpecies], a
push bc
diff --git a/engine/rtc/timeset.asm b/engine/rtc/timeset.asm
index f1ff8544..7e012f49 100644
--- a/engine/rtc/timeset.asm
+++ b/engine/rtc/timeset.asm
@@ -680,8 +680,8 @@ PrintHour:
inc hl
pop bc
call AdjustHourForAMorPM
- ld [wDeciramBuffer], a
- ld de, wDeciramBuffer
+ ld [wTextDecimalByte], a
+ ld de, wTextDecimalByte
call PrintTwoDigitNumberLeftAlign
ret
diff --git a/home/farcall.asm b/home/farcall.asm
index 31f62916..b3dac5bf 100644
--- a/home/farcall.asm
+++ b/home/farcall.asm
@@ -11,9 +11,9 @@ FarCall_hl::
; We want to retain the contents of f.
; To do this, we can pop to bc instead of af.
ld a, b
- ld [wFarCallBCBuffer], a
+ ld [wFarCallBC], a
ld a, c
- ld [wFarCallBCBuffer + 1], a
+ ld [wFarCallBC + 1], a
; Restore the working bank.
pop bc
@@ -21,9 +21,9 @@ FarCall_hl::
rst Bankswitch
; Restore the contents of bc.
- ld a, [wFarCallBCBuffer]
+ ld a, [wFarCallBC]
ld b, a
- ld a, [wFarCallBCBuffer + 1]
+ ld a, [wFarCallBC + 1]
ld c, a
ret
diff --git a/home/map.asm b/home/map.asm
index 4146eaf0..788312db 100644
--- a/home/map.asm
+++ b/home/map.asm
@@ -1159,7 +1159,7 @@ BackupBGMapColumn::
ret
UpdateBGMapRow::
- ld hl, wBGMapBufferPtrs
+ ld hl, wBGMapBufferPointers
push de
call .iteration
pop de
@@ -1190,7 +1190,7 @@ UpdateBGMapRow::
ret
UpdateBGMapColumn::
- ld hl, wBGMapBufferPtrs
+ ld hl, wBGMapBufferPointers
ld c, SCREEN_HEIGHT
.loop
ld a, e
diff --git a/home/menu.asm b/home/menu.asm
index 91866692..4395ee34 100644
--- a/home/menu.asm
+++ b/home/menu.asm
@@ -285,8 +285,8 @@ CopyMenuHeader::
call CopyBytes
ret
-StoreTo_wMenuCursorBuffer::
- ld [wMenuCursorBuffer], a
+StoreMenuCursorPosition::
+ ld [wMenuCursorPosition], a
ret
MenuTextbox::
@@ -640,7 +640,7 @@ ContinueGettingMenuJoypad:
ld a, [hl]
ld [wMenuSelection], a
ld a, [wMenuCursorY]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
and a
ret
@@ -789,7 +789,7 @@ _2DMenu::
pop bc
ld a, b
rst Bankswitch
- ld a, [wMenuCursorBuffer]
+ ld a, [wMenuCursorPosition]
ret
ResetBGWindow::
diff --git a/home/names.asm b/home/names.asm
index 58cc0fbb..4e8e1224 100644
--- a/home/names.asm
+++ b/home/names.asm
@@ -10,7 +10,7 @@ NamesPointers::
dbw 4, MoveDescriptions ; MOVE_DESC_NAME_BROKEN (wrong bank)
GetName::
-; Return name wCurSpecies from name list wNamedObjectTypeBuffer in wStringBuffer1.
+; Return name wCurSpecies from name list wNamedObjectType in wStringBuffer1.
ldh a, [hROMBank]
push af
@@ -18,12 +18,12 @@ GetName::
push bc
push de
- ld a, [wNamedObjectTypeBuffer]
+ ld a, [wNamedObjectType]
cp MON_NAME
jr nz, .NotPokeName
ld a, [wCurSpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, MON_NAME_LENGTH
add hl, de
@@ -32,7 +32,7 @@ GetName::
jr .done
.NotPokeName:
- ld a, [wNamedObjectTypeBuffer]
+ ld a, [wNamedObjectType]
dec a
ld e, a
ld d, 0
@@ -110,7 +110,7 @@ GetBasePokemonName::
ret
GetPokemonName::
-; Get Pokemon name for wNamedObjectIndexBuffer.
+; Get Pokemon name for wNamedObjectIndex.
ldh a, [hROMBank]
push af
@@ -119,7 +119,7 @@ GetPokemonName::
rst Bankswitch
; Each name is ten characters
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
dec a
ld hl, PokemonNames
ld e, a
@@ -144,18 +144,18 @@ endr
ret
GetItemName::
-; Get item name for wNamedObjectIndexBuffer.
+; Get item name for wNamedObjectIndex.
push hl
push bc
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
cp TM01
jr nc, .TM
ld [wCurSpecies], a
ld a, ITEM_NAME
- ld [wNamedObjectTypeBuffer], a
+ ld [wNamedObjectType], a
call GetName
jr .Copied
.TM:
@@ -167,12 +167,12 @@ GetItemName::
ret
GetTMHMName::
-; Get TM/HM name for item wNamedObjectIndexBuffer.
+; Get TM/HM name for item wNamedObjectIndex.
push hl
push de
push bc
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
push af
; TM/HM prefix
@@ -194,7 +194,7 @@ GetTMHMName::
; TM/HM number
push de
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
ld c, a
callfar GetTMHMNumber
pop de
@@ -232,7 +232,7 @@ GetTMHMName::
ld [de], a
pop af
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
pop bc
pop de
pop hl
@@ -254,9 +254,9 @@ GetMoveName::
push hl
ld a, MOVE_NAME
- ld [wNamedObjectTypeBuffer], a
+ ld [wNamedObjectType], a
- ld a, [wNamedObjectIndexBuffer] ; move id
+ ld a, [wNamedObjectIndex] ; move id
ld [wCurSpecies], a
call GetName
diff --git a/home/pokemon.asm b/home/pokemon.asm
index 29af1cdd..eb77d387 100644
--- a/home/pokemon.asm
+++ b/home/pokemon.asm
@@ -199,8 +199,8 @@ PrintLevel_Force3Digits::
ld c, 3
Print8BitNumLeftAlign::
- ld [wDeciramBuffer], a
- ld de, wDeciramBuffer
+ ld [wTextDecimalByte], a
+ ld de, wTextDecimalByte
ld b, PRINTNUM_LEFTALIGN | 1
jp PrintNum
diff --git a/home/predef.asm b/home/predef.asm
index 10550d12..eb9a2f9f 100644
--- a/home/predef.asm
+++ b/home/predef.asm
@@ -8,7 +8,7 @@ Predef::
ld a, BANK(GetPredefPointer)
rst Bankswitch
- call GetPredefPointer ; stores hl in wPredefTemp
+ call GetPredefPointer ; stores hl in wPredefHL
; Switch to the new function's bank
rst Bankswitch
@@ -27,9 +27,9 @@ Predef::
push hl
; Get hl back
- ld a, [wPredefTemp]
+ ld a, [wPredefHL]
ld h, a
- ld a, [wPredefTemp + 1]
+ ld a, [wPredefHL + 1]
ld l, a
ret
@@ -37,16 +37,16 @@ Predef::
; Clean up after the Predef call
ld a, h
- ld [wPredefTemp], a
+ ld [wPredefHL], a
ld a, l
- ld [wPredefTemp + 1], a
+ ld [wPredefHL + 1], a
pop hl
ld a, h
rst Bankswitch
- ld a, [wPredefTemp]
+ ld a, [wPredefHL]
ld h, a
- ld a, [wPredefTemp + 1]
+ ld a, [wPredefHL + 1]
ld l, a
ret
diff --git a/home/random.asm b/home/random.asm
index 9d62b9b6..06f554b3 100644
--- a/home/random.asm
+++ b/home/random.asm
@@ -41,10 +41,10 @@ BattleRandom::
call _BattleRandom
- ld [wPredefTemp + 1], a
+ ld [wPredefHL + 1], a
pop af
rst Bankswitch
- ld a, [wPredefTemp + 1]
+ ld a, [wPredefHL + 1]
ret
RandomRange::
diff --git a/home/sprite_anims.asm b/home/sprite_anims.asm
index 67f36fe2..0ba04d42 100644
--- a/home/sprite_anims.asm
+++ b/home/sprite_anims.asm
@@ -1,11 +1,11 @@
InitSpriteAnimStruct::
- ld [wSpriteAnimIDBuffer], a
+ ld [wSpriteAnimID], a
ldh a, [hROMBank]
push af
ld a, BANK(_InitSpriteAnimStruct)
rst Bankswitch
- ld a, [wSpriteAnimIDBuffer]
+ ld a, [wSpriteAnimID]
call _InitSpriteAnimStruct
@@ -15,13 +15,13 @@ InitSpriteAnimStruct::
ret
ReinitSpriteAnimFrame:: ; unreferenced
- ld [wSpriteAnimIDBuffer], a
+ ld [wSpriteAnimID], a
ldh a, [hROMBank]
push af
ld a, BANK(_ReinitSpriteAnimFrame)
rst Bankswitch
- ld a, [wSpriteAnimIDBuffer]
+ ld a, [wSpriteAnimID]
call _ReinitSpriteAnimFrame
diff --git a/home/video.asm b/home/video.asm
index a9592558..12f7ee04 100644
--- a/home/video.asm
+++ b/home/video.asm
@@ -1,6 +1,6 @@
UpdateBGMapBuffer::
; Copy [hBGMapTileCount] 16x8 tiles from wBGMapBuffer
-; to bg map addresses in wBGMapBufferPtrs.
+; to bg map addresses in wBGMapBufferPointers.
; [hBGMapTileCount] must be even since this is done in pairs.
@@ -10,9 +10,9 @@ UpdateBGMapBuffer::
and a
ret z
-; Relocate the stack pointer to wBGMapBufferPtrs
+; Relocate the stack pointer to wBGMapBufferPointers
ld [hSPBuffer], sp
- ld hl, wBGMapBufferPtrs
+ ld hl, wBGMapBufferPointers
ld sp, hl
; We can now pop the addresses of affected spots on the BG Map
diff --git a/macros/legacy.asm b/macros/legacy.asm
index 1bac83b6..c122d7bd 100644
--- a/macros/legacy.asm
+++ b/macros/legacy.asm
@@ -176,30 +176,31 @@ readmoney: MACRO
getmoney \2, \1
ENDM
-RAM2MEM EQUS "getnum"
-loadfont EQUS "opentext"
-loadmenudata EQUS "loadmenu"
-loadmenuheader EQUS "loadmenu"
-writebackup EQUS "closewindow"
-interpretmenu EQUS "_2dmenu"
-interpretmenu2 EQUS "verticalmenu"
-buttonsound EQUS "promptbutton"
-battlecheck EQUS "randomwildmon"
-loadtrainerdata EQUS "loadtemptrainer"
-loadpokedata EQUS "loadwildmon"
-returnafterbattle EQUS "reloadmapafterbattle"
-trainerstatus EQUS "trainerflagaction"
-talkaftercancel EQUS "endifjustbattled"
-talkaftercheck EQUS "checkjustbattled"
-playrammusic EQUS "encountermusic"
-reloadmapmusic EQUS "dontrestartmapmusic"
-resetfuncs EQUS "endall"
-displaylocation EQUS "landmarktotext"
-givepokeitem EQUS "givepokemail"
-checkpokeitem EQUS "checkpokemail"
-passtoengine EQUS "autoinput"
-verbosegiveitem2 EQUS "verbosegiveitemvar"
-loadbytec2cf EQUS "writeunusedbytebuffer"
+RAM2MEM EQUS "getnum"
+loadfont EQUS "opentext"
+loadmenudata EQUS "loadmenu"
+loadmenuheader EQUS "loadmenu"
+writebackup EQUS "closewindow"
+interpretmenu EQUS "_2dmenu"
+interpretmenu2 EQUS "verticalmenu"
+buttonsound EQUS "promptbutton"
+battlecheck EQUS "randomwildmon"
+loadtrainerdata EQUS "loadtemptrainer"
+loadpokedata EQUS "loadwildmon"
+returnafterbattle EQUS "reloadmapafterbattle"
+trainerstatus EQUS "trainerflagaction"
+talkaftercancel EQUS "endifjustbattled"
+talkaftercheck EQUS "checkjustbattled"
+playrammusic EQUS "encountermusic"
+reloadmapmusic EQUS "dontrestartmapmusic"
+resetfuncs EQUS "endall"
+displaylocation EQUS "landmarktotext"
+givepokeitem EQUS "givepokemail"
+checkpokeitem EQUS "checkpokemail"
+passtoengine EQUS "autoinput"
+verbosegiveitem2 EQUS "verbosegiveitemvar"
+loadbytec2cf EQUS "writeunusedbyte"
+writeunusedbytebuffer EQUS "writeunusedbyte"
; macros/scripts/maps.asm
diff --git a/macros/scripts/events.asm b/macros/scripts/events.asm
index 606dd5dd..dc43eff3 100644
--- a/macros/scripts/events.asm
+++ b/macros/scripts/events.asm
@@ -489,9 +489,9 @@ closetext: MACRO
db closetext_command
ENDM
- const writeunusedbytebuffer_command ; $4a
-writeunusedbytebuffer: MACRO
- db writeunusedbytebuffer_command
+ const writeunusedbyte_command ; $4a
+writeunusedbyte: MACRO
+ db writeunusedbyte_command
db \1 ; byte
ENDM
diff --git a/wram.asm b/wram.asm
index aaa73c44..521e393f 100644
--- a/wram.asm
+++ b/wram.asm
@@ -131,7 +131,7 @@ wDebugFlags:: db
wGameLogicPaused:: db
wSpriteUpdatesEnabled:: db
-wUnusedScriptByteBuffer:: db
+wUnusedScriptByte:: db
wMapTimeOfDay:: db
@@ -277,10 +277,12 @@ wCurSpriteOAMAddr:: db
wCurIcon:: db
wCurIconTile:: db
-wSpriteAnimAddrBackup::
-wSpriteAnimIDBuffer::
-wCurSpriteOAMFlags::
- dw
+UNION
+wSpriteAnimID::
+wCurSpriteOAMFlags:: db
+NEXTU
+wSpriteAnimAddrBackup:: dw
+ENDU
wCurAnimVTile:: db
wCurAnimXCoord:: db
wCurAnimYCoord:: db
@@ -358,7 +360,7 @@ wPokedexDataEnd::
NEXTU
; pokegear
-wPokegearPhoneLoadNameBuffer:: db
+wPokegearPhoneDisplayPosition:: db
wPokegearPhoneCursorPosition:: db
wPokegearPhoneScrollPosition:: db
wPokegearPhoneSelectedPerson:: db
@@ -579,7 +581,7 @@ ENDU
NEXTU
; link data prep
ds 1000
-wCurLinkOTPartyMonTypePtr:: dw
+wCurLinkOTPartyMonTypePointer:: dw
wLinkOTPartyMonTypes:: ds 2 * PARTY_LENGTH
NEXTU
@@ -1071,7 +1073,7 @@ SECTION "Video", WRAM0
; wBGMapBuffer
wBGMapBuffer:: ds 40
wBGMapPalBuffer:: ds 40
-wBGMapBufferPtrs:: ds 40 ; 20 bg map addresses (16x8 tiles)
+wBGMapBufferPointers:: ds 20 * 2
wBGMapBufferEnd::
wDefaultSGBLayout:: db
@@ -1114,7 +1116,7 @@ wMonType:: db
wCurSpecies:: db
-wNamedObjectTypeBuffer:: db
+wNamedObjectType:: db
ds 1
@@ -1306,8 +1308,8 @@ wMenuBorderLeftCoord:: db
wMenuBorderBottomCoord:: db
wMenuBorderRightCoord:: db
wMenuDataPointer:: dw
-wMenuCursorBuffer:: dw
- ds 7
+wMenuCursorPosition:: db
+ ds 8
wMenuHeaderEnd::
wMenuData::
@@ -1569,7 +1571,7 @@ wDebugRoomStartFunction:: dw
wDebugRoomSelectFunction:: dw
wDebugRoomAutoFunction:: dw
wDebugRoomPageCount:: db
-wDebugRoomPagedValuesPtr:: dw
+wDebugRoomPagesPointer:: dw
ENDC
NEXTU
@@ -1686,7 +1688,7 @@ wCallerContact:: ds PHONE_CONTACT_SIZE
NEXTU
; backup menu data
ds 7
-wMenuCursorBufferBackup:: db
+wMenuCursorPositionBackup:: db
wMenuScrollPositionBackup:: db
NEXTU
@@ -1727,7 +1729,10 @@ wStringBuffer3:: ds STRING_BUFFER_LENGTH
wStringBuffer4:: ds STRING_BUFFER_LENGTH
wStringBuffer5:: ds MOVE_NAME_LENGTH
-wBattleMenuCursorBuffer:: dw
+wBattleMenuCursorPosition:: db
+
+ ds 1
+
wCurBattleMon:: db
wCurMoveNum:: db
wLastPocket:: db
@@ -1747,7 +1752,7 @@ wTMHMPocketScrollPosition:: db
wSwitchMon::
wSwitchItem::
-wMoveSwapBuffer::
+wSwappingMove::
db
wMenuScrollPosition:: ds 4
@@ -1756,9 +1761,9 @@ wQueuedScriptBank:: db
wQueuedScriptAddr:: dw
wPredefID:: db
-wPredefTemp:: dw
+wPredefHL:: dw
wPredefAddress:: dw
-wFarCallBCBuffer:: dw
+wFarCallBC:: dw
ds 1
wNumMoves:: db
@@ -1814,7 +1819,7 @@ wUnusedNamesPointer:: dw
SECTION "WRAM 1", WRAMX
-wItemAttributesPtr:: dw
+wItemAttributesPointer:: dw
wCurItem:: db
wCurItemQuantity::
@@ -1844,8 +1849,8 @@ wPokemonWithdrawDepositParameter::
; 3: Put into Day-Care
db
-wItemQuantityChangeBuffer:: db
-wItemQuantityBuffer:: db
+wItemQuantityChange:: db
+wItemQuantity:: db
wTempMon:: party_struct wTempMon
@@ -1857,7 +1862,7 @@ wHandlePlayerStep:: db
wPartyMenuActionText:: db
-wItemAttributeParamBuffer:: db
+wItemAttributeValue:: db
wCurPartyLevel:: db
@@ -2030,7 +2035,7 @@ wCurDecorationCategory:: db
NEXTU
; withdraw/deposit items
-wPCItemQuantityChangeBuffer:: db
+wPCItemQuantityChange:: db
wPCItemQuantity:: db
NEXTU
@@ -2166,8 +2171,8 @@ wInitListType:: db
wWildMon:: db
wBattleHasJustStarted:: db
-wNamedObjectIndexBuffer::
-wDeciramBuffer::
+wNamedObjectIndex::
+wTextDecimalByte::
wTempByteValue::
wNumSetBits::
wTypeMatchup::
@@ -2608,7 +2613,7 @@ wFruitTreeFlags:: flag_array NUM_FRUIT_TREES
ds 2
-wLuckyNumberDayBuffer:: dw
+wLuckyNumberDayTimer:: dw
ds 2
wSpecialPhoneCallID:: db
ds 3