diff options
| author | Narishma-gb <194818981+Narishma-gb@users.noreply.github.com> | 2025-12-15 21:14:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-15 15:14:17 -0500 |
| commit | e9d3324bc06faa7de3b7a35d1f9429e610e8a761 (patch) | |
| tree | 63efb83577bf37c03aea14c8f29ca473676eb0d6 /engine/menus/naming_screen.asm | |
| parent | Clarify how the order of map constants matters for the Town Map (#553) (diff) | |
| download | pokeyellow-e9d3324bc06faa7de3b7a35d1f9429e610e8a761.tar.gz pokeyellow-e9d3324bc06faa7de3b7a35d1f9429e610e8a761.tar.xz pokeyellow-e9d3324bc06faa7de3b7a35d1f9429e610e8a761.zip | |
Comment more unreferenced local labels (#550)
Diffstat (limited to 'engine/menus/naming_screen.asm')
| -rw-r--r-- | engine/menus/naming_screen.asm | 36 |
1 files changed, 19 insertions, 17 deletions
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 |
