You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Rename some labels
- Remove "Buffer" suffix from some byte and word quantities - Change "Ptr" to "Pointer" Fixes #789
This commit is contained in:
@@ -28,9 +28,9 @@ ReturnFarCall::
|
||||
; 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 @@ ReturnFarCall::
|
||||
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
|
||||
|
||||
|
@@ -1278,7 +1278,7 @@ BackupBGMapColumn::
|
||||
ret
|
||||
|
||||
UpdateBGMapRow::
|
||||
ld hl, wBGMapBufferPtrs
|
||||
ld hl, wBGMapBufferPointers
|
||||
push de
|
||||
call .iteration
|
||||
pop de
|
||||
@@ -1309,7 +1309,7 @@ UpdateBGMapRow::
|
||||
ret
|
||||
|
||||
UpdateBGMapColumn::
|
||||
ld hl, wBGMapBufferPtrs
|
||||
ld hl, wBGMapBufferPointers
|
||||
ld c, SCREEN_HEIGHT
|
||||
.loop
|
||||
ld a, e
|
||||
|
@@ -321,8 +321,8 @@ CopyMenuHeader::
|
||||
ld [wMenuDataBank], a
|
||||
ret
|
||||
|
||||
StoreTo_wMenuCursorBuffer::
|
||||
ld [wMenuCursorBuffer], a
|
||||
StoreMenuCursorPosition::
|
||||
ld [wMenuCursorPosition], a
|
||||
ret
|
||||
|
||||
MenuTextbox::
|
||||
@@ -684,7 +684,7 @@ ContinueGettingMenuJoypad:
|
||||
ld a, [hl]
|
||||
ld [wMenuSelection], a
|
||||
ld a, [wMenuCursorY]
|
||||
ld [wMenuCursorBuffer], a
|
||||
ld [wMenuCursorPosition], a
|
||||
and a
|
||||
ret
|
||||
|
||||
@@ -829,19 +829,19 @@ _2DMenu::
|
||||
ldh a, [hROMBank]
|
||||
ld [wMenuData_2DMenuItemStringsBank], a
|
||||
farcall _2DMenu_
|
||||
ld a, [wMenuCursorBuffer]
|
||||
ld a, [wMenuCursorPosition]
|
||||
ret
|
||||
|
||||
InterpretBattleMenu::
|
||||
ldh a, [hROMBank]
|
||||
ld [wMenuData_2DMenuItemStringsBank], a
|
||||
farcall _InterpretBattleMenu
|
||||
ld a, [wMenuCursorBuffer]
|
||||
ld a, [wMenuCursorPosition]
|
||||
ret
|
||||
|
||||
InterpretMobileMenu:: ; unreferenced
|
||||
ldh a, [hROMBank]
|
||||
ld [wMenuData_2DMenuItemStringsBank], a
|
||||
farcall _InterpretMobileMenu
|
||||
ld a, [wMenuCursorBuffer]
|
||||
ld a, [wMenuCursorPosition]
|
||||
ret
|
||||
|
@@ -10,7 +10,7 @@ NamesPointers::
|
||||
dbw 4, MoveDescriptions ; MOVE_DESC_NAME_BROKEN (wrong bank)
|
||||
|
||||
GetName::
|
||||
; Return name wCurSpecies from name list wNamedObjectTypeBuffer in wStringBuffer1.
|
||||
; Return name wCurSpecies from name list wNamedObjectType in wStringBuffer1.
|
||||
|
||||
ldh a, [hROMBank]
|
||||
push af
|
||||
@@ -18,12 +18,12 @@ GetName::
|
||||
push bc
|
||||
push de
|
||||
|
||||
ld a, [wNamedObjectTypeBuffer]
|
||||
ld a, [wNamedObjectType]
|
||||
cp MON_NAME
|
||||
jr nz, .NotPokeName
|
||||
|
||||
ld a, [wCurSpecies]
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
ld [wNamedObjectIndex], a
|
||||
call GetPokemonName
|
||||
ld hl, MON_NAME_LENGTH
|
||||
add hl, de
|
||||
@@ -32,7 +32,7 @@ GetName::
|
||||
jr .done
|
||||
|
||||
.NotPokeName:
|
||||
ld a, [wNamedObjectTypeBuffer]
|
||||
ld a, [wNamedObjectType]
|
||||
dec a
|
||||
ld e, a
|
||||
ld d, 0
|
||||
@@ -110,7 +110,7 @@ GetBasePokemonName::
|
||||
ret
|
||||
|
||||
GetPokemonName::
|
||||
; Get Pokemon name for wNamedObjectIndexBuffer.
|
||||
; Get Pokemon name for wNamedObjectIndex.
|
||||
|
||||
ldh a, [hROMBank]
|
||||
push af
|
||||
@@ -119,7 +119,7 @@ GetPokemonName::
|
||||
rst Bankswitch
|
||||
|
||||
; Each name is ten characters
|
||||
ld a, [wNamedObjectIndexBuffer]
|
||||
ld a, [wNamedObjectIndex]
|
||||
dec a
|
||||
ld d, 0
|
||||
ld e, a
|
||||
@@ -147,18 +147,18 @@ GetPokemonName::
|
||||
ret
|
||||
|
||||
GetItemName::
|
||||
; Get item name for wNamedObjectIndexBuffer.
|
||||
; Get item name for wNamedObjectIndex.
|
||||
|
||||
push hl
|
||||
push bc
|
||||
ld a, [wNamedObjectIndexBuffer]
|
||||
ld a, [wNamedObjectIndex]
|
||||
|
||||
cp TM01
|
||||
jr nc, .TM
|
||||
|
||||
ld [wCurSpecies], a
|
||||
ld a, ITEM_NAME
|
||||
ld [wNamedObjectTypeBuffer], a
|
||||
ld [wNamedObjectType], a
|
||||
call GetName
|
||||
jr .Copied
|
||||
.TM:
|
||||
@@ -170,12 +170,12 @@ GetItemName::
|
||||
ret
|
||||
|
||||
GetTMHMName::
|
||||
; Get TM/HM name for item wNamedObjectIndexBuffer.
|
||||
; Get TM/HM name for item wNamedObjectIndex.
|
||||
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
ld a, [wNamedObjectIndexBuffer]
|
||||
ld a, [wNamedObjectIndex]
|
||||
push af
|
||||
|
||||
; TM/HM prefix
|
||||
@@ -197,7 +197,7 @@ GetTMHMName::
|
||||
|
||||
; TM/HM number
|
||||
push de
|
||||
ld a, [wNamedObjectIndexBuffer]
|
||||
ld a, [wNamedObjectIndex]
|
||||
ld c, a
|
||||
callfar GetTMHMNumber
|
||||
pop de
|
||||
@@ -235,7 +235,7 @@ GetTMHMName::
|
||||
ld [de], a
|
||||
|
||||
pop af
|
||||
ld [wNamedObjectIndexBuffer], a
|
||||
ld [wNamedObjectIndex], a
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
@@ -257,9 +257,9 @@ GetMoveName::
|
||||
push hl
|
||||
|
||||
ld a, MOVE_NAME
|
||||
ld [wNamedObjectTypeBuffer], a
|
||||
ld [wNamedObjectType], a
|
||||
|
||||
ld a, [wNamedObjectIndexBuffer] ; move id
|
||||
ld a, [wNamedObjectIndex] ; move id
|
||||
ld [wCurSpecies], a
|
||||
|
||||
call GetName
|
||||
|
@@ -229,8 +229,8 @@ PrintLevel_Force3Digits::
|
||||
ld c, 3
|
||||
|
||||
Print8BitNumLeftAlign::
|
||||
ld [wDeciramBuffer], a
|
||||
ld de, wDeciramBuffer
|
||||
ld [wTextDecimalByte], a
|
||||
ld de, wTextDecimalByte
|
||||
ld b, PRINTNUM_LEFTALIGN | 1
|
||||
jp PrintNum
|
||||
|
||||
|
@@ -8,7 +8,7 @@ Predef::
|
||||
|
||||
ld a, BANK(GetPredefPointer)
|
||||
rst Bankswitch
|
||||
call GetPredefPointer ; stores hl in wPredefTemp
|
||||
call GetPredefPointer ; stores hl in wPredefHL
|
||||
|
||||
; Switch to the new function's bank
|
||||
rst Bankswitch
|
||||
@@ -27,9 +27,9 @@ Predef::
|
||||
push hl
|
||||
|
||||
; Get hl back
|
||||
ld a, [wPredefTemp]
|
||||
ld a, [wPredefHL]
|
||||
ld h, a
|
||||
ld a, [wPredefTemp + 1]
|
||||
ld a, [wPredefHL + 1]
|
||||
ld l, a
|
||||
ret
|
||||
|
||||
@@ -37,16 +37,16 @@ Predef::
|
||||
; Clean up after the Predef call
|
||||
|
||||
ld a, h
|
||||
ld [wPredefTemp], a
|
||||
ld [wPredefHL], a
|
||||
ld a, l
|
||||
ld [wPredefTemp + 1], a
|
||||
ld [wPredefHL + 1], a
|
||||
|
||||
pop hl
|
||||
ld a, h
|
||||
rst Bankswitch
|
||||
|
||||
ld a, [wPredefTemp]
|
||||
ld a, [wPredefHL]
|
||||
ld h, a
|
||||
ld a, [wPredefTemp + 1]
|
||||
ld a, [wPredefHL + 1]
|
||||
ld l, a
|
||||
ret
|
||||
|
@@ -41,10 +41,10 @@ BattleRandom::
|
||||
|
||||
call _BattleRandom
|
||||
|
||||
ld [wPredefTemp + 1], a
|
||||
ld [wPredefHL + 1], a
|
||||
pop af
|
||||
rst Bankswitch
|
||||
ld a, [wPredefTemp + 1]
|
||||
ld a, [wPredefHL + 1]
|
||||
ret
|
||||
|
||||
RandomRange::
|
||||
|
@@ -1,11 +1,11 @@
|
||||
InitSpriteAnimStruct::
|
||||
ld [wSpriteAnimIDBuffer], a
|
||||
ld [wSpriteAnimID], a
|
||||
ldh a, [hROMBank]
|
||||
push af
|
||||
|
||||
ld a, BANK(_InitSpriteAnimStruct)
|
||||
rst Bankswitch
|
||||
ld a, [wSpriteAnimIDBuffer]
|
||||
ld a, [wSpriteAnimID]
|
||||
|
||||
call _InitSpriteAnimStruct
|
||||
|
||||
@@ -15,13 +15,13 @@ InitSpriteAnimStruct::
|
||||
ret
|
||||
|
||||
ReinitSpriteAnimFrame::
|
||||
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
|
||||
|
||||
|
@@ -19,7 +19,7 @@ DMATransfer::
|
||||
|
||||
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 @@ UpdateBGMapBuffer::
|
||||
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
|
||||
|
Reference in New Issue
Block a user