wcf4b -> wStringBuffer

This commit is contained in:
Rangi 2021-08-28 17:02:20 -04:00
parent 236426138b
commit 7ee8a6509e
51 changed files with 112 additions and 114 deletions

View file

@ -2239,7 +2239,7 @@ UseBagItem:
ld a, [wcf91]
ld [wd11e], a
call GetItemName
call CopyStringToCF4B ; copy name
call CopyToStringBuffer
xor a
ld [wPseudoItemID], a
call UseItem
@ -3544,7 +3544,7 @@ CheckPlayerStatusConditions:
ld a, RAGE
ld [wd11e], a
call GetMoveName
call CopyStringToCF4B
call CopyToStringBuffer
xor a
ld [wPlayerMoveEffect], a
ld hl, PlayerCanExecuteMove
@ -3746,7 +3746,7 @@ PrintMoveName:
ret
_PrintMoveName:
text_far _CF4BText
text_far _MoveNameText
text_asm
ld hl, ExclamationPointPointerTable
ld a, [wd11e] ; exclamation point num
@ -5108,7 +5108,7 @@ ReloadMoveData:
call IncrementMovePP
; the follow two function calls are used to reload the move name
call GetMoveName
call CopyStringToCF4B
call CopyToStringBuffer
ld a, $01
and a
ret
@ -5609,7 +5609,7 @@ EnemyCanExecuteChargingMove:
ld [wNameListType], a
call GetName
ld de, wcd6d
call CopyStringToCF4B
call CopyToStringBuffer
EnemyCanExecuteMove:
xor a
ld [wMonIsDisobedient], a
@ -6046,7 +6046,7 @@ CheckEnemyStatusConditions:
ld a, RAGE
ld [wd11e], a
call GetMoveName
call CopyStringToCF4B
call CopyToStringBuffer
xor a
ld [wEnemyMoveEffect], a
ld hl, EnemyCanExecuteMove
@ -6088,7 +6088,7 @@ GetCurrentMove:
ld [wNameListType], a
call GetName
ld de, wcd6d
jp CopyStringToCF4B
jp CopyToStringBuffer
LoadEnemyMonData:
ld a, [wLinkState]

View file

@ -751,7 +751,7 @@ PrintStatText:
jr z, .findStatName_outer
jr .findStatName_inner
.foundStatName
ld de, wcf4b
ld de, wStringBuffer
ld bc, $a
jp CopyData

View file

@ -116,7 +116,7 @@ LoadFossilItemAndMonName::
ld a, [wFossilMon]
ld [wd11e], a
call GetMonName
call CopyStringToCF4B
call CopyToStringBuffer
ld a, [wFossilItem]
ld [wd11e], a
call GetItemName

View file

@ -18,7 +18,7 @@ _GivePokemon::
callfar LoadEnemyMonData
call SetPokedexOwnedFlag
callfar SendNewMonToBox
ld hl, wcf4b
ld hl, wStringBuffer
ld a, [wCurrentBoxNum]
and $7f
cp 9

View file

@ -159,7 +159,7 @@ DisplayPokemartDialogue_::
ld a, [wcf91] ; item ID
ld [wd11e], a ; store item ID for GetItemName
call GetItemName
call CopyStringToCF4B ; copy name to wcf4b
call CopyToStringBuffer
ld hl, PokemartTellBuyPriceText
call PrintText
hlcoord 14, 7

View file

@ -1307,9 +1307,9 @@ ItemUseMedicine:
jr nz, .statNameInnerLoop
jr .statNameLoop
.gotStatName
ld de, wcf4b
ld de, wStringBuffer
ld bc, 10
call CopyData ; copy the stat's name to wcf4b
call CopyData ; copy the stat's name to wStringBuffer
ld a, SFX_HEAL_AILMENT
call PlaySound
ld hl, VitaminStatRoseText
@ -1984,7 +1984,7 @@ ItemUsePPRestore:
ld a, [hl]
ld [wd11e], a
call GetMoveName
call CopyStringToCF4B ; copy name to wcf4b
call CopyToStringBuffer
pop hl
ld a, [wPPRestoreItem]
cp ETHER
@ -2161,7 +2161,7 @@ ItemUseTMHM:
ld a, [wd11e]
ld [wMoveNum], a
call GetMoveName
call CopyStringToCF4B ; copy name to wcf4b
call CopyToStringBuffer
pop af
ld hl, BootedUpTMText
jr nc, .printBootedUpMachineText
@ -2187,7 +2187,7 @@ ItemUseTMHM:
ld a, [wcf91]
push af
.chooseMon
ld hl, wcf4b
ld hl, wStringBuffer
ld de, wTempMoveNameBuffer
ld bc, 14
call CopyData ; save the move name because DisplayPartyMenu will overwrite it
@ -2198,7 +2198,7 @@ ItemUseTMHM:
call DisplayPartyMenu
push af
ld hl, wTempMoveNameBuffer
ld de, wcf4b
ld de, wStringBuffer
ld bc, 14
call CopyData
pop af
@ -2553,7 +2553,7 @@ TossItem_::
ld a, [wcf91]
ld [wd11e], a
call GetItemName
call CopyStringToCF4B ; copy name to wcf4b
call CopyToStringBuffer
ld hl, IsItOKToTossItemText
call PrintText
hlcoord 14, 7
@ -2573,7 +2573,7 @@ TossItem_::
ld a, [wcf91]
ld [wd11e], a
call GetItemName
call CopyStringToCF4B ; copy name to wcf4b
call CopyToStringBuffer
ld hl, ThrewAwayItemText
call PrintText
pop hl

View file

@ -39,7 +39,7 @@ AskName:
pop hl
pop af
ld [wUpdateSpritesEnabled], a
ld a, [wcf4b]
ld a, [wStringBuffer]
cp "@"
ret nz
.declinedNickname
@ -63,7 +63,7 @@ DisplayNameRaterScreen::
call GBPalWhiteOutWithDelay3
call RestoreScreenTilesAndReloadTilePatterns
call LoadGBPal
ld a, [wcf4b]
ld a, [wStringBuffer]
cp "@"
jr z, .playerCancelled
ld hl, wPartyMonNicks
@ -109,7 +109,7 @@ DisplayNamingScreen:
ld a, 7
ld [wMaxMenuItem], a
ld a, "@"
ld [wcf4b], a
ld [wStringBuffer], a
xor a
ld hl, wNamingScreenSubmitName
ld [hli], a
@ -157,7 +157,7 @@ DisplayNamingScreen:
.submitNickname
pop de
ld hl, wcf4b
ld hl, wStringBuffer
ld bc, NAME_LENGTH
call CopyData
call GBPalWhiteOutWithDelay3
@ -375,7 +375,7 @@ PrintNicknameAndUnderscores:
lb bc, 1, 10
call ClearScreenArea
hlcoord 10, 2
ld de, wcf4b
ld de, wStringBuffer
call PlaceString
hlcoord 10, 3
ld a, [wNamingScreenType]
@ -437,9 +437,9 @@ DakutensAndHandakutens:
INCLUDE "data/text/dakutens.asm"
; calculates the length of the string at wcf4b and stores it in c
; calculates the length of the string at wStringBuffer and stores it in c
CalcStringLength:
ld hl, wcf4b
ld hl, wStringBuffer
ld c, $0
.loop
ld a, [hl]

View file

@ -367,7 +367,7 @@ StartMenu_Item::
ld a, [wcf91]
ld [wd11e], a
call GetItemName
call CopyStringToCF4B ; copy name to wcf4b
call CopyToStringBuffer
ld a, [wcf91]
cp BICYCLE
jr nz, .notBicycle2

View file

@ -15,7 +15,7 @@ ChoosePlayerName:
xor a ; NAME_PLAYER_SCREEN
ld [wNamingScreenType], a
call DisplayNamingScreen
ld a, [wcf4b]
ld a, [wStringBuffer]
cp "@"
jr z, .customName
call ClearScreen
@ -48,7 +48,7 @@ ChooseRivalName:
ld a, NAME_RIVAL_SCREEN
ld [wNamingScreenType], a
call DisplayNamingScreen
ld a, [wcf4b]
ld a, [wStringBuffer]
cp "@"
jr z, .customName
call ClearScreen

View file

@ -189,7 +189,7 @@ LoadTradingGFXAndMonNames:
ld [wd11e], a
call GetMonName
ld hl, wcd6d
ld de, wcf4b
ld de, wStringBuffer
ld bc, NAME_LENGTH
call CopyData
ld a, [wTradedEnemyMonSpecies]

View file

@ -10,7 +10,7 @@ Trade_PrintPlayerMonInfoText:
lb bc, LEADING_ZEROES | 1, 3
call PrintNumber
hlcoord 5, 2
ld de, wcf4b
ld de, wStringBuffer
call PlaceString
hlcoord 8, 4
ld de, wTradedPlayerMonOT

View file

@ -114,7 +114,7 @@ Evolution_PartyMonLoop: ; loop over party mons
ld a, [wWhichPokemon]
ld hl, wPartyMonNicks
call GetPartyMonName
call CopyStringToCF4B
call CopyToStringBuffer
ld hl, IsEvolvingText
call PrintText
ld c, 50
@ -268,7 +268,7 @@ RenameEvolvedMon:
pop af
ld [wd0b5], a
ld hl, wcd6d
ld de, wcf4b
ld de, wStringBuffer
.compareNamesLoop
ld a, [de]
inc de
@ -368,7 +368,7 @@ LearnMoveFromLevelUp:
ld [wMoveNum], a
ld [wd11e], a
call GetMoveName
call CopyStringToCF4B
call CopyToStringBuffer
predef LearnMove
.done
ld a, [wcf91]

View file

@ -445,7 +445,7 @@ SlotMachine_CheckForMatches:
ld a, [hli]
ld h, [hl]
ld l, a
ld de, wcf4b
ld de, wStringBuffer
ld bc, 4
call CopyData
pop hl