ref: 99e66c25577e367d6c7ca75fea8b466b54c3317a
parent: 1a054661ecac2d6075961e486213b6880c0afc4e
author: Rangi <[email protected]>
date: Wed Dec 23 11:29:30 EST 2020
Rename some labels - Remove "Buffer" suffix from some byte and word quantities - Change "Ptr" to "Pointer" Fixes #789
--- a/audio/engine.asm
+++ b/audio/engine.asm
@@ -210,7 +210,7 @@
ret
UpdateChannels:
- ld hl, .ChannelFnPtrs
+ ld hl, .ChannelFunctions
ld a, [wCurChannel]
maskbits NUM_CHANNELS
add a
@@ -222,7 +222,7 @@
ld l, a
jp hl
-.ChannelFnPtrs:
+.ChannelFunctions:
dw .Channel1
dw .Channel2
dw .Channel3
--- a/data/text/battle.asm
+++ b/data/text/battle.asm
@@ -87,7 +87,7 @@
PerishCountText:
text "<USER>'s"
line "PERISH count is @"
- text_decimal wDeciramBuffer, 1, 1
+ text_decimal wTextDecimalByte, 1, 1
text "!"
prompt
@@ -670,7 +670,7 @@
text_ram wStringBuffer1
text " was"
cont "reduced by @"
- text_decimal wDeciramBuffer, 1, 1
+ text_decimal wTextDecimalByte, 1, 1
text "!"
prompt
@@ -1030,7 +1030,7 @@
MagnitudeText:
text "Magnitude @"
- text_decimal wDeciramBuffer, 1, 1
+ text_decimal wTextDecimalByte, 1, 1
text "!"
prompt
--- a/data/text/common_2.asm
+++ b/data/text/common_2.asm
@@ -271,7 +271,7 @@
text_ram wMysteryGiftCardHolderName
text "'s CARD was"
line "listed as no.@"
- text_decimal wDeciramBuffer, 1, 2
+ text_decimal wTextDecimalByte, 1, 2
text "."
prompt
@@ -609,7 +609,7 @@
_AskQuantityThrowAwayText::
text "Throw away @"
- text_decimal wItemQuantityChangeBuffer, 1, 2
+ text_decimal wItemQuantityChange, 1, 2
text_start
line "@"
text_ram wStringBuffer2
@@ -1110,7 +1110,7 @@
_PlayersPCWithdrewItemsText::
text "Withdrew @"
- text_decimal wItemQuantityChangeBuffer, 1, 2
+ text_decimal wItemQuantityChange, 1, 2
text_start
line "@"
text_ram wStringBuffer2
@@ -1133,7 +1133,7 @@
_PlayersPCDepositItemsText::
text "Deposited @"
- text_decimal wItemQuantityChangeBuffer, 1, 2
+ text_decimal wItemQuantityChange, 1, 2
text_start
line "@"
text_ram wStringBuffer2
@@ -1390,7 +1390,7 @@
_ItemsThrowAwayText::
text "Throw away @"
- text_decimal wItemQuantityChangeBuffer, 1, 2
+ text_decimal wItemQuantityChange, 1, 2
text_start
line "@"
text_ram wStringBuffer2
--- a/data/text/common_3.asm
+++ b/data/text/common_3.asm
@@ -480,7 +480,7 @@
done
_MartFinalPriceText::
- text_decimal wItemQuantityChangeBuffer, 1, 2
+ text_decimal wItemQuantityChange, 1, 2
text " @"
text_ram wStringBuffer2
text "(S)"
@@ -509,7 +509,7 @@
done
_HerbalLadyFinalPriceText::
- text_decimal wItemQuantityChangeBuffer, 1, 2
+ text_decimal wItemQuantityChange, 1, 2
text " @"
text_ram wStringBuffer2
text "(S)"
@@ -592,7 +592,7 @@
done
_PharmacyFinalPriceText::
- text_decimal wItemQuantityChangeBuffer, 1, 2
+ text_decimal wItemQuantityChange, 1, 2
text " @"
text_ram wStringBuffer2
text "(S)"
--- a/docs/event_commands.md
+++ b/docs/event_commands.md
@@ -263,9 +263,9 @@
## `$49`: `closetext`
-## `$4A`: <code>writeunusedbytebuffer <i>byte</i></code>
+## `$4A`: <code>writeunusedbyte <i>byte</i></code>
-<code>[<i>wUnusedScriptByteBuffer</i>] = <i>byte</i></code>
+<code>[<i>wUnusedScriptByte</i>] = <i>byte</i></code>
## `$4B`: <code>farwritetext <i>text_pointer</i></code>
--- a/engine/battle/ai/items.asm
+++ b/engine/battle/ai/items.asm
@@ -836,7 +836,7 @@
PrintText_UsedItemOn:
ld a, [wCurEnemyItem]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld hl, wStringBuffer1
ld de, wMonOrItemNameBuffer
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -373,7 +373,7 @@
push bc
callfar GetUserItem
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
sub BERSERK_GENE
pop bc
pop de
@@ -1161,7 +1161,7 @@
ret z
dec [hl]
ld a, [hl]
- ld [wDeciramBuffer], a
+ ld [wTextDecimalByte], a
push af
ld hl, PerishCountText
call StdBattleTextbox
@@ -1235,7 +1235,7 @@
ret nz
ld a, [de]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld [wFXAnimID], a
call GetMoveName
dec [hl]
@@ -1288,7 +1288,7 @@
callfar GetUserItem
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld a, b
cp HELD_LEFTOVERS
@@ -1434,7 +1434,7 @@
.skip_checks
callfar GetUserItem
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
xor a
ld [hl], a
call GetPartymonItem
@@ -3703,7 +3703,7 @@
push hl
push de
ld a, [wBattleMonItem]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld b, a
callfar GetItemHeldEffect
ld a, b
@@ -4025,7 +4025,7 @@
call GetBattleMonBackpic
xor a
ldh [hGraphicStartTile], a
- ld [wBattleMenuCursorBuffer], a
+ ld [wBattleMenuCursorPosition], a
ld [wCurMoveNum], a
ld [wTypeModifier], a
ld [wPlayerMoveStruct + MOVE_ANIM], a
@@ -4343,7 +4343,7 @@
call RefreshBattleHuds
callfar GetOpponentItem
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
callfar ConsumeHeldItem
ld hl, RecoveredUsingText
@@ -4437,7 +4437,7 @@
.heal_status
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld a, BATTLE_VARS_SUBSTATUS3_OPP
call GetBattleVarAddr
res SUBSTATUS_CONFUSED, [hl]
@@ -4504,7 +4504,7 @@
jr nz, .loop
pop bc
ld a, [bc]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
push bc
dec hl
dec hl
@@ -4899,7 +4899,7 @@
.next
ld a, $1
ldh [hBGMapMode], a
- ld a, [wBattleMenuCursorBuffer]
+ ld a, [wBattleMenuCursorPosition]
cp $1
jp z, BattleMenu_Fight
cp $3
@@ -5003,7 +5003,7 @@
and a
jr nz, .run
callfar CheckItemPocket
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
cp BALL
jr z, .ball
call ClearBGPalettes
@@ -5427,7 +5427,7 @@
.battle_player_moves
call MoveInfoBox
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
and a
jr z, .interpret_joypad
hlcoord 5, 13
@@ -5451,7 +5451,7 @@
push af
xor a
- ld [wMoveSwapBuffer], a
+ ld [wSwappingMove], a
ld a, [wMenuCursorY]
dec a
ld [wMenuCursorY], a
@@ -5542,7 +5542,7 @@
jp .menu_loop
.pressed_select
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
and a
jr z, .start_swap
ld hl, wBattleMonMoves
@@ -5560,7 +5560,7 @@
ld a, [hl]
and $f
ld b, a
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
swap a
add b
ld [hl], a
@@ -5567,7 +5567,7 @@
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]
@@ -5595,12 +5595,12 @@
.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
@@ -5622,7 +5622,7 @@
.start_swap
ld a, [wMenuCursorY]
- ld [wMoveSwapBuffer], a
+ ld [wSwappingMove], a
jp MoveSelectionScreen
MoveInfoBox:
@@ -5717,7 +5717,7 @@
inc hl
ld [hl], "/"
inc hl
- ld de, wNamedObjectIndexBuffer
+ ld de, wNamedObjectIndex
lb bc, 1, 2
call PrintNum
ret
@@ -6383,7 +6383,7 @@
ld [de], a
ld a, [wTempEnemyMonSpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
@@ -8044,7 +8044,7 @@
call LoadTrainerOrWildMonPic
xor a
ld [wTempBattleMonSpecies], a
- ld [wBattleMenuCursorBuffer], a
+ ld [wBattleMenuCursorPosition], a
xor a
ldh [hMapAnims], a
farcall PlayBattleMusic
@@ -8300,7 +8300,7 @@
ld [wPartyMenuCursor], a
ld [wKeyItemsPocketCursor], a
ld [wItemsPocketCursor], a
- ld [wBattleMenuCursorBuffer], a
+ ld [wBattleMenuCursorPosition], a
ld [wCurMoveNum], a
ld [wBallsPocketCursor], a
ld [wLastPocket], a
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -595,7 +595,7 @@
ld a, BATTLE_VARS_MOVE
call GetBattleVar
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetMoveName
ld hl, DisabledMoveText
@@ -2186,7 +2186,7 @@
.focus_band_text
call GetOpponentItem
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld hl, HungOnText
jp StdBattleTextbox
@@ -3608,7 +3608,7 @@
ld a, BATTLE_VARS_MOVE
call GetBattleVar
ld [wCurSpecies], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
dec a
call GetMoveData
@@ -3624,7 +3624,7 @@
jr nz, .not_protected_by_item
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld hl, ProtectedByText
jr .fail
@@ -3772,7 +3772,7 @@
cp HELD_PREVENT_POISON
jr nz, .do_poison
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld hl, ProtectedByText
jr .failed
@@ -4826,7 +4826,6 @@
; tristatuschance
call BattleCommand_EffectChance
-
.loop
; 1/3 chance of each status
call BattleRandom
@@ -4834,11 +4833,11 @@
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
@@ -5873,7 +5872,7 @@
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
@@ -5963,7 +5962,7 @@
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
--- a/engine/battle/menu.asm
+++ b/engine/battle/menu.asm
@@ -1,11 +1,11 @@
LoadBattleMenu:
ld hl, BattleMenuHeader
call LoadMenuHeader
- ld a, [wBattleMenuCursorBuffer]
- ld [wMenuCursorBuffer], a
+ ld a, [wBattleMenuCursorPosition]
+ ld [wMenuCursorPosition], a
call InterpretBattleMenu
- ld a, [wMenuCursorBuffer]
- ld [wBattleMenuCursorBuffer], a
+ ld a, [wMenuCursorPosition]
+ ld [wBattleMenuCursorPosition], a
call ExitMenu
ret
@@ -20,11 +20,11 @@
; 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
--- a/engine/battle/move_effects/beat_up.asm
+++ b/engine/battle/move_effects/beat_up.asm
@@ -118,7 +118,7 @@
ld hl, wOTPartySpecies
add hl, bc
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
jr .got_enemy_nick
@@ -156,7 +156,7 @@
.wild
ld a, [wEnemyMonSpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, BeatUpAttackText
call StdBattleTextbox
--- a/engine/battle/move_effects/conversion.asm
+++ b/engine/battle/move_effects/conversion.asm
@@ -89,7 +89,7 @@
ld [de], a
inc de
ld [de], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
farcall GetTypeName
call AnimateCurrentMove
ld hl, TransformedTypeText
--- a/engine/battle/move_effects/conversion2.asm
+++ b/engine/battle/move_effects/conversion2.asm
@@ -55,7 +55,7 @@
call BattleCommand_SwitchTurn
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
predef GetTypeName
ld hl, TransformedTypeText
jp StdBattleTextbox
--- a/engine/battle/move_effects/disable.asm
+++ b/engine/battle/move_effects/disable.asm
@@ -63,7 +63,7 @@
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
--- a/engine/battle/move_effects/magnitude.asm
+++ b/engine/battle/move_effects/magnitude.asm
@@ -18,7 +18,7 @@
push de
inc hl
ld a, [hl]
- ld [wDeciramBuffer], a
+ ld [wTextDecimalByte], a
call BattleCommand_MoveDelay
ld hl, MagnitudeText
call StdBattleTextbox
--- a/engine/battle/move_effects/mimic.asm
+++ b/engine/battle/move_effects/mimic.asm
@@ -37,7 +37,7 @@
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
--- a/engine/battle/move_effects/mirror_move.asm
+++ b/engine/battle/move_effects/mirror_move.asm
@@ -24,7 +24,7 @@
.use
ld a, b
ld [hl], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
push af
ld a, BATTLE_VARS_MOVE_ANIM
--- a/engine/battle/move_effects/sketch.asm
+++ b/engine/battle/move_effects/sketch.asm
@@ -34,7 +34,7 @@
.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
--- a/engine/battle/move_effects/spite.asm
+++ b/engine/battle/move_effects/spite.asm
@@ -24,7 +24,7 @@
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 @@
call AnimateCurrentMove
pop de
ld a, d
- ld [wDeciramBuffer], a
+ ld [wTextDecimalByte], a
ld hl, SpiteEffectText
jp StdBattleTextbox
--- a/engine/battle/move_effects/thief.asm
+++ b/engine/battle/move_effects/thief.asm
@@ -21,7 +21,7 @@
; Can't steal mail.
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld d, a
farcall ItemIsMail
ret c
@@ -45,7 +45,7 @@
ld [de], a
call .playeritem
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
ld [hl], a
ld [de], a
jr .stole
@@ -68,7 +68,7 @@
; Can't steal mail!
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld d, a
farcall ItemIsMail
ret c
@@ -86,7 +86,7 @@
ld [de], a
call .enemyitem
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
ld [hl], a
ld [de], a
--- a/engine/battle/move_effects/transform.asm
+++ b/engine/battle/move_effects/transform.asm
@@ -99,7 +99,7 @@
jr nz, .pp_loop
pop hl
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wEnemyStats
ld de, wPlayerStats
--- a/engine/battle/read_trainer_attributes.asm
+++ b/engine/battle/read_trainer_attributes.asm
@@ -6,7 +6,7 @@
ld [wCurSpecies], a
ld a, TRAINER_NAME
- ld [wNamedObjectTypeBuffer], a
+ ld [wNamedObjectType], a
call GetName
ld de, wStringBuffer1
ret
@@ -32,7 +32,7 @@
ld [wCurSpecies], a
ld a, TRAINER_NAME
- ld [wNamedObjectTypeBuffer], a
+ ld [wNamedObjectType], a
call GetName
ld hl, wStringBuffer1
--- a/engine/debug/color_picker.asm
+++ b/engine/debug/color_picker.asm
@@ -320,9 +320,9 @@
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]
@@ -364,7 +364,7 @@
jr .done
.trainer
- ld a, [wDeciramBuffer]
+ ld a, [wTextDecimalByte]
ld [wTrainerClass], a
callfar GetTrainerAttributes
ld de, wStringBuffer1
--- a/engine/debug/debug_room.asm
+++ b/engine/debug/debug_room.asm
@@ -573,9 +573,9 @@
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
@@ -669,7 +669,7 @@
db " P @"
DebugRoom_IncrementPagedValue:
- call DebugRoom_GetCurPagedValuePtr
+ call DebugRoom_GetCurPagedValuePointer
ld e, [hl] ; de = value address
inc hl
ld d, [hl]
@@ -684,7 +684,7 @@
ret
DebugRoom_DecrementPagedValue:
- call DebugRoom_GetCurPagedValuePtr
+ call DebugRoom_GetCurPagedValuePointer
ld e, [hl] ; de = value address
inc hl
ld d, [hl]
@@ -709,7 +709,7 @@
ld [wDebugRoomCurPage], a
call DebugRoom_PrintPage
ld a, [wDebugRoomCurPage]
- call DebugRoom_GetNthPagePtr
+ call DebugRoom_GetNthPagePointer
ld a, [wDebugRoomCurValue]
cp [hl]
jr c, .skip
@@ -731,7 +731,7 @@
ld [wDebugRoomCurPage], a
call DebugRoom_PrintPage
ld a, [wDebugRoomCurPage]
- call DebugRoom_GetNthPagePtr
+ call DebugRoom_GetNthPagePointer
ld a, [wDebugRoomCurValue]
cp [hl]
jr c, .skip
@@ -747,7 +747,7 @@
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?
@@ -776,15 +776,15 @@
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]
@@ -792,10 +792,10 @@
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
@@ -803,12 +803,12 @@
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
@@ -837,9 +837,9 @@
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]
@@ -860,9 +860,9 @@
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]
@@ -897,9 +897,9 @@
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]
@@ -927,9 +927,9 @@
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]
@@ -1083,7 +1083,7 @@
done
DebugRoom_PrintItemName:
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
push bc
call GetItemName
pop hl
@@ -1229,19 +1229,19 @@
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
--- a/engine/events/battle_tower/battle_tower.asm
+++ b/engine/events/battle_tower/battle_tower.asm
@@ -269,7 +269,7 @@
jr nc, .skip_mon_1
ld a, [wBT_OTTempMon1]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld l, e
ld h, d
@@ -283,7 +283,7 @@
farcall CheckStringForErrors
jr nc, .skip_mon_2
ld a, [wBT_OTTempMon2]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld l, e
ld h, d
@@ -297,7 +297,7 @@
farcall CheckStringForErrors
jr nc, .skip_mon_3
ld a, [wBT_OTTempMon3]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld l, e
ld h, d
@@ -1289,7 +1289,7 @@
ld a, EGG_TICKET
ld [wCurItem], a
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld a, -1
ld [wCurItemQuantity], a
ld hl, wNumItems
--- a/engine/events/battle_tower/load_trainer.asm
+++ b/engine/events/battle_tower/load_trainer.asm
@@ -168,13 +168,13 @@
ld bc, NICKNAMED_MON_STRUCT_LENGTH
call CopyBytes
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
push af
push de
ld hl, -NICKNAMED_MON_STRUCT_LENGTH
add hl, de
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld bc, PARTYMON_STRUCT_LENGTH
add hl, bc
push hl
@@ -187,7 +187,7 @@
pop de
pop af
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
pop bc
dec c
jp nz, .loop
--- a/engine/events/buena.asm
+++ b/engine/events/buena.asm
@@ -87,7 +87,7 @@
ld [wMenuSelectionQuantity], a
call Buena_GetPrize
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld hl, .BuenaIsThatRightText
call BuenaPrintText
@@ -107,7 +107,7 @@
push hl
ld [wCurItem], a
ld a, $1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld hl, wNumItems
call ReceiveItem
pop hl
@@ -224,7 +224,7 @@
ld hl, .MenuHeader
call CopyMenuHeader
ld a, [wMenuSelection]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
xor a
ld [wWhichIndexSet], a
ldh [hBGMapMode], a
@@ -276,7 +276,7 @@
call Buena_GetPrize
ld a, [hl]
push de
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
pop hl
call PlaceString
--- a/engine/events/bug_contest/caught_mon.asm
+++ b/engine/events/bug_contest/caught_mon.asm
@@ -2,7 +2,7 @@
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 @@
.firstcatch
call .generatestats
ld a, [wTempEnemyMonSpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, .ContestCaughtMonText
call PrintText
--- a/engine/events/bug_contest/display_stats.asm
+++ b/engine/events/bug_contest/display_stats.asm
@@ -36,7 +36,7 @@
call PlaceString
ld a, [wContestMon]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld de, wStringBuffer1
hlcoord 1, 2
--- a/engine/events/bug_contest/judging.asm
+++ b/engine/events/bug_contest/judging.asm
@@ -5,7 +5,7 @@
ld a, [wBugContestThirdPlaceWinnerID]
call LoadContestantName
ld a, [wBugContestThirdPlaceMon]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, ContestJudging_ThirdPlaceText
call PrintText
@@ -12,7 +12,7 @@
ld a, [wBugContestSecondPlaceWinnerID]
call LoadContestantName
ld a, [wBugContestSecondPlaceMon]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, ContestJudging_SecondPlaceText
call PrintText
@@ -19,7 +19,7 @@
ld a, [wBugContestFirstPlaceWinnerID]
call LoadContestantName
ld a, [wBugContestFirstPlaceMon]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, ContestJudging_FirstPlaceText
call PrintText
--- a/engine/events/haircut.asm
+++ b/engine/events/haircut.asm
@@ -3,7 +3,7 @@
jr c, .cancel
ld a, [wCurPartySpecies]
ld [wScriptVar], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
jp CopyPokemonName_Buffer1_Buffer3
--- a/engine/events/halloffame.asm
+++ b/engine/events/halloffame.asm
@@ -462,7 +462,7 @@
call Textbox
ld a, [wTempMonSpecies]
ld [wCurPartySpecies], a
- ld [wDeciramBuffer], a
+ ld [wTextDecimalByte], a
ld hl, wTempMonDVs
predef GetUnownLetter
xor a
@@ -477,7 +477,7 @@
ld [hli], a
ld [hl], "<DOT>"
hlcoord 3, 13
- ld de, wDeciramBuffer
+ ld de, wTextDecimalByte
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
call PrintNum
call GetBasePokemonName
--- a/engine/events/happiness_egg.asm
+++ b/engine/events/happiness_egg.asm
@@ -11,7 +11,7 @@
jr .loop
.done
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld a, [hl]
ld [wScriptVar], a
call GetPokemonName
@@ -19,7 +19,7 @@
CheckFirstMonIsEgg:
ld a, [wPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
cp EGG
ld a, TRUE
jr z, .egg
--- a/engine/events/kurt.asm
+++ b/engine/events/kurt.asm
@@ -41,7 +41,7 @@
call Kurt_SelectQuantity
pop bc
jr nc, .loop
- ld a, [wItemQuantityChangeBuffer]
+ ld a, [wItemQuantityChange]
ld [wKurtApricornQuantity], a
call Kurt_GiveUpSelectedQuantityOfSelectedApricorn
@@ -55,7 +55,7 @@
ld hl, .MenuHeader
call CopyMenuHeader
ld a, [wMenuSelection]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
xor a
ldh [hBGMapMode], a
call InitScrollingMenu
@@ -104,7 +104,7 @@
ld [wCurItem], a
call Kurt_GetQuantityOfApricorn
ret z
- ld a, [wItemQuantityChangeBuffer]
+ ld a, [wItemQuantityChange]
ld [wMenuSelectionQuantity], a
farcall PlaceMenuItemQuantity
ret
@@ -114,10 +114,10 @@
ld [wMenuSelection], a
call Kurt_GetQuantityOfApricorn
jr z, .done
- ld a, [wItemQuantityChangeBuffer]
- ld [wItemQuantityBuffer], a
+ ld a, [wItemQuantityChange]
+ ld [wItemQuantity], a
ld a, $1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld hl, .MenuHeader
call LoadMenuHeader
.loop
@@ -137,8 +137,8 @@
ld a, b
cp -1
jr z, .done
- ld a, [wItemQuantityChangeBuffer]
- ld [wItemQuantityChangeBuffer], a ; What is the point of this operation?
+ ld a, [wItemQuantityChange]
+ ld [wItemQuantityChange], a ; What is the point of this operation?
scf
.done
@@ -167,7 +167,7 @@
add hl, de
ld [hl], "×"
inc hl
- ld de, wItemQuantityChangeBuffer
+ ld de, wItemQuantityChange
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
jp PrintNum
@@ -198,7 +198,7 @@
.done2
ld a, b
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
and a
pop bc
ret
@@ -309,7 +309,7 @@
ld [wCurItemQuantity], a
call Kurt_GetRidOfItem
pop hl
- ld a, [wItemQuantityChangeBuffer]
+ ld a, [wItemQuantityChange]
and a
jr z, .done
push hl
@@ -332,7 +332,7 @@
jr .loop4
.done
- ld a, [wItemQuantityChangeBuffer]
+ ld a, [wItemQuantityChange]
and a
pop bc
pop de
@@ -369,7 +369,7 @@
jr z, .done
cp c
jr nz, .done
- ld a, [wItemQuantityChangeBuffer]
+ ld a, [wItemQuantityChange]
ld c, a
ld a, [hl]
sub c
@@ -382,7 +382,7 @@
push bc
ld hl, wNumItems
ld a, b
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
call TossItem
pop bc
ld a, c
@@ -389,6 +389,6 @@
sub b
.done
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
pop bc
ret
--- a/engine/events/lucky_number.asm
+++ b/engine/events/lucky_number.asm
@@ -109,7 +109,7 @@
and a
push af
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, .LuckyNumberMatchPartyText
pop af
--- a/engine/events/misc_scripts.asm
+++ b/engine/events/misc_scripts.asm
@@ -39,7 +39,7 @@
xor a
ld [wScriptVar], a
ld a, [wItemBallItemID]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld hl, wStringBuffer3
call CopyName2
@@ -46,7 +46,7 @@
ld a, [wItemBallItemID]
ld [wCurItem], a
ld a, [wItemBallQuantity]
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld hl, wNumItems
call ReceiveItem
ret nc
--- a/engine/events/mom_phone.asm
+++ b/engine/events/mom_phone.asm
@@ -146,7 +146,7 @@
ld a, [hl]
ld [wCurItem], a
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld hl, wNumPCItems
call ReceiveItem
ret
--- a/engine/events/move_deleter.asm
+++ b/engine/events/move_deleter.asm
@@ -28,7 +28,7 @@
ld a, [wMenuCursorY]
push af
ld a, [wCurSpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetMoveName
ld hl, .AskDeleteMoveText
call PrintText
--- a/engine/events/move_tutor.asm
+++ b/engine/events/move_tutor.asm
@@ -6,9 +6,9 @@
ld b, SCGB_PACKPALS
call GetSGBLayout
xor a
- ld [wItemAttributeParamBuffer], a
+ ld [wItemAttributeValue], a
call .GetMoveTutorMove
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld [wPutativeTMHMMove], a
call GetMoveName
call CopyName1
--- a/engine/events/name_rater.asm
+++ b/engine/events/name_rater.asm
@@ -29,7 +29,7 @@
xor a ; PARTYMON
ld [wMonType], a
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld [wCurSpecies], a
call GetBaseData
ld b, NAME_MON
--- a/engine/events/npc_trade.asm
+++ b/engine/events/npc_trade.asm
@@ -21,7 +21,7 @@
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 @@
ld [wMonType], a
ld e, NPCTRADE_GENDER
- call GetTradeAttribute
+ call GetTradeAttr
ld a, [hl]
and a ; TRADE_GENDER_EITHER
jr z, .matching
@@ -106,7 +106,7 @@
Trade_GetDialog:
ld e, NPCTRADE_DIALOG
- call GetTradeAttribute
+ call GetTradeAttr
ld a, [hl]
ld [wTradeDialog], a
ret
@@ -113,12 +113,12 @@
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
@@ -164,7 +164,7 @@
ld [wPlayerTrademonCaughtData], a
ld e, NPCTRADE_DIALOG
- call GetTradeAttribute
+ call GetTradeAttr
ld a, [hl]
cp TRADE_DIALOGSET_GIRL
ld a, CAUGHT_BY_GIRL
@@ -187,7 +187,7 @@
predef TryAddMonToParty
ld e, NPCTRADE_DIALOG
- call GetTradeAttribute
+ call GetTradeAttr
ld a, [hl]
cp TRADE_DIALOGSET_GIRL
ld b, CAUGHT_BY_UNKNOWN
@@ -197,7 +197,7 @@
farcall SetGiftPartyMonCaughtData
ld e, NPCTRADE_NICK
- call GetTradeAttribute
+ call GetTradeAttr
ld de, wOTTrademonNickname
call CopyTradeName
@@ -208,7 +208,7 @@
call CopyTradeName
ld e, NPCTRADE_OT_NAME
- call GetTradeAttribute
+ call GetTradeAttr
push hl
ld de, wOTTrademonOTName
call CopyTradeName
@@ -223,7 +223,7 @@
call CopyTradeName
ld e, NPCTRADE_DVS
- call GetTradeAttribute
+ call GetTradeAttr
ld de, wOTTrademonDVs
call Trade_CopyTwoBytes
@@ -234,7 +234,7 @@
call Trade_CopyTwoBytes
ld e, NPCTRADE_OT_ID
- call GetTradeAttribute
+ call GetTradeAttr
ld de, wOTTrademonID + 1
call Trade_CopyTwoBytesReverseEndian
@@ -245,7 +245,7 @@
call Trade_CopyTwoBytes
ld e, NPCTRADE_ITEM
- call GetTradeAttribute
+ call GetTradeAttr
push hl
ld hl, wPartyMon1Item
ld bc, PARTYMON_STRUCT_LENGTH
@@ -272,7 +272,7 @@
pop af
ret
-GetTradeAttribute:
+GetTradeAttr:
ld d, 0
push de
ld a, [wJumptableIndex]
@@ -302,7 +302,7 @@
GetTradeMonName:
push de
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetBasePokemonName
ld hl, wStringBuffer1
pop de
@@ -345,7 +345,7 @@
GetTradeMonNames:
ld e, NPCTRADE_GETMON
- call GetTradeAttribute
+ call GetTradeAttr
ld a, [hl]
call GetTradeMonName
@@ -353,7 +353,7 @@
call CopyTradeName
ld e, NPCTRADE_GIVEMON
- call GetTradeAttribute
+ call GetTradeAttr
ld a, [hl]
call GetTradeMonName
@@ -369,7 +369,7 @@
dec hl
push hl
ld e, NPCTRADE_GENDER
- call GetTradeAttribute
+ call GetTradeAttr
ld a, [hl]
pop hl
and a ; TRADE_GENDER_EITHER
--- a/engine/events/odd_egg.asm
+++ b/engine/events/odd_egg.asm
@@ -51,26 +51,26 @@
ld a, EGG_TICKET
ld [wCurItem], a
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld a, -1
ld [wCurItemQuantity], a
ld hl, wNumItems
call TossItem
- ; load species in wcd2a
+ ; load species in wMobileMonSpecies
ld a, EGG
- ld [wMobileMonSpeciesBuffer], a
+ ld [wMobileMonSpecies], a
- ; load pointer to (wMobileMonSpeciesBuffer - 1) in wMobileMonSpeciesPointerBuffer
- ld a, LOW(wMobileMonSpeciesBuffer - 1)
- ld [wMobileMonSpeciesPointerBuffer], a
- ld a, HIGH(wMobileMonSpeciesBuffer - 1)
- ld [wMobileMonSpeciesPointerBuffer + 1], a
- ; load pointer to wOddEgg in wMobileMonStructurePointerBuffer
+ ; load pointer to (wMobileMonSpecies - 1) in wMobileMonSpeciesPointer
+ ld a, LOW(wMobileMonSpecies - 1)
+ ld [wMobileMonSpeciesPointer], a
+ ld a, HIGH(wMobileMonSpecies - 1)
+ ld [wMobileMonSpeciesPointer + 1], a
+ ; load pointer to wOddEgg in wMobileMonStructPointer
ld a, LOW(wOddEgg)
- ld [wMobileMonStructurePointerBuffer], a
+ ld [wMobileMonStructPointer], a
ld a, HIGH(wOddEgg)
- ld [wMobileMonStructurePointerBuffer + 1], a
+ ld [wMobileMonStructPointer + 1], a
; load Odd Egg Name in wTempOddEggNickname
ld hl, .Odd
@@ -78,16 +78,16 @@
ld bc, MON_NAME_LENGTH
call CopyBytes
- ; load pointer to wTempOddEggNickname in wMobileMonOTNamePointerBuffer
+ ; load pointer to wTempOddEggNickname in wMobileMonOTNamePointer
ld a, LOW(wTempOddEggNickname)
- ld [wMobileMonOTNamePointerBuffer], a
+ ld [wMobileMonOTNamePointer], a
ld a, HIGH(wTempOddEggNickname)
- ld [wMobileMonOTNamePointerBuffer + 1], a
- ; load pointer to wOddEggName in wMobileMonNicknamePointerBuffer
+ ld [wMobileMonOTNamePointer + 1], a
+ ; load pointer to wOddEggName in wMobileMonNicknamePointer
ld a, LOW(wOddEggName)
- ld [wMobileMonNicknamePointerBuffer], a
+ ld [wMobileMonNicknamePointer], a
ld a, HIGH(wOddEggName)
- ld [wMobileMonNicknamePointerBuffer + 1], a
+ ld [wMobileMonNicknamePointer + 1], a
farcall AddMobileMonToParty
ret
--- a/engine/events/pokecenter_pc.asm
+++ b/engine/events/pokecenter_pc.asm
@@ -342,13 +342,13 @@
.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 @@
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 @@
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 @@
ret
.tossable
- ld a, [wPCItemQuantityChangeBuffer]
+ ld a, [wPCItemQuantityChange]
push af
ld a, [wPCItemQuantity]
push af
@@ -498,16 +498,16 @@
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 @@
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 @@
ld c, 18
call Textbox
ld a, [wPCItemsCursor]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, [wPCItemsScrollPosition]
ld [wMenuScrollPosition], a
call ScrollingMenu
--- a/engine/events/specials.asm
+++ b/engine/events/specials.asm
@@ -34,7 +34,7 @@
call SetSeenAndCaughtMon
call FadeToMenu
ld a, [wScriptVar]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
farcall NewPokedexEntry
call ExitAllMenus
ret
@@ -144,7 +144,7 @@
ld a, [sMysteryGiftItem]
ld [wCurItem], a
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld hl, wNumItems
call ReceiveItem
jr nc, .no_room
@@ -152,7 +152,7 @@
ld [sMysteryGiftItem], a
call CloseSRAM
ld a, [wCurItem]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld hl, .ReceiveItemText
call PrintText
--- a/engine/items/buy_sell_toss.asm
+++ b/engine/items/buy_sell_toss.asm
@@ -29,7 +29,7 @@
Toss_Sell_Loop:
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
.loop
call BuySellToss_UpdateQuantityDisplay ; update display
call BuySellToss_InterpretJoypad ; joy action
@@ -71,10 +71,10 @@
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
@@ -82,9 +82,9 @@
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
@@ -94,7 +94,7 @@
ret
.left
- ld a, [wItemQuantityChangeBuffer]
+ ld a, [wItemQuantityChange]
sub 10
jr c, .load_1
jr z, .load_1
@@ -104,15 +104,15 @@
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
@@ -119,7 +119,7 @@
.finish_right
ld a, b
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
and a
ret
@@ -130,7 +130,7 @@
add hl, de
ld [hl], "×"
inc hl
- ld de, wItemQuantityChangeBuffer
+ ld de, wItemQuantityChange
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
call PrintNum
ld a, [wMenuDataPointer]
@@ -163,7 +163,7 @@
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
--- 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
@@ -566,7 +566,7 @@
call PrintText
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
call YesNoBox
@@ -626,7 +626,7 @@
call PrintText
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
call YesNoBox
@@ -702,7 +702,7 @@
.toss
ld hl, wNumItems
inc a
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
jp TossItem
.used_park_ball
@@ -2333,7 +2333,7 @@
push hl
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetMoveName
call CopyName1
pop hl
@@ -2594,7 +2594,7 @@
UseDisposableItem:
ld hl, wNumItems
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
jp TossItem
UseBallInTrainerBattle:
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -4,7 +4,7 @@
push hl
call CheckItemPocket
pop de
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
dec a
ld hl, .Pockets
rst JumpTable
@@ -45,7 +45,7 @@
push hl
call CheckItemPocket
pop de
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
dec a
ld hl, .Pockets
rst JumpTable
@@ -88,7 +88,7 @@
push hl
call CheckItemPocket
pop de
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
dec a
ld hl, .Pockets
rst JumpTable
@@ -172,7 +172,7 @@
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 @@
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 @@
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,7 +213,7 @@
.newstack
ld [hl], MAX_ITEM_STACK
sub MAX_ITEM_STACK
- ld [wItemQuantityBuffer], a
+ ld [wItemQuantity], a
jr .loop2
.terminator2
@@ -220,7 +220,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
add hl, bc
xor a
- ld [wItemAttributeParamBuffer], a
+ ld [wItemAttributeValue], a
ld a, [wCurItem]
dec a
@@ -562,7 +562,7 @@
ItemAttr_ReturnCarry:
ld a, 1
- ld [wItemAttributeParamBuffer], a
+ ld [wItemAttributeValue], a
scf
ret
--- a/engine/items/mart.asm
+++ b/engine/items/mart.asm
@@ -339,7 +339,7 @@
xor a
ld [wMenuScrollPositionBackup], a
ld a, 1
- ld [wMenuCursorBufferBackup], a
+ ld [wMenuCursorPositionBackup], a
.loop
call BuyMenuLoop ; menu loop
jr nc, .loop
@@ -431,8 +431,8 @@
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
@@ -439,7 +439,7 @@
ld a, [wMenuScrollPosition]
ld [wMenuScrollPositionBackup], a
ld a, [wMenuCursorY]
- ld [wMenuCursorBufferBackup], a
+ ld [wMenuCursorPositionBackup], a
call SpeechTextbox
ld a, [wMenuJoypad]
cp B_BUTTON
@@ -499,7 +499,7 @@
StandardMartAskPurchaseQuantity:
ld a, MAX_ITEM_STACK
- ld [wItemQuantityBuffer], a
+ ld [wItemQuantity], a
ld a, MARTTEXT_HOW_MANY
call LoadBuyMenuText
farcall SelectQuantityToBuy
@@ -515,7 +515,7 @@
BargainShopAskPurchaseQuantity:
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld a, [wMartItemID]
ld e, a
ld d, 0
@@ -558,7 +558,7 @@
call LoadBuyMenuText
call .GetSalePrice
ld a, MAX_ITEM_STACK
- ld [wItemQuantityBuffer], a
+ ld [wItemQuantity], a
farcall RooftopSale_SelectQuantityToBuy
call ExitMenu
ret
@@ -734,7 +734,7 @@
.TryToSellItem:
farcall CheckItemMenu
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
ld hl, .dw
rst JumpTable
ret
@@ -753,7 +753,7 @@
.try_sell
farcall _CheckTossableItem
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
and a
jr z, .okay_to_sell
ld hl, MartCantBuyText
--- a/engine/items/pack.asm
+++ b/engine/items/pack.asm
@@ -74,7 +74,7 @@
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 @@
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 @@
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 @@
ld hl, BallsPocketMenuHeader
call CopyMenuHeader
ld a, [wBallsPocketCursor]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, [wBallsPocketScrollPosition]
ld [wMenuScrollPosition], a
call ScrollingMenu
@@ -241,15 +241,15 @@
.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
@@ -256,7 +256,7 @@
.selectable
farcall CheckItemMenu
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
and a
jr nz, .selectable_usable
jr .selectable_unusable
@@ -263,7 +263,7 @@
.tossable
farcall CheckSelectableItem
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
and a
jr nz, .tossable_selectable
jr .tossable_unselectable
@@ -424,7 +424,7 @@
UseItem:
farcall CheckItemMenu
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
ld hl, .dw
rst JumpTable
ret
@@ -529,7 +529,7 @@
RegisterItem:
farcall CheckSelectableItem
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
and a
jr nz, .cant_register
ld a, [wCurPocket]
@@ -683,7 +683,7 @@
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 @@
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 @@
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 @@
ItemSubmenu:
farcall CheckItemContext
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
TMHMSubmenu:
and a
jr z, .NoUse
@@ -834,7 +834,7 @@
.Use:
farcall CheckItemContext
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
ld hl, .ItemFunctionJumptable
rst JumpTable
ret
@@ -951,7 +951,7 @@
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 @@
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 @@
ld hl, PC_Mart_BallsPocketMenuHeader
call CopyMenuHeader
ld a, [wBallsPocketCursor]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, [wBallsPocketScrollPosition]
ld [wMenuScrollPosition], a
call ScrollingMenu
@@ -1415,7 +1415,7 @@
Pack_GetItemName:
ld a, [wCurItem]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
call CopyName1
ret
--- a/engine/items/tmhm.asm
+++ b/engine/items/tmhm.asm
@@ -15,7 +15,7 @@
ld b, 0
add hl, bc
ld a, [hl]
- ld [wItemQuantityBuffer], a
+ ld [wItemQuantity], a
call .ConvertItemToTMHMNumber
scf
ret
@@ -377,7 +377,7 @@
ld [wTempTMHM], a
.okay
predef GetTMHMMove
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
ld [wPutativeTMHMMove], a
call GetMoveName
pop hl
--- a/engine/link/init_list.asm
+++ b/engine/link/init_list.asm
@@ -38,7 +38,7 @@
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 @@
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
--- a/engine/link/link.asm
+++ b/engine/link/link.asm
@@ -990,7 +990,7 @@
ld d, h
ld e, l
ld bc, wLinkOTPartyMonTypes
- ld hl, wCurLinkOTPartyMonTypePtr
+ ld hl, wCurLinkOTPartyMonTypePointer
ld a, c
ld [hli], a
ld [hl], b
@@ -1040,7 +1040,7 @@
ld a, [de]
inc de
ld [hl], a
- ld hl, wCurLinkOTPartyMonTypePtr
+ ld hl, wCurLinkOTPartyMonTypePointer
ld a, [hli]
ld h, [hl]
ld l, a
@@ -1051,9 +1051,9 @@
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
@@ -1504,7 +1504,7 @@
ld b, 0
add hl, bc
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
hlcoord 0, 12
ld b, 4
@@ -1669,7 +1669,7 @@
ld b, 0
add hl, bc
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
ld de, wBufferTrademonNick
@@ -1681,7 +1681,7 @@
ld b, 0
add hl, bc
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, LinkAskTradeForText
bccoord 1, 14
@@ -2123,7 +2123,7 @@
jr .done
.mon_too_new
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld a, $1
jr .done
@@ -2130,7 +2130,7 @@
.move_too_new
push bc
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetMoveName
call CopyName1
pop bc
@@ -2156,7 +2156,7 @@
ld hl, wPartyCount
add hl, bc
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ret
--- a/engine/link/mystery_gift.asm
+++ b/engine/link/mystery_gift.asm
@@ -123,7 +123,7 @@
farcall MysteryGiftGetItem
ld a, c
ld [sBackupMysteryGiftItem], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call CloseSRAM
call GetItemName
ld hl, .MysteryGiftSentText ; sent item/decoration
@@ -1602,7 +1602,7 @@
ld de, wNameCardData
farcall Function8ac70
ld a, c
- ld [wDeciramBuffer], a
+ ld [wTextDecimalByte], a
ld hl, .NameCardNotRegisteredCardText
jr c, .PrintTextAndExit
ld hl, .NameCardListedCardText
--- a/engine/link/time_capsule.asm
+++ b/engine/link/time_capsule.asm
@@ -122,7 +122,7 @@
ld a, [de]
cp -1
ret z
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
push bc
push hl
push de
--- a/engine/menus/menu.asm
+++ b/engine/menus/menu.asm
@@ -51,7 +51,7 @@
ld c, a
ld a, [w2DMenuNumRows]
call SimpleMultiply
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
and a
ret
@@ -91,7 +91,7 @@
ld c, a
ld a, [wMenuCursorX]
add c
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
and a
ret
@@ -172,7 +172,7 @@
call .InitFlags_c
ld a, [w2DMenuNumCols]
ld e, a
- ld a, [wMenuCursorBuffer]
+ ld a, [wMenuCursorPosition]
ld b, a
xor a
ld d, 0
@@ -780,7 +780,7 @@
.skip_bit_1
ld [hli], a
; wMenuCursorY
- ld a, [wMenuCursorBuffer]
+ ld a, [wMenuCursorPosition]
and a
jr z, .load_at_the_top
ld c, a
--- 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 @@
ld a, [wMenuSelection]
ld [wCurItem], a
farcall _CheckTossableItem
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
pop hl
and a
jr nz, .done
@@ -169,7 +169,7 @@
and a
ld de, .NoneString
jr z, .no_contest_mon
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
.no_contest_mon
--- a/engine/menus/naming_screen.asm
+++ b/engine/menus/naming_screen.asm
@@ -91,7 +91,7 @@
ld e, MONICON_NAMINGSCREEN
rst FarCall
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
hlcoord 5, 2
call PlaceString
--- a/engine/menus/scrolling_menu.asm
+++ b/engine/menus/scrolling_menu.asm
@@ -91,7 +91,7 @@
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 @@
.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 @@
xor a
ld [wMenuScrollPosition], a
ld a, $1
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
.done
ret
@@ -307,7 +307,7 @@
ld [wMenuJoypadFilter], a
ld a, [w2DMenuNumRows]
ld b, a
- ld a, [wMenuCursorBuffer]
+ ld a, [wMenuCursorPosition]
and a
jr z, .reset_cursor
cp b
--- a/engine/menus/start_menu.asm
+++ b/engine/menus/start_menu.asm
@@ -27,8 +27,8 @@
.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 @@
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
--- a/engine/movie/trade_animation.asm
+++ b/engine/movie/trade_animation.asm
@@ -819,7 +819,7 @@
TradeAnim_GetNickname:
push de
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
pop de
--- a/engine/overworld/decorations.asm
+++ b/engine/overworld/decorations.asm
@@ -16,7 +16,7 @@
ld [wCurDecorationCategory], a
.top_loop
ld a, [wCurDecorationCategory]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
call .FindCategoriesWithOwnedDecos
call DoNthMenu
ld a, [wMenuCursorY]
@@ -561,7 +561,7 @@
.getpokename
push bc
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
pop bc
jr .copy
--- a/engine/overworld/scripting.asm
+++ b/engine/overworld/scripting.asm
@@ -137,7 +137,7 @@
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
@@ -434,7 +434,7 @@
ld a, [wScriptBank]
ld hl, _2DMenu
rst FarCall
- ld a, [wMenuCursorBuffer]
+ ld a, [wMenuCursorPosition]
jr nc, .ok
xor a
.ok
@@ -490,7 +490,7 @@
call GetScriptByte
call GetVarAction
ld a, [de]
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld hl, wNumItems
call ReceiveItem
ld a, TRUE
@@ -524,7 +524,7 @@
Script_specialsound:
farcall CheckItemPocket
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
cp TM_HM
ld de, SFX_GET_TM
jr z, .play
@@ -536,7 +536,7 @@
GetPocketName:
farcall CheckItemPocket
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
dec a
ld hl, ItemPocketNames
maskbits NUM_POCKETS
@@ -555,7 +555,7 @@
CurItemName:
ld a, [wCurItem]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ret
@@ -1577,7 +1577,7 @@
jr nz, .gotit
ld a, [wScriptVar]
.gotit
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld de, wStringBuffer1
@@ -1601,7 +1601,7 @@
jr nz, .ok
ld a, [wScriptVar]
.ok
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld de, wStringBuffer1
jr GetStringBuffer
@@ -1633,7 +1633,7 @@
Script_getname:
call GetScriptByte
- ld [wNamedObjectTypeBuffer], a
+ ld [wNamedObjectType], a
ContinueToGetName:
call GetScriptByte
@@ -1644,7 +1644,7 @@
Script_gettrainerclassname:
ld a, TRAINER_NAME
- ld [wNamedObjectTypeBuffer], a
+ ld [wNamedObjectType], a
jr ContinueToGetName
Script_getmoney:
@@ -1728,7 +1728,7 @@
.ok
ld [wCurItem], a
call GetScriptByte
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld hl, wNumItems
call ReceiveItem
jr nc, .full
@@ -1746,7 +1746,7 @@
call GetScriptByte
ld [wCurItem], a
call GetScriptByte
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld a, -1
ld [wCurItemQuantity], a
ld hl, wNumItems
@@ -2198,9 +2198,9 @@
call GetScriptByte
ret
-Script_writeunusedbytebuffer:
+Script_writeunusedbyte:
call GetScriptByte
- ld [wUnusedScriptByteBuffer], a
+ ld [wUnusedScriptByte], a
ret
UnusedClosetextScript: ; unreferenced
--- a/engine/overworld/select_menu.asm
+++ b/engine/overworld/select_menu.asm
@@ -109,7 +109,7 @@
UseRegisteredItem:
farcall CheckItemMenu
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
ld hl, .SwitchTo
rst JumpTable
ret
--- a/engine/overworld/time.asm
+++ b/engine/overworld/time.asm
@@ -4,7 +4,7 @@
ClearDailyTimers:
xor a
- ld [wLuckyNumberDayBuffer], a
+ ld [wLuckyNumberDayTimer], a
ld [wUnusedTwoDayTimer], a
ld [wDailyResetTimer], a
ret
@@ -235,7 +235,7 @@
RestartLuckyNumberCountdown:
call .GetDaysUntilNextFriday
- ld hl, wLuckyNumberDayBuffer
+ ld hl, wLuckyNumberDayTimer
jp InitNDaysCountdown
.GetDaysUntilNextFriday:
@@ -253,7 +253,7 @@
ret
_CheckLuckyNumberShowFlag:
- ld hl, wLuckyNumberDayBuffer
+ ld hl, wLuckyNumberDayTimer
jp CheckDayDependentEventHL
DoMysteryGiftIfDayHasPassed:
--- a/engine/overworld/wildmons.asm
+++ b/engine/overworld/wildmons.asm
@@ -28,7 +28,7 @@
FindNest:
; Parameters:
; e: 0 = Johto, 1 = Kanto
-; wNamedObjectIndexBuffer: species
+; wNamedObjectIndex: species
hlcoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
xor a
@@ -102,7 +102,7 @@
inc hl
.ScanMapLoop:
push af
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
cp [hl]
jr z, .found
inc hl
@@ -144,7 +144,7 @@
.RoamMon1:
ld a, [wRoamMon1Species]
ld b, a
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
cp b
ret nz
ld a, [wRoamMon1MapGroup]
@@ -160,7 +160,7 @@
.RoamMon2:
ld a, [wRoamMon2Species]
ld b, a
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
cp b
ret nz
ld a, [wRoamMon2MapGroup]
@@ -822,7 +822,7 @@
ld de, wStringBuffer1
call CopyName1
ld a, c
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, .JustSawSomeRareMonText
call PrintText
@@ -871,7 +871,7 @@
add hl, bc
inc hl
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
ld de, wStringBuffer4
@@ -954,7 +954,7 @@
inc hl ; species
ld a, BANK(Trainers)
call GetFarByte
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
ld de, wStringBuffer4
--- a/engine/pokedex/pokedex.asm
+++ b/engine/pokedex/pokedex.asm
@@ -1493,7 +1493,8 @@
.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
--- a/engine/pokegear/pokegear.asm
+++ b/engine/pokegear/pokegear.asm
@@ -1037,13 +1037,13 @@
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
@@ -1052,9 +1052,9 @@
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
--- a/engine/pokegear/radio.asm
+++ b/engine/pokegear/radio.asm
@@ -257,7 +257,7 @@
inc hl ; skip level
ld a, BANK(JohtoGrassWildMons)
call GetFarByte
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld [wCurPartySpecies], a
call GetPokemonName
ld hl, wStringBuffer1
@@ -319,7 +319,7 @@
OaksPKMNTalk7:
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, OPT_MaryText1
ld a, OAKS_POKEMON_TALK_8
@@ -674,7 +674,7 @@
inc c
ld a, c
ld [wCurPartySpecies], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, PokedexShowText
ld a, POKEDEX_SHOW_2
@@ -1552,7 +1552,7 @@
ld l, c
add hl, de
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ret
.RawString:
--- a/engine/pokemon/bills_pc.asm
+++ b/engine/pokemon/bills_pc.asm
@@ -130,7 +130,7 @@
ld hl, BillsPCDepositMenuHeader
call CopyMenuHeader
ld a, [wMenuCursorY]
- call StoreTo_wMenuCursorBuffer
+ call StoreMenuCursorPosition
call VerticalMenu
jp c, BillsPCDepositFuncCancel
ld a, [wMenuCursorY]
@@ -387,7 +387,7 @@
ld hl, .MenuHeader
call CopyMenuHeader
ld a, [wMenuCursorY]
- call StoreTo_wMenuCursorBuffer
+ call StoreMenuCursorPosition
call VerticalMenu
jp c, .cancel
ld a, [wMenuCursorY]
@@ -638,7 +638,7 @@
ld hl, .MenuHeader
call CopyMenuHeader
ld a, [wMenuCursorY]
- call StoreTo_wMenuCursorBuffer
+ call StoreMenuCursorPosition
call VerticalMenu
jp c, .Cancel
ld a, [wMenuCursorY]
@@ -2314,9 +2314,9 @@
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
--- a/engine/pokemon/bills_pc_top.asm
+++ b/engine/pokemon/bills_pc_top.asm
@@ -47,7 +47,7 @@
call LoadMenuHeader
ld a, $1
.loop
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
call SetPalettes
xor a
ld [wWhichIndexSet], a
@@ -54,7 +54,7 @@
ldh [hBGMapMode], a
call DoNthMenu
jr c, .cancel
- ld a, [wMenuCursorBuffer]
+ ld a, [wMenuCursorPosition]
push af
ld a, [wMenuSelection]
ld hl, .Jumptable
--- a/engine/pokemon/breeding.asm
+++ b/engine/pokemon/breeding.asm
@@ -250,7 +250,7 @@
ld a, [wCurPartySpecies]
dec de
ld [de], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld [wCurSpecies], a
call GetPokemonName
xor a
@@ -673,7 +673,7 @@
ret
EggHatch_AnimationSequence:
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
ld [wJumptableIndex], a
ld a, [wCurSpecies]
push af
--- a/engine/pokemon/caught_data.asm
+++ b/engine/pokemon/caught_data.asm
@@ -38,7 +38,7 @@
ld hl, wPlayerName
call CopyBytes
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
ld de, wMonOrItemNameBuffer
@@ -105,7 +105,7 @@
call CopyBytes
callfar InsertPokemonIntoBox
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
call GiveANickname_YesNo
ld hl, wStringBuffer1
--- a/engine/pokemon/correct_party_errors.asm
+++ b/engine/pokemon/correct_party_errors.asm
@@ -123,7 +123,7 @@
cp EGG
ld hl, .TAMAGO
jr z, .got_nickname
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
.got_nickname
--- a/engine/pokemon/evolve.asm
+++ b/engine/pokemon/evolve.asm
@@ -236,7 +236,7 @@
ld [wCurSpecies], a
ld [wTempMonSpecies], a
ld [wEvolutionNewSpecies], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
push hl
@@ -348,7 +348,7 @@
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 @@
call AddNTimes
push hl
ld a, [wCurSpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
pop de
@@ -462,7 +462,7 @@
.learn
ld a, d
ld [wPutativeTMHMMove], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetMoveName
call CopyName1
predef LearnMove
--- a/engine/pokemon/learn.asm
+++ b/engine/pokemon/learn.asm
@@ -36,7 +36,7 @@
push hl
push de
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld b, a
ld a, [wBattleMode]
--- a/engine/pokemon/mail.asm
+++ b/engine/pokemon/mail.asm
@@ -382,7 +382,7 @@
call UpdateSprites
ld a, [wCurMessageIndex]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, [wCurMessageScrollPosition]
ld [wMenuScrollPosition], a
call ScrollingMenu
@@ -439,7 +439,7 @@
dec a
call .GetMailType
ld a, 1
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
ld hl, wNumItems
call ReceiveItem
jr c, .put_in_bag
--- a/engine/pokemon/mon_menu.asm
+++ b/engine/pokemon/mon_menu.asm
@@ -26,7 +26,7 @@
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 @@
PartyMonItemName:
ld a, [wCurItem]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
call CopyName1
ret
@@ -252,7 +252,7 @@
jr z, .next
call CheckTossableItem
- ld a, [wItemAttributeParamBuffer]
+ ld a, [wItemAttributeValue]
and a
jr nz, .next
@@ -296,7 +296,7 @@
ret
.already_holding_item
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ld hl, PokemonAskSwapItemText
call StartMenuYesNo
@@ -303,10 +303,10 @@
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 @@
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 @@
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 @@
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
@@ -899,7 +899,7 @@
.skip_joy
call PrepareToPlaceMoveData
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
and a
jr nz, .moving_move
call PlaceMoveData
@@ -920,14 +920,14 @@
.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
@@ -934,7 +934,7 @@
jp .loop
.d_right
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
and a
jp nz, .joy_loop
@@ -949,7 +949,7 @@
jp MoveScreenLoop
.d_left
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
and a
jp nz, .joy_loop
ld a, [wCurPartyMon]
@@ -1000,11 +1000,11 @@
.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
@@ -1057,7 +1057,7 @@
ld d, h
ld e, l
pop hl
- ld a, [wMoveSwapBuffer]
+ ld a, [wSwappingMove]
dec a
ld c, a
ld b, 0
@@ -1071,7 +1071,7 @@
.exit
xor a
- ld [wMoveSwapBuffer], a
+ ld [wSwappingMove], a
ld hl, w2DMenuFlags1
res 6, [hl]
call ClearSprites
@@ -1137,7 +1137,7 @@
SetUpMoveList:
xor a
ldh [hBGMapMode], a
- ld [wMoveSwapBuffer], a
+ ld [wSwappingMove], a
ld [wMonType], a
predef CopyMonToTempMon
ld hl, wTempMonMoves
@@ -1202,8 +1202,8 @@
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
--- a/engine/pokemon/mon_stats.asm
+++ b/engine/pokemon/mon_stats.asm
@@ -448,7 +448,7 @@
push hl
ld [wCurSpecies], a
ld a, MOVE_NAME
- ld [wNamedObjectTypeBuffer], a
+ ld [wNamedObjectType], a
call GetName
ld de, wStringBuffer1
pop hl
--- a/engine/pokemon/mon_submenu.asm
+++ b/engine/pokemon/mon_submenu.asm
@@ -100,7 +100,7 @@
jr z, .NotMove
inc hl
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetMoveName
ret
--- a/engine/pokemon/move_mon.asm
+++ b/engine/pokemon/move_mon.asm
@@ -54,7 +54,7 @@
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 @@
call CopyBytes
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
cp EGG
jr z, .egg
dec a
@@ -972,7 +972,7 @@
call CopyBytes
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld de, sBoxMonNicknames
@@ -1671,7 +1671,7 @@
.done
ld a, [wCurPartySpecies]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld [wTempEnemyMonSpecies], a
call GetPokemonName
ld hl, wStringBuffer1
--- a/engine/pokemon/stats_screen.asm
+++ b/engine/pokemon/stats_screen.asm
@@ -416,7 +416,7 @@
xor a
ldh [hBGMapMode], a
ld a, [wBaseDexNo]
- ld [wDeciramBuffer], a
+ ld [wTextDecimalByte], a
ld [wCurSpecies], a
hlcoord 8, 0
ld [hl], "№"
@@ -425,7 +425,7 @@
inc hl
hlcoord 10, 0
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
- ld de, wDeciramBuffer
+ ld de, wTextDecimalByte
call PrintNum
hlcoord 14, 0
call PrintLevel
@@ -440,7 +440,7 @@
ld a, "/"
ld [hli], a
ld a, [wBaseDexNo]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
call PlaceString
call StatsScreen_PlaceHorizontalDivider
@@ -748,7 +748,7 @@
ld b, a
farcall TimeCapsule_ReplaceTeruSama
ld a, b
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
ret
--- a/engine/pokemon/types.asm
+++ b/engine/pokemon/types.asm
@@ -74,9 +74,9 @@
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
--- a/engine/predef.asm
+++ b/engine/predef.asm
@@ -3,9 +3,9 @@
; 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]
--- a/engine/printer/print_party.asm
+++ b/engine/printer/print_party.asm
@@ -170,7 +170,7 @@
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 @@
inc hl
ld [hl], "."
inc hl
- ld de, wNamedObjectIndexBuffer
+ ld de, wNamedObjectIndex
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
call PrintNum
hlcoord 1, 9
@@ -297,7 +297,7 @@
and a
jr z, .no_move
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetMoveName
jr .got_string
--- a/engine/printer/printer.asm
+++ b/engine/printer/printer.asm
@@ -728,7 +728,7 @@
ld a, [de]
cp $ff
jp z, .finish
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
ld [wCurPartySpecies], a
push bc
--- a/engine/rtc/timeset.asm
+++ b/engine/rtc/timeset.asm
@@ -683,8 +683,8 @@
inc hl
pop bc
call AdjustHourForAMorPM
- ld [wDeciramBuffer], a
- ld de, wDeciramBuffer
+ ld [wTextDecimalByte], a
+ ld de, wTextDecimalByte
call PrintTwoDigitNumberLeftAlign
ret
--- a/home/farcall.asm
+++ b/home/farcall.asm
@@ -28,9 +28,9 @@
; 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
@@ -38,9 +38,9 @@
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
--- a/home/map.asm
+++ b/home/map.asm
@@ -1278,7 +1278,7 @@
ret
UpdateBGMapRow::
- ld hl, wBGMapBufferPtrs
+ ld hl, wBGMapBufferPointers
push de
call .iteration
pop de
@@ -1309,7 +1309,7 @@
ret
UpdateBGMapColumn::
- ld hl, wBGMapBufferPtrs
+ ld hl, wBGMapBufferPointers
ld c, SCREEN_HEIGHT
.loop
ld a, e
--- a/home/menu.asm
+++ b/home/menu.asm
@@ -321,8 +321,8 @@
ld [wMenuDataBank], a
ret
-StoreTo_wMenuCursorBuffer::
- ld [wMenuCursorBuffer], a
+StoreMenuCursorPosition::
+ ld [wMenuCursorPosition], a
ret
MenuTextbox::
@@ -684,7 +684,7 @@
ld a, [hl]
ld [wMenuSelection], a
ld a, [wMenuCursorY]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
and a
ret
@@ -829,7 +829,7 @@
ldh a, [hROMBank]
ld [wMenuData_2DMenuItemStringsBank], a
farcall _2DMenu_
- ld a, [wMenuCursorBuffer]
+ ld a, [wMenuCursorPosition]
ret
InterpretBattleMenu::
@@ -836,7 +836,7 @@
ldh a, [hROMBank]
ld [wMenuData_2DMenuItemStringsBank], a
farcall _InterpretBattleMenu
- ld a, [wMenuCursorBuffer]
+ ld a, [wMenuCursorPosition]
ret
InterpretMobileMenu:: ; unreferenced
@@ -843,5 +843,5 @@
ldh a, [hROMBank]
ld [wMenuData_2DMenuItemStringsBank], a
farcall _InterpretMobileMenu
- ld a, [wMenuCursorBuffer]
+ ld a, [wMenuCursorPosition]
ret
--- a/home/names.asm
+++ b/home/names.asm
@@ -10,7 +10,7 @@
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 @@
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 @@
jr .done
.NotPokeName:
- ld a, [wNamedObjectTypeBuffer]
+ ld a, [wNamedObjectType]
dec a
ld e, a
ld d, 0
@@ -110,7 +110,7 @@
ret
GetPokemonName::
-; Get Pokemon name for wNamedObjectIndexBuffer.
+; Get Pokemon name for wNamedObjectIndex.
ldh a, [hROMBank]
push af
@@ -119,7 +119,7 @@
rst Bankswitch
; Each name is ten characters
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
dec a
ld d, 0
ld e, a
@@ -147,11 +147,11 @@
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
@@ -158,7 +158,7 @@
ld [wCurSpecies], a
ld a, ITEM_NAME
- ld [wNamedObjectTypeBuffer], a
+ ld [wNamedObjectType], a
call GetName
jr .Copied
.TM:
@@ -170,12 +170,12 @@
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
@@ -197,7 +197,7 @@
; TM/HM number
push de
- ld a, [wNamedObjectIndexBuffer]
+ ld a, [wNamedObjectIndex]
ld c, a
callfar GetTMHMNumber
pop de
@@ -235,7 +235,7 @@
ld [de], a
pop af
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
pop bc
pop de
pop hl
@@ -257,9 +257,9 @@
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
--- a/home/pokemon.asm
+++ b/home/pokemon.asm
@@ -229,8 +229,8 @@
ld c, 3
Print8BitNumLeftAlign::
- ld [wDeciramBuffer], a
- ld de, wDeciramBuffer
+ ld [wTextDecimalByte], a
+ ld de, wTextDecimalByte
ld b, PRINTNUM_LEFTALIGN | 1
jp PrintNum
--- a/home/predef.asm
+++ b/home/predef.asm
@@ -8,7 +8,7 @@
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 @@
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 @@
; 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
--- a/home/random.asm
+++ b/home/random.asm
@@ -41,10 +41,10 @@
call _BattleRandom
- ld [wPredefTemp + 1], a
+ ld [wPredefHL + 1], a
pop af
rst Bankswitch
- ld a, [wPredefTemp + 1]
+ ld a, [wPredefHL + 1]
ret
RandomRange::
--- 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 @@
ret
ReinitSpriteAnimFrame::
- 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
--- a/home/video.asm
+++ b/home/video.asm
@@ -19,7 +19,7 @@
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.
@@ -32,9 +32,9 @@
ldh a, [rVBK]
push af
-; 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
--- a/macros/legacy.asm
+++ b/macros/legacy.asm
@@ -176,31 +176,32 @@
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"
-storetext EQUS "battletowertext"
-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"
+storetext EQUS "battletowertext"
+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
--- a/macros/scripts/events.asm
+++ b/macros/scripts/events.asm
@@ -489,9 +489,9 @@
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
--- a/mobile/fixed_words.asm
+++ b/mobile/fixed_words.asm
@@ -261,7 +261,7 @@
.get_name
ld a, e
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
ld bc, MON_NAME_LENGTH - 1
--- a/mobile/mobile_12.asm
+++ b/mobile/mobile_12.asm
@@ -295,7 +295,7 @@
call WaitBGMap
ld a, [wPlayerGender]
inc a
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
call StaticMenuJoypad
call PlayClickSFX
call ExitMenu
@@ -339,7 +339,7 @@
ld b, $c
ld c, $8
call Function48cdc
- ld a, [wMenuCursorBuffer]
+ ld a, [wMenuCursorPosition]
ld b, a
ld a, [wMenuScrollPosition]
ld c, a
@@ -350,7 +350,7 @@
jr c, .asm_4833f
sub $29
inc a
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, $29
.asm_4833f
ld [wMenuScrollPosition], a
@@ -363,7 +363,7 @@
ld d, a
pop bc
ld a, b
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, c
ld [wMenuScrollPosition], a
ld a, d
@@ -412,7 +412,7 @@
.asm_483af
ld hl, wMenuCursorY
ld a, [hl]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
scf
.asm_483b7
pop bc
--- a/mobile/mobile_12_2.asm
+++ b/mobile/mobile_12_2.asm
@@ -719,7 +719,7 @@
ld a, $b
ld [wMenuBorderLeftCoord], a
ld a, $1
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
call InitVerticalMenuCursor
ld hl, w2DMenuFlags1
set 6, [hl]
--- a/mobile/mobile_22.asm
+++ b/mobile/mobile_22.asm
@@ -234,7 +234,7 @@
add $5
ld [hl], a
pop af
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
call PushWindow
call Mobile22_SetBGMapMode0
call Mobile_EnableSpriteUpdates
@@ -2087,7 +2087,7 @@
push af
call CopyMenuHeader
pop af
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
call Mobile22_SetBGMapMode0
call PlaceVerticalMenuItems
call InitVerticalMenuCursor
@@ -2904,7 +2904,7 @@
call Function8a3b2
pop bc
ld a, c
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld [wMenuSelection], a
call PlaceVerticalMenuItems
call InitVerticalMenuCursor
--- a/mobile/mobile_22_2.asm
+++ b/mobile/mobile_22_2.asm
@@ -772,7 +772,7 @@
ld hl, MenuHeader_0x8b867
call CopyMenuHeader
ld a, [wd030]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ld a, [wd031]
ld [wMenuScrollPosition], a
ld a, [wd032]
@@ -848,7 +848,7 @@
Function8b84b:
ld [wMenuScrollPosition], a
ld a, [wMenuCursorY]
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
ret
Function8b855:
--- a/mobile/mobile_40.asm
+++ b/mobile/mobile_40.asm
@@ -1698,14 +1698,14 @@
call FarCall_de
ld a, BANK(BattleMenuHeader)
ld [wMenuData_2DMenuItemStringsBank], a
- ld a, [wBattleMenuCursorBuffer]
- ld [wMenuCursorBuffer], a
+ ld a, [wBattleMenuCursorPosition]
+ ld [wMenuCursorPosition], a
call Function100e72
call Function100b45
farcall InitPartyMenuBGPal7
call Function100ed4
- ld a, [wMenuCursorBuffer]
- ld [wBattleMenuCursorBuffer], a
+ ld a, [wMenuCursorPosition]
+ ld [wBattleMenuCursorPosition], a
call ExitMenu
ret
@@ -1730,7 +1730,7 @@
ld c, a
ld a, [w2DMenuNumRows]
call SimpleMultiply
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
and a
ret
@@ -1749,7 +1749,7 @@
Mobile_MoveSelectionScreen:
xor a
- ld [wMoveSwapBuffer], a
+ ld [wSwappingMove], a
farcall CheckPlayerHasUsableMoves
ret z
call Function100dd8
@@ -6522,7 +6522,7 @@
ld a, [de]
cp $ff
ret z
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
push bc
push hl
push de
@@ -6550,7 +6550,7 @@
ld hl, wPartySpecies
add hl, bc
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
ld de, wStringBuffer2
@@ -6563,7 +6563,7 @@
ld hl, wOTPartySpecies
add hl, bc
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, UnknownText_0x102ee2
call PrintTextboxText
@@ -6632,7 +6632,7 @@
ld hl, wOTPartySpecies
add hl, bc
ld a, [hl]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
call Function102dc3
ld de, String_102fb2
@@ -7288,7 +7288,7 @@
ld a, [wMobileOrCable_LastSelection]
and $0f
jr z, .skip_load
- ld [wMenuCursorBuffer], a
+ ld [wMenuCursorPosition], a
.skip_load
call VerticalMenu
--- a/mobile/mobile_42.asm
+++ b/mobile/mobile_42.asm
@@ -327,7 +327,7 @@
MobileTradeAnim_InitSpeciesName:
push de
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
pop de
--- a/mobile/mobile_46.asm
+++ b/mobile/mobile_46.asm
@@ -3979,7 +3979,7 @@
.uber_under_70
pop af
ld a, [de]
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
ld de, wcd49
@@ -7181,29 +7181,29 @@
ld [$c709], a
ld a, LOW($c708) ; Species
- ld [wMobileMonSpeciesPointerBuffer], a
+ ld [wMobileMonSpeciesPointer], a
ld a, HIGH($c708)
- ld [wMobileMonSpeciesPointerBuffer + 1], a
+ ld [wMobileMonSpeciesPointer + 1], a
ld a, LOW($c60d) ; Partymon Struct
- ld [wMobileMonStructurePointerBuffer], a
+ ld [wMobileMonStructPointer], a
ld a, HIGH($c60d)
- ld [wMobileMonStructurePointerBuffer + 1], a
+ ld [wMobileMonStructPointer + 1], a
ld a, LOW($c63d) ; OT
- ld [wMobileMonOTNamePointerBuffer], a
+ ld [wMobileMonOTNamePointer], a
ld a, HIGH($c63d)
- ld [wMobileMonOTNamePointerBuffer + 1], a
+ ld [wMobileMonOTNamePointer + 1], a
ld a, LOW($c642) ; Nickname
- ld [wMobileMonNicknamePointerBuffer], a
+ ld [wMobileMonNicknamePointer], a
ld a, HIGH($c642)
- ld [wMobileMonNicknamePointerBuffer + 1], a
+ ld [wMobileMonNicknamePointer + 1], a
ld a, LOW($c647) ; Mail
- ld [wMobileMonMailPointerBuffer], a
+ ld [wMobileMonMailPointer], a
ld a, HIGH($c647)
- ld [wMobileMonMailPointerBuffer + 1], a
+ ld [wMobileMonMailPointer + 1], a
ld a, $46
ld [$c628], a
@@ -7483,29 +7483,29 @@
call CloseSRAM
ld a, LOW($c608)
- ld [wMobileMonSpeciesPointerBuffer], a
+ ld [wMobileMonSpeciesPointer], a
ld a, HIGH($c608)
- ld [wMobileMonSpeciesPointerBuffer + 1], a
+ ld [wMobileMonSpeciesPointer + 1], a
ld a, LOW($c611)
- ld [wMobileMonStructurePointerBuffer], a
+ ld [wMobileMonStructPointer], a
ld a, HIGH($c611)
- ld [wMobileMonStructurePointerBuffer + 1], a
+ ld [wMobileMonStructPointer + 1], a
ld a, LOW($c641)
- ld [wMobileMonOTNamePointerBuffer], a
+ ld [wMobileMonOTNamePointer], a
ld a, HIGH($c641)
- ld [wMobileMonOTNamePointerBuffer + 1], a
+ ld [wMobileMonOTNamePointer + 1], a
ld a, LOW($c646)
- ld [wMobileMonNicknamePointerBuffer], a
+ ld [wMobileMonNicknamePointer], a
ld a, HIGH($c646)
- ld [wMobileMonNicknamePointerBuffer + 1], a
+ ld [wMobileMonNicknamePointer + 1], a
ld a, LOW($c64b)
- ld [wMobileMonMailPointerBuffer], a
+ ld [wMobileMonMailPointer], a
ld a, HIGH($c64b)
- ld [wMobileMonMailPointerBuffer + 1], a
+ ld [wMobileMonMailPointer + 1], a
call AddMobileMonToParty
farcall SaveAfterLinkTrade
ret
@@ -7516,9 +7516,9 @@
ld e, a
inc [hl]
- ld a, [wMobileMonSpeciesPointerBuffer]
+ ld a, [wMobileMonSpeciesPointer]
ld l, a
- ld a, [wMobileMonSpeciesPointerBuffer + 1]
+ ld a, [wMobileMonSpeciesPointer + 1]
ld h, a
inc hl
ld bc, wPartySpecies
@@ -7538,7 +7538,7 @@
ld hl, wPartyMon1Species
ld bc, PARTYMON_STRUCT_LENGTH
ld a, e
- ld [wMobileMonSpeciesBuffer], a
+ ld [wMobileMonSpecies], a
.loop2
add hl, bc
dec a
@@ -7546,9 +7546,9 @@
jr nz, .loop2
ld e, l
ld d, h
- ld a, [wMobileMonStructurePointerBuffer]
+ ld a, [wMobileMonStructPointer]
ld l, a
- ld a, [wMobileMonStructurePointerBuffer + 1]
+ ld a, [wMobileMonStructPointer + 1]
ld h, a
ld bc, PARTYMON_STRUCT_LENGTH
call CopyBytes
@@ -7555,7 +7555,7 @@
ld hl, wPartyMonOT
ld bc, NAME_LENGTH
- ld a, [wMobileMonSpeciesBuffer]
+ ld a, [wMobileMonSpecies]
.loop3
add hl, bc
dec a
@@ -7563,9 +7563,9 @@
jr nz, .loop3
ld e, l
ld d, h
- ld a, [wMobileMonOTNamePointerBuffer]
+ ld a, [wMobileMonOTNamePointer]
ld l, a
- ld a, [wMobileMonOTNamePointerBuffer + 1]
+ ld a, [wMobileMonOTNamePointer + 1]
ld h, a
ld bc, MON_NAME_LENGTH - 1
call CopyBytes
@@ -7574,7 +7574,7 @@
ld hl, wPartyMonNicknames
ld bc, MON_NAME_LENGTH
- ld a, [wMobileMonSpeciesBuffer]
+ ld a, [wMobileMonSpecies]
.loop4
add hl, bc
dec a
@@ -7582,9 +7582,9 @@
jr nz, .loop4
ld e, l
ld d, h
- ld a, [wMobileMonNicknamePointerBuffer]
+ ld a, [wMobileMonNicknamePointer]
ld l, a
- ld a, [wMobileMonNicknamePointerBuffer + 1]
+ ld a, [wMobileMonNicknamePointer + 1]
ld h, a
ld bc, MON_NAME_LENGTH - 1
call CopyBytes
@@ -7593,7 +7593,7 @@
ld hl, sPartyMail
ld bc, MAIL_STRUCT_LENGTH
- ld a, [wMobileMonSpeciesBuffer]
+ ld a, [wMobileMonSpecies]
.loop5
add hl, bc
dec a
@@ -7603,9 +7603,9 @@
call OpenSRAM
ld e, l
ld d, h
- ld a, [wMobileMonMailPointerBuffer]
+ ld a, [wMobileMonMailPointer]
ld l, a
- ld a, [wMobileMonMailPointerBuffer + 1]
+ ld a, [wMobileMonMailPointer + 1]
ld h, a
ld bc, MAIL_STRUCT_LENGTH
call CopyBytes
--- a/mobile/mobile_5f.asm
+++ b/mobile/mobile_5f.asm
@@ -2596,7 +2596,7 @@
ld a, [hli]
ld [wCurItem], a
ld a, [hli]
- ld [wItemQuantityChangeBuffer], a
+ ld [wItemQuantityChange], a
push hl
ld hl, wNumItems
call ReceiveItem
@@ -3871,7 +3871,7 @@
ld a, [hl]
ld a, $1
ldh [rSVBK], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetPokemonName
pop hl
call PlaceString
@@ -3990,7 +3990,7 @@
ld a, [hl]
ld a, $1
ldh [rSVBK], a
- ld [wNamedObjectIndexBuffer], a
+ ld [wNamedObjectIndex], a
call GetItemName
pop hl
call PlaceString
--- a/wram.asm
+++ b/wram.asm
@@ -141,7 +141,7 @@
wGameLogicPaused:: db
wSpriteUpdatesEnabled:: db
-wUnusedScriptByteBuffer:: db
+wUnusedScriptByte:: db
wMapTimeOfDay:: db
@@ -277,10 +277,12 @@
wCurIcon:: db
wCurIconTile:: db
-wSpriteAnimAddrBackup::
-wSpriteAnimIDBuffer::
-wCurSpriteOAMFlags::
- dw
+UNION
+wSpriteAnimID::
+wCurSpriteOAMFlags:: db
+NEXTU
+wSpriteAnimAddrBackup:: dw
+ENDU
wCurAnimVTile:: db
wCurAnimXCoord:: db
wCurAnimYCoord:: db
@@ -782,7 +784,7 @@
NEXTU
; pokegear
-wPokegearPhoneLoadNameBuffer:: db
+wPokegearPhoneDisplayPosition:: db
wPokegearPhoneCursorPosition:: db
wPokegearPhoneScrollPosition:: db
wPokegearPhoneSelectedPerson:: db
@@ -1009,7 +1011,7 @@
NEXTU
; link data prep
ds 1000
-wCurLinkOTPartyMonTypePtr:: dw
+wCurLinkOTPartyMonTypePointer:: dw
wLinkOTPartyMonTypes:: ds 2 * PARTY_LENGTH
NEXTU
@@ -1145,7 +1147,7 @@
wDebugRoomSelectFunction:: dw
wDebugRoomAutoFunction:: dw
wDebugRoomPageCount:: db
-wDebugRoomPagedValuesPtr:: dw
+wDebugRoomPagesPointer:: dw
wDebugRoomROMChecksum:: dw
wDebugRoomCurChecksumBank:: db
@@ -1173,10 +1175,10 @@
SECTION "Video", WRAM0
UNION
-; wBGMapBuffer
-wBGMapBuffer:: ds 40
-wBGMapPalBuffer:: ds 40
-wBGMapBufferPtrs:: ds 40 ; 20 bg map addresses (16x8 tiles)
+; bg map
+wBGMapBuffer:: ds 40
+wBGMapPalBuffer:: ds 40
+wBGMapBufferPointers:: ds 20 * 2
wBGMapBufferEnd::
NEXTU
@@ -1186,11 +1188,11 @@
NEXTU
; mobile data
-wMobileMonSpeciesPointerBuffer:: dw
-wMobileMonStructurePointerBuffer:: dw
-wMobileMonOTNamePointerBuffer:: dw
-wMobileMonNicknamePointerBuffer:: dw
-wMobileMonMailPointerBuffer:: dw
+wMobileMonSpeciesPointer:: dw
+wMobileMonStructPointer:: dw
+wMobileMonOTNamePointer:: dw
+wMobileMonNicknamePointer:: dw
+wMobileMonMailPointer:: dw
NEXTU
; more mobile data
@@ -1205,7 +1207,7 @@
wcd28:: ds 1
wcd29:: ds 1
-wMobileMonSpeciesBuffer::
+wMobileMonSpecies::
wcd2a:: db
wTempOddEggNickname:: ; ds 11
@@ -1368,7 +1370,7 @@
wCurSpecies:: db
-wNamedObjectTypeBuffer:: db
+wNamedObjectType:: db
ds 1
@@ -1528,7 +1530,8 @@
wMenuBorderBottomCoord:: db
wMenuBorderRightCoord:: db
wMenuDataPointer:: dw
-wMenuCursorBuffer:: dw
+wMenuCursorPosition:: db
+ ds 1
wMenuDataBank:: db
ds 6
wMenuHeaderEnd::
@@ -1597,9 +1600,9 @@
wVBlankOccurred:: db
wPredefID:: db
-wPredefTemp:: dw
+wPredefHL:: dw
wPredefAddress:: dw
-wFarCallBCBuffer:: dw
+wFarCallBC:: dw
wUnusedLinkCommunicationByte:: db
@@ -2026,7 +2029,7 @@
NEXTU
; backup menu data
ds 7
-wMenuCursorBufferBackup:: db
+wMenuCursorPositionBackup:: db
wMenuScrollPositionBackup:: db
NEXTU
@@ -2048,8 +2051,10 @@
wStringBuffer4:: ds STRING_BUFFER_LENGTH
wStringBuffer5:: ds STRING_BUFFER_LENGTH
-wBattleMenuCursorBuffer:: dw
+wBattleMenuCursorPosition:: db
+ ds 1
+
wCurBattleMon:: db
wCurMoveNum:: db
@@ -2071,7 +2076,7 @@
wSwitchMon::
wSwitchItem::
-wMoveSwapBuffer::
+wSwappingMove::
wd0e3:: ; mobile
db
@@ -2126,7 +2131,7 @@
wListPointer:: dw
wUnusedNamesPointer:: dw
-wItemAttributesPtr:: dw
+wItemAttributesPointer:: dw
wCurItem:: db
wCurItemQuantity::
@@ -2154,8 +2159,8 @@
; 3: Put into Day-Care
db
-wItemQuantityChangeBuffer:: db
-wItemQuantityBuffer:: db
+wItemQuantityChange:: db
+wItemQuantity:: db
wTempMon:: party_struct wTempMon
@@ -2167,7 +2172,7 @@
wPartyMenuActionText:: db
-wItemAttributeParamBuffer:: db
+wItemAttributeValue:: db
wCurPartyLevel:: db
@@ -2348,7 +2353,7 @@
NEXTU
; withdraw/deposit items
-wPCItemQuantityChangeBuffer:: db
+wPCItemQuantityChange:: db
wPCItemQuantity:: db
NEXTU
@@ -2493,8 +2498,8 @@
wInitListType:: db
wBattleHasJustStarted:: db
-wNamedObjectIndexBuffer::
-wDeciramBuffer::
+wNamedObjectIndex::
+wTextDecimalByte::
wTempByteValue::
wNumSetBits::
wTypeMatchup::
@@ -3017,7 +3022,7 @@
ds 2
-wLuckyNumberDayBuffer:: dw
+wLuckyNumberDayTimer:: dw
ds 2
wSpecialPhoneCallID:: db
ds 3