aboutsummaryrefslogtreecommitdiffstats
path: root/engine/menus
diff options
context:
space:
mode:
authorNarishma-gb <194818981+Narishma-gb@users.noreply.github.com>2025-12-15 21:14:17 +0100
committerGitHub <noreply@github.com>2025-12-15 15:14:17 -0500
commite9d3324bc06faa7de3b7a35d1f9429e610e8a761 (patch)
tree63efb83577bf37c03aea14c8f29ca473676eb0d6 /engine/menus
parentClarify how the order of map constants matters for the Town Map (#553) (diff)
downloadpokeyellow-e9d3324bc06faa7de3b7a35d1f9429e610e8a761.tar.gz
pokeyellow-e9d3324bc06faa7de3b7a35d1f9429e610e8a761.tar.xz
pokeyellow-e9d3324bc06faa7de3b7a35d1f9429e610e8a761.zip
Comment more unreferenced local labels (#550)
Diffstat (limited to 'engine/menus')
-rw-r--r--engine/menus/main_menu.asm7
-rw-r--r--engine/menus/naming_screen.asm36
-rw-r--r--engine/menus/party_menu.asm4
-rw-r--r--engine/menus/pokedex.asm14
-rw-r--r--engine/menus/start_sub_menus.asm6
-rw-r--r--engine/menus/swap_items.asm2
6 files changed, 36 insertions, 33 deletions
diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm
index f4d8ec03..84af085f 100644
--- a/engine/menus/main_menu.asm
+++ b/engine/menus/main_menu.asm
@@ -495,6 +495,7 @@ DisplayOptionMenu:
jr nz, .exitMenu
bit B_PAD_A, b
jr z, .checkDirectionKeys
+; A was pressed
ld a, [wTopMenuItemY]
cp 16 ; is the cursor on Cancel?
jr nz, .loop
@@ -518,7 +519,7 @@ DisplayOptionMenu:
jr z, .cursorInBattleStyle
cp 16 ; cursor on Cancel?
jr z, .loop
-.cursorInTextSpeed
+; cursor in Text Speed
bit B_PAD_LEFT, b
jp nz, .pressedLeftInTextSpeed
jp .pressedRightInTextSpeed
@@ -625,7 +626,7 @@ SetOptionsFromCursorPositions:
ld a, [wOptionsBattleAnimCursorX] ; battle animation cursor X coordinate
dec a
jr z, .battleAnimationOn
-.battleAnimationOff
+; battle animation Off
set BIT_BATTLE_ANIMATION, d
jr .checkBattleStyle
.battleAnimationOn
@@ -634,7 +635,7 @@ SetOptionsFromCursorPositions:
ld a, [wOptionsBattleStyleCursorX] ; battle style cursor X coordinate
dec a
jr z, .battleStyleShift
-.battleStyleSet
+; battle style Set
set BIT_BATTLE_SHIFT, d
jr .storeOptions
.battleStyleShift
diff --git a/engine/menus/naming_screen.asm b/engine/menus/naming_screen.asm
index 24b172f0..9356cc66 100644
--- a/engine/menus/naming_screen.asm
+++ b/engine/menus/naming_screen.asm
@@ -379,12 +379,13 @@ PrintNicknameAndUnderscores:
hlcoord 10, 3
ld a, [wNamingScreenType]
cp NAME_MON_SCREEN
- jr nc, .pokemon1
- ld b, 7 ; player or rival max name length
- jr .playerOrRival1
-.pokemon1
- ld b, 10 ; pokemon max name length
-.playerOrRival1
+ jr nc, .pokemon
+; player or rival
+ ld b, PLAYER_NAME_LENGTH - 1
+ jr .gotUnderscoreCount
+.pokemon
+ ld b, NAME_LENGTH - 1
+.gotUnderscoreCount
ld a, $76 ; underscore tile id
.placeUnderscoreLoop
ld [hli], a
@@ -394,13 +395,15 @@ PrintNicknameAndUnderscores:
cp NAME_MON_SCREEN
ld a, [wNamingScreenNameLength]
jr nc, .pokemon2
- cp 7 ; player or rival max name length
- jr .playerOrRival2
+; player or rival
+ cp PLAYER_NAME_LENGTH - 1
+ jr .checkEmptySpaces
.pokemon2
- cp 10 ; pokemon max name length
-.playerOrRival2
- jr nz, .emptySpacesRemaining
- ; when all spaces are filled, force the cursor onto the ED tile
+ cp NAME_LENGTH - 1
+.checkEmptySpaces
+ jr nz, .placeRaisedUnderscore ; jump if empty spaces remain
+ ; when all spaces are filled, force the cursor onto the ED tile,
+ ; and keep the last underscore raised
call EraseMenuCursor
ld a, $11 ; "ED" x coord
ld [wTopMenuItemX], a
@@ -408,11 +411,10 @@ PrintNicknameAndUnderscores:
ld [wCurrentMenuItem], a
ld a, [wNamingScreenType]
cp NAME_MON_SCREEN
- ld a, 9 ; keep the last underscore raised
- jr nc, .pokemon3
- ld a, 6 ; keep the last underscore raised
-.pokemon3
-.emptySpacesRemaining
+ ld a, NAME_LENGTH - 2
+ jr nc, .placeRaisedUnderscore
+ ld a, PLAYER_NAME_LENGTH - 2
+.placeRaisedUnderscore
ld c, a
ld b, $0
hlcoord 10, 3
diff --git a/engine/menus/party_menu.asm b/engine/menus/party_menu.asm
index f2688b52..15fd62be 100644
--- a/engine/menus/party_menu.asm
+++ b/engine/menus/party_menu.asm
@@ -90,7 +90,7 @@ RedrawPartyMenu_::
jr nz, .placeMoveLearnabilityString
ld de, .notAbleToLearnMoveText
.placeMoveLearnabilityString
- ld bc, 20 + 9 ; down 1 row and right 9 columns
+ ld bc, SCREEN_WIDTH + 9 ; 1 row down and 9 columns right
push hl
add hl, bc
call PlaceString
@@ -102,7 +102,7 @@ RedrawPartyMenu_::
pop hl
pop de
inc de
- ld bc, 2 * 20
+ ld bc, 2 * SCREEN_WIDTH
add hl, bc
pop bc
inc c
diff --git a/engine/menus/pokedex.asm b/engine/menus/pokedex.asm
index 3e4096bc..3d2fcbca 100644
--- a/engine/menus/pokedex.asm
+++ b/engine/menus/pokedex.asm
@@ -105,7 +105,7 @@ HandlePokedexSideMenu:
jr z, .choseCry
dec a
jr z, .choseArea
-.choseQuit
+; chose Quit
ld b, 1
.exitSideMenu
pop af
@@ -286,7 +286,7 @@ HandlePokedexListMenu:
call HandleMenuInput
bit B_PAD_B, a
jp nz, .buttonBPressed
-.checkIfUpPressed
+; check if Up pressed
bit B_PAD_UP, a
jr z, .checkIfDownPressed
.upPressed ; scroll up one row
@@ -299,7 +299,7 @@ HandlePokedexListMenu:
.checkIfDownPressed
bit B_PAD_DOWN, a
jr z, .checkIfRightPressed
-.downPressed ; scroll down one row
+; Down pressed, scroll down one row
ld a, [wDexMaxSeenMon]
cp 7
jp c, .loop ; can't if the list is shorter than 7
@@ -314,7 +314,7 @@ HandlePokedexListMenu:
.checkIfRightPressed
bit B_PAD_RIGHT, a
jr z, .checkIfLeftPressed
-.rightPressed ; scroll down 7 rows
+; Right pressed, scroll down 7 rows
ld a, [wDexMaxSeenMon]
cp 7
jp c, .loop ; can't if the list is shorter than 7
@@ -332,7 +332,7 @@ HandlePokedexListMenu:
.checkIfLeftPressed ; scroll up 7 rows
bit B_PAD_LEFT, a
jr z, .buttonAPressed
-.leftPressed
+; Left pressed
ld a, [wListScrollOffset]
sub 7
ld [wListScrollOffset], a
@@ -593,8 +593,8 @@ HeightWeightText:
db "HT ?′??″"
next "WT ???lb@"
-; XXX does anything point to this?
-PokeText:
+; leftover from JPN Pokedex, where species have the suffix "Pokemon"
+PokeText: ; unreferenced
db "#@"
; horizontal line that divides the pokedex text description from the rest of the data
diff --git a/engine/menus/start_sub_menus.asm b/engine/menus/start_sub_menus.asm
index ec10dd11..817dceb8 100644
--- a/engine/menus/start_sub_menus.asm
+++ b/engine/menus/start_sub_menus.asm
@@ -340,7 +340,7 @@ StartMenu_Item::
ld a, [wCurItem]
cp BICYCLE
jp z, .useOrTossItem
-.notBicycle1
+; not Bicycle
ld a, USE_TOSS_MENU_TEMPLATE
ld [wTextBoxID], a
call DisplayTextBoxID
@@ -370,14 +370,14 @@ StartMenu_Item::
call CopyToStringBuffer
ld a, [wCurItem]
cp BICYCLE
- jr nz, .notBicycle2
+ jr nz, .notBicycle
ld a, [wStatusFlags6]
bit BIT_ALWAYS_ON_BIKE, a
jr z, .useItem_closeMenu
ld hl, CannotGetOffHereText
call PrintText
jp ItemMenuLoop
-.notBicycle2
+.notBicycle
ld a, [wCurrentMenuItem]
and a
jr nz, .tossItem
diff --git a/engine/menus/swap_items.asm b/engine/menus/swap_items.asm
index 2d506ce2..dc54b645 100644
--- a/engine/menus/swap_items.asm
+++ b/engine/menus/swap_items.asm
@@ -76,7 +76,7 @@ HandleItemListSwapping::
ld a, [hli]
cp b
jr z, .swapSameItemType
-.swapDifferentItems
+; swap different items
ldh [hSwapItemID], a ; save second item ID
ld a, [hld]
ldh [hSwapItemQuantity], a ; save second item quantity