Rename some labels

- Remove "Buffer" suffix from some byte and word quantities
- Change "Ptr" to "Pointer"

Fixes #789
This commit is contained in:
Rangi
2020-12-23 16:29:30 -05:00
parent 1a054661ec
commit 99e66c2557
106 changed files with 584 additions and 578 deletions

View File

@@ -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]
@@ -387,7 +387,7 @@ BillsPC_Withdraw:
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 @@ _MovePKMNWithoutMail:
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 @@ 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

View File

@@ -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

View File

@@ -250,7 +250,7 @@ HatchEggs:
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 @@ EggHatch_DoAnimFrame:
ret
EggHatch_AnimationSequence:
ld a, [wNamedObjectIndexBuffer]
ld a, [wNamedObjectIndex]
ld [wJumptableIndex], a
ld a, [wCurSpecies]
push af

View File

@@ -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
@@ -105,7 +105,7 @@ CheckPartyFullAfterContest:
call CopyBytes
callfar InsertPokemonIntoBox
ld a, [wCurPartySpecies]
ld [wNamedObjectIndexBuffer], a
ld [wNamedObjectIndex], a
call GetPokemonName
call GiveANickname_YesNo
ld hl, wStringBuffer1

View File

@@ -123,7 +123,7 @@ CorrectPartyErrors: ; unreferenced
cp EGG
ld hl, .TAMAGO
jr z, .got_nickname
ld [wNamedObjectIndexBuffer], a
ld [wNamedObjectIndex], a
call GetPokemonName
ld hl, wStringBuffer1
.got_nickname

View File

@@ -236,7 +236,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

View File

@@ -36,7 +36,7 @@ LearnMove:
push hl
push de
ld [wNamedObjectIndexBuffer], a
ld [wNamedObjectIndex], a
ld b, a
ld a, [wBattleMode]

View File

@@ -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

View File

@@ -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
@@ -899,7 +899,7 @@ MoveScreenLoop:
.skip_joy
call PrepareToPlaceMoveData
ld a, [wMoveSwapBuffer]
ld a, [wSwappingMove]
and a
jr nz, .moving_move
call PlaceMoveData
@@ -920,21 +920,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
@@ -949,7 +949,7 @@ MoveScreenLoop:
jp MoveScreenLoop
.d_left
ld a, [wMoveSwapBuffer]
ld a, [wSwappingMove]
and a
jp nz, .joy_loop
ld a, [wCurPartyMon]
@@ -1000,11 +1000,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
@@ -1057,7 +1057,7 @@ MoveScreenLoop:
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 @@ MoveScreenLoop:
.exit
xor a
ld [wMoveSwapBuffer], a
ld [wSwappingMove], a
ld hl, w2DMenuFlags1
res 6, [hl]
call ClearSprites
@@ -1137,7 +1137,7 @@ SetUpMoveScreenBG:
SetUpMoveList:
xor a
ldh [hBGMapMode], a
ld [wMoveSwapBuffer], a
ld [wSwappingMove], a
ld [wMonType], a
predef CopyMonToTempMon
ld hl, wTempMonMoves
@@ -1202,8 +1202,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

View File

@@ -448,7 +448,7 @@ ListMoves:
push hl
ld [wCurSpecies], a
ld a, MOVE_NAME
ld [wNamedObjectTypeBuffer], a
ld [wNamedObjectType], a
call GetName
ld de, wStringBuffer1
pop hl

View File

@@ -100,7 +100,7 @@ GetMonMenuString:
jr z, .NotMove
inc hl
ld a, [hl]
ld [wNamedObjectIndexBuffer], a
ld [wNamedObjectIndex], a
call GetMoveName
ret

View File

@@ -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
@@ -1671,7 +1671,7 @@ GivePoke::
.done
ld a, [wCurPartySpecies]
ld [wNamedObjectIndexBuffer], a
ld [wNamedObjectIndex], a
ld [wTempEnemyMonSpecies], a
call GetPokemonName
ld hl, wStringBuffer1

View File

@@ -416,7 +416,7 @@ StatsScreen_InitUpperHalf:
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 @@ StatsScreen_InitUpperHalf:
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 @@ StatsScreen_InitUpperHalf:
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 @@ LoadGreenPage:
ld b, a
farcall TimeCapsule_ReplaceTeruSama
ld a, b
ld [wNamedObjectIndexBuffer], a
ld [wNamedObjectIndex], a
call GetItemName
ret

View File

@@ -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