aboutsummaryrefslogtreecommitdiffstats
path: root/engine/menus
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 /engine/menus
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 'engine/menus')
-rw-r--r--engine/menus/league_pc.asm2
-rw-r--r--engine/menus/naming_screen.asm4
-rw-r--r--engine/menus/pokedex.asm52
-rw-r--r--engine/menus/start_sub_menus.asm2
4 files changed, 30 insertions, 30 deletions
diff --git a/engine/menus/league_pc.asm b/engine/menus/league_pc.asm
index 849c6e03..17d58c55 100644
--- a/engine/menus/league_pc.asm
+++ b/engine/menus/league_pc.asm
@@ -84,7 +84,7 @@ LeaguePCShowMon:
ld a, [hli]
ld [wHoFMonSpecies], a
ld [wCurPartySpecies], a
- ld [wd0b5], a
+ ld [wCurSpecies], a
ld [wBattleMonSpecies2], a
ld [wWholeScreenPaletteMonSpecies], a
ld a, [hli]
diff --git a/engine/menus/naming_screen.asm b/engine/menus/naming_screen.asm
index 25d69ca9..33556e26 100644
--- a/engine/menus/naming_screen.asm
+++ b/engine/menus/naming_screen.asm
@@ -9,7 +9,7 @@ AskName:
ld c, 11
call z, ClearScreenArea ; only if in wild battle
ld a, [wCurPartySpecies]
- ld [wd11e], a
+ ld [wNamedObjectIndex], a
call GetMonName
ld hl, DoYouWantToNicknameText
call PrintText
@@ -462,7 +462,7 @@ PrintNamingText:
push af
farcall WriteMonPartySpriteOAMBySpecies
pop af
- ld [wd11e], a
+ ld [wNamedObjectIndex], a
call GetMonName
hlcoord 4, 1
call PlaceString
diff --git a/engine/menus/pokedex.asm b/engine/menus/pokedex.asm
index f746c809..7710815b 100644
--- a/engine/menus/pokedex.asm
+++ b/engine/menus/pokedex.asm
@@ -9,7 +9,7 @@ ShowPokedexMenu:
ld [wListScrollOffset], a
ld [wLastMenuItem], a
inc a
- ld [wd11e], a
+ ld [wPokedexNum], a
ldh [hJoy7], a
.setUpGraphics
ld b, SET_PAL_GENERIC
@@ -68,8 +68,8 @@ HandlePokedexSideMenu:
push af
add b
inc a
- ld [wd11e], a
- ld a, [wd11e]
+ ld [wPokedexNum], a
+ ld a, [wPokedexNum]
push af
ld a, [wDexMaxSeenMon]
push af ; this doesn't need to be preserved
@@ -111,7 +111,7 @@ HandlePokedexSideMenu:
pop af
ld [wDexMaxSeenMon], a
pop af
- ld [wd11e], a
+ ld [wPokedexNum], a
pop af
ld [wListScrollOffset], a
pop af
@@ -142,7 +142,7 @@ HandlePokedexSideMenu:
; play pokemon cry
.choseCry
- ld a, [wd11e]
+ ld a, [wPokedexNum]
call GetCryData
call PlaySound
jr .handleMenuInput
@@ -222,7 +222,7 @@ HandlePokedexListMenu:
call ClearScreenArea
hlcoord 1, 3
ld a, [wListScrollOffset]
- ld [wd11e], a
+ ld [wPokedexNum], a
ld d, 7
ld a, [wDexMaxSeenMon]
cp 7
@@ -233,17 +233,17 @@ HandlePokedexListMenu:
; loop to print pokemon pokedex numbers and names
; if the player has owned the pokemon, it puts a pokeball beside the name
.printPokemonLoop
- ld a, [wd11e]
+ ld a, [wPokedexNum]
inc a
- ld [wd11e], a
+ ld [wPokedexNum], a
push af
push de
push hl
ld de, -SCREEN_WIDTH
add hl, de
- ld de, wd11e
+ ld de, wPokedexNum
lb bc, LEADING_ZEROES | 1, 3
- call PrintNumber ; print the pokedex number
+ call PrintNumber
ld de, SCREEN_WIDTH
add hl, de
dec hl
@@ -276,7 +276,7 @@ HandlePokedexListMenu:
add hl, bc
pop de
pop af
- ld [wd11e], a
+ ld [wPokedexNum], a
dec d
jr nz, .printPokemonLoop
ld a, 01
@@ -376,10 +376,10 @@ PokedexMenuItemsText:
; tests if a pokemon's bit is set in the seen or owned pokemon bit fields
; INPUT:
-; [wd11e] = pokedex number
+; [wPokedexNum] = pokedex number
; hl = address of bit field
IsPokemonBitSet:
- ld a, [wd11e]
+ ld a, [wPokedexNum]
dec a
ld c, a
ld b, FLAG_TEST
@@ -403,13 +403,13 @@ ShowPokedexDataInternal:
ldh [rNR50], a
call GBPalWhiteOut ; zero all palettes
call ClearScreen
- ld a, [wd11e] ; pokemon ID
+ ld a, [wPokedexNum]
ld [wCurPartySpecies], a
push af
ld b, SET_PAL_POKEDEX
call RunPaletteCommand
pop af
- ld [wd11e], a
+ ld [wPokedexNum], a
ldh a, [hTileAnimations]
push af
xor a
@@ -455,7 +455,7 @@ ShowPokedexDataInternal:
call PlaceString
ld hl, PokedexEntryPointers
- ld a, [wd11e]
+ ld a, [wPokedexNum]
dec a
ld e, a
ld d, 0
@@ -471,7 +471,7 @@ ShowPokedexDataInternal:
ld h, b
ld l, c
push de
- ld a, [wd11e]
+ ld a, [wPokedexNum]
push af
call IndexToPokedex
@@ -480,16 +480,16 @@ ShowPokedexDataInternal:
ld [hli], a
ld a, "<DOT>"
ld [hli], a
- ld de, wd11e
+ ld de, wPokedexNum
lb bc, LEADING_ZEROES | 1, 3
call PrintNumber ; print pokedex number
ld hl, wPokedexOwned
call IsPokemonBitSet
pop af
- ld [wd11e], a
+ ld [wPokedexNum], a
ld a, [wCurPartySpecies]
- ld [wd0b5], a
+ ld [wCurSpecies], a
pop de
push af
@@ -624,10 +624,10 @@ DrawTileLine:
INCLUDE "data/pokemon/dex_entries.asm"
PokedexToIndex:
- ; converts the Pokédex number at wd11e to an index
+ ; converts the Pokédex number at [wPokedexNum] to an index
push bc
push hl
- ld a, [wd11e]
+ ld a, [wPokedexNum]
ld b, a
ld c, 0
ld hl, PokedexOrder
@@ -639,23 +639,23 @@ PokedexToIndex:
jr nz, .loop
ld a, c
- ld [wd11e], a
+ ld [wPokedexNum], a
pop hl
pop bc
ret
IndexToPokedex:
- ; converts the index number at wd11e to a Pokédex number
+ ; converts the index number at [wPokedexNum] to a Pokédex number
push bc
push hl
- ld a, [wd11e]
+ ld a, [wPokedexNum]
dec a
ld hl, PokedexOrder
ld b, 0
ld c, a
add hl, bc
ld a, [hl]
- ld [wd11e], a
+ ld [wPokedexNum], a
pop hl
pop bc
ret
diff --git a/engine/menus/start_sub_menus.asm b/engine/menus/start_sub_menus.asm
index 5417e3e0..7b0455d0 100644
--- a/engine/menus/start_sub_menus.asm
+++ b/engine/menus/start_sub_menus.asm
@@ -365,7 +365,7 @@ StartMenu_Item::
jp ItemMenuLoop
.useOrTossItem ; if the player made the choice to use or toss the item
ld a, [wCurItem]
- ld [wd11e], a
+ ld [wNamedObjectIndex], a
call GetItemName
call CopyToStringBuffer
ld a, [wCurItem]