aboutsummaryrefslogtreecommitdiffstats
path: root/home
diff options
context:
space:
mode:
authorSylvie <35663410+Rangi42@users.noreply.github.com>2024-09-18 21:41:58 -0400
committerGitHub <noreply@github.com>2024-09-18 21:41:58 -0400
commit5a622f628de6908210091a05956b0d8ce3620237 (patch)
tree9cc32420b50f09531c58f4c5019ef167e133b95c /home
parentSplit `hSpriteIndexOrTextID` into `hSpriteIndex` and `hTextID` (#462) (diff)
downloadpokeyellow-5a622f628de6908210091a05956b0d8ce3620237.tar.gz
pokeyellow-5a622f628de6908210091a05956b0d8ce3620237.tar.xz
pokeyellow-5a622f628de6908210091a05956b0d8ce3620237.zip
Identify remaining uses of `wd0b5` and `wd11e` (#463)
Diffstat (limited to 'home')
-rw-r--r--home/give.asm2
-rw-r--r--home/list_menu.asm16
-rw-r--r--home/map_objects.asm2
-rw-r--r--home/names.asm22
-rw-r--r--home/names2.asm8
-rw-r--r--home/pokemon.asm26
6 files changed, 38 insertions, 38 deletions
diff --git a/home/give.asm b/home/give.asm
index 8ede4ea4..9f51450a 100644
--- a/home/give.asm
+++ b/home/give.asm
@@ -3,7 +3,7 @@ GiveItem::
; and copy the item's name to wStringBuffer.
; Return carry on success.
ld a, b
- ld [wd11e], a
+ ld [wNamedObjectIndex], a
ld [wCurItem], a
ld a, c
ld [wItemQuantity], a
diff --git a/home/list_menu.asm b/home/list_menu.asm
index ca369a82..f04684a3 100644
--- a/home/list_menu.asm
+++ b/home/list_menu.asm
@@ -141,7 +141,7 @@ DisplayListMenuIDLoop::
ld [wMaxItemQuantity], a
.skipGettingQuantity
ld a, [wCurItem]
- ld [wd0b5], a
+ ld [wNameListIndex], a
ld a, BANK(ItemNames)
ld [wPredefBank], a
call GetName
@@ -367,7 +367,7 @@ PrintListMenuEntries::
ld a, b
ld [wWhichPokemon], a
ld a, [de]
- ld [wd11e], a
+ ld [wNamedObjectIndex], a
cp $ff
jp z, .printCancelMenuItem
push bc
@@ -427,7 +427,7 @@ PrintListMenuEntries::
and a ; PCPOKEMONLISTMENU?
jr nz, .skipPrintingPokemonLevel
.printPokemonLevel
- ld a, [wd11e]
+ ld a, [wNamedObjectIndex]
push af
push hl
ld hl, wPartyCount
@@ -460,7 +460,7 @@ PrintListMenuEntries::
add hl, bc
call PrintLevel
pop af
- ld [wd11e], a
+ ld [wNamedObjectIndex], a
.skipPrintingPokemonLevel
pop hl
pop de
@@ -469,7 +469,7 @@ PrintListMenuEntries::
cp ITEMLISTMENU
jr nz, .nextListEntry
.printItemQuantity
- ld a, [wd11e]
+ ld a, [wNamedObjectIndex]
ld [wCurItem], a
call IsKeyItem ; check if item is unsellable
ld a, [wIsKeyItem]
@@ -480,18 +480,18 @@ PrintListMenuEntries::
add hl, bc
ld a, "×"
ld [hli], a
- ld a, [wd11e]
+ ld a, [wNamedObjectIndex]
push af
ld a, [de]
ld [wMaxItemQuantity], a
push de
- ld de, wd11e
+ ld de, wTempByteValue
ld [de], a
lb bc, 1, 2
call PrintNumber
pop de
pop af
- ld [wd11e], a
+ ld [wNamedObjectIndex], a
pop hl
.skipPrintingItemQuantity
inc de
diff --git a/home/map_objects.asm b/home/map_objects.asm
index 01dd8b6a..342139dd 100644
--- a/home/map_objects.asm
+++ b/home/map_objects.asm
@@ -71,7 +71,7 @@ IsItemInBag::
ret
DisplayPokedex::
- ld [wd11e], a
+ ld [wPokedexNum], a
farjp _DisplayPokedex
SetSpriteFacingDirectionAndDelay::
diff --git a/home/names.asm b/home/names.asm
index 2e5e1501..7330a065 100644
--- a/home/names.asm
+++ b/home/names.asm
@@ -5,7 +5,7 @@ GetMonName::
ld a, BANK(MonsterNames)
ldh [hLoadedROMBank], a
ld [MBC1RomBank], a
- ld a, [wd11e]
+ ld a, [wNamedObjectIndex]
dec a
ld hl, MonsterNames
ld c, NAME_LENGTH - 1
@@ -25,14 +25,14 @@ GetMonName::
ret
GetItemName::
-; given an item ID at [wd11e], store the name of the item in wNameBuffer
+; given an item ID at [wNamedObjectIndex], store the name of the item in wNameBuffer
push hl
push bc
- ld a, [wd11e]
+ ld a, [wNamedObjectIndex]
cp HM01 ; is this a TM/HM?
jr nc, .Machine
- ld [wd0b5], a
+ ld [wNameListIndex], a
ld a, ITEM_NAME
ld [wNameListType], a
ld a, BANK(ItemNames)
@@ -49,18 +49,18 @@ GetItemName::
ret
GetMachineName::
-; copies the name of the TM/HM in [wd11e] to wNameBuffer
+; copies the name of the TM/HM in [wNamedObjectIndex] to wNameBuffer
push hl
push de
push bc
- ld a, [wd11e]
+ ld a, [wNamedObjectIndex]
push af
cp TM01 ; is this a TM? [not HM]
jr nc, .WriteTM
; if HM, then write "HM" and add NUM_HMS to the item ID, so we can reuse the
; TM printing code
add NUM_HMS
- ld [wd11e], a
+ ld [wNamedObjectIndex], a
ld hl, HiddenPrefix ; points to "HM"
ld bc, 2
jr .WriteMachinePrefix
@@ -72,7 +72,7 @@ GetMachineName::
call CopyData
; now get the machine number and convert it to text
- ld a, [wd11e]
+ ld a, [wNamedObjectIndex]
sub TM01 - 1
ld b, "0"
.FirstDigit
@@ -94,7 +94,7 @@ GetMachineName::
ld a, "@"
ld [de], a
pop af
- ld [wd11e], a
+ ld [wNamedObjectIndex], a
pop bc
pop de
pop hl
@@ -130,8 +130,8 @@ GetMoveName::
push hl
ld a, MOVE_NAME
ld [wNameListType], a
- ld a, [wd11e]
- ld [wd0b5], a
+ ld a, [wNamedObjectIndex]
+ ld [wNameListIndex], a
ld a, BANK(MoveNames)
ld [wPredefBank], a
call GetName
diff --git a/home/names2.asm b/home/names2.asm
index cd3823fd..3bb6980c 100644
--- a/home/names2.asm
+++ b/home/names2.asm
@@ -10,13 +10,13 @@ NamePointers::
GetName::
; arguments:
-; [wd0b5] = which name
+; [wNameListIndex] = which name
; [wNameListType] = which list
; [wPredefBank] = bank of list
;
; returns pointer to name in de
- ld a, [wd0b5]
- ld [wd11e], a
+ ld a, [wNameListIndex]
+ ld [wNamedObjectIndex], a
; TM names are separate from item names.
; BUG: This applies to all names instead of just items.
@@ -67,7 +67,7 @@ GetName::
ld h, a
ldh a, [hSwapTemp + 1]
ld l, a
- ld a, [wd0b5]
+ ld a, [wNameListIndex]
ld b, a ; wanted entry
ld c, 0 ; entry counter
.nextName
diff --git a/home/pokemon.asm b/home/pokemon.asm
index 9fcf5622..54d69bba 100644
--- a/home/pokemon.asm
+++ b/home/pokemon.asm
@@ -99,12 +99,12 @@ LoadFlippedFrontSpriteByMonIndex::
LoadFrontSpriteByMonIndex::
push hl
- ld a, [wd11e]
+ ld a, [wPokedexNum]
push af
ld a, [wCurPartySpecies]
- ld [wd11e], a
+ ld [wPokedexNum], a
predef IndexToPokedex
- ld hl, wd11e
+ ld hl, wPokedexNum
ld a, [hl]
pop bc
ld [hl], b
@@ -355,8 +355,8 @@ PrintLevelFull::
ld a, [wLoadedMonLevel] ; level
PrintLevelCommon::
- ld [wd11e], a
- ld de, wd11e
+ ld [wTempByteValue], a
+ ld de, wTempByteValue
ld b, LEFT_ALIGN | 1 ; 1 byte
jp PrintNumber
@@ -371,7 +371,7 @@ GetwMoves::
; copies the base stat data of a pokemon to wMonHeader
; INPUT:
-; [wd0b5] = pokemon ID
+; [wCurSpecies] = pokemon ID
GetMonHeader::
ldh a, [hLoadedROMBank]
push af
@@ -381,10 +381,10 @@ GetMonHeader::
push bc
push de
push hl
- ld a, [wd11e]
+ ld a, [wPokedexNum]
push af
- ld a, [wd0b5]
- ld [wd11e], a
+ ld a, [wCurSpecies]
+ ld [wPokedexNum], a
ld de, FossilKabutopsPic
ld b, $66 ; size of Kabutops fossil and Ghost sprites
cp FOSSIL_KABUTOPS ; Kabutops fossil
@@ -398,8 +398,8 @@ GetMonHeader::
jr z, .specialID
cp MEW
jr z, .mew
- predef IndexToPokedex ; convert pokemon ID in [wd11e] to pokedex number
- ld a, [wd11e]
+ predef IndexToPokedex
+ ld a, [wPokedexNum]
dec a
ld bc, BASE_DATA_SIZE
ld hl, BaseStats
@@ -423,10 +423,10 @@ GetMonHeader::
ld a, BANK(MewBaseStats)
call FarCopyData
.done
- ld a, [wd0b5]
+ ld a, [wCurSpecies]
ld [wMonHIndex], a
pop af
- ld [wd11e], a
+ ld [wPokedexNum], a
pop hl
pop de
pop bc