aboutsummaryrefslogtreecommitdiffstats
path: root/home
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 /home
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 'home')
-rw-r--r--home/joypad2.asm4
-rw-r--r--home/list_menu.asm14
-rw-r--r--home/load_font.asm6
-rw-r--r--home/map_objects.asm4
-rw-r--r--home/move_mon.asm2
-rw-r--r--home/overworld.asm9
-rw-r--r--home/print_bcd.asm4
-rw-r--r--home/print_num.asm17
-rw-r--r--home/print_text.asm2
-rw-r--r--home/start_menu.asm2
-rw-r--r--home/trainers.asm24
-rw-r--r--home/window.asm12
12 files changed, 52 insertions, 48 deletions
diff --git a/home/joypad2.asm b/home/joypad2.asm
index a07b9ee4..11ef9a99 100644
--- a/home/joypad2.asm
+++ b/home/joypad2.asm
@@ -25,7 +25,7 @@ JoypadLowSensitivity::
ldh a, [hJoyPressed] ; newly pressed buttons
and a ; have any buttons been newly pressed since last check?
jr z, .noNewlyPressedButtons
-.newlyPressedButtons
+; newly pressed buttons
ld a, 30 ; half a second delay
ldh [hFrameCounter], a
ret
@@ -33,7 +33,7 @@ JoypadLowSensitivity::
ldh a, [hFrameCounter]
and a ; is the delay over?
jr z, .delayOver
-.delayNotOver
+; delay not over
xor a
ldh [hJoy5], a ; report no buttons as pressed
ret
diff --git a/home/list_menu.asm b/home/list_menu.asm
index d0d3f732..bd1197bb 100644
--- a/home/list_menu.asm
+++ b/home/list_menu.asm
@@ -65,7 +65,7 @@ DisplayListMenuIDLoop::
ld a, [wBattleType]
and a ; is it the Old Man battle?
jr z, .notOldManBattle
-.oldManBattle
+; Old Man battle
ld a, '▶'
ldcoord_a 5, 4 ; place menu cursor in front of first menu entry
ld c, 80
@@ -178,7 +178,7 @@ DisplayListMenuIDLoop::
bit B_PAD_DOWN, b
ld hl, wListScrollOffset
jr z, .upPressed
-.downPressed
+; Down pressed
ld a, [hl]
add 3
ld b, a
@@ -380,7 +380,7 @@ PrintListMenuEntries::
jr z, .pokemonPCMenu
cp MOVESLISTMENU
jr z, .movesMenu
-.itemMenu
+; item menu
call GetItemName
jr .placeNameString
.pokemonPCMenu
@@ -411,7 +411,7 @@ PrintListMenuEntries::
ld a, [wPrintItemPrices]
and a ; should prices be printed?
jr z, .skipPrintingItemPrice
-.printItemPrice
+; print item price
push hl
ld a, [de]
ld de, ItemPrices
@@ -426,7 +426,7 @@ PrintListMenuEntries::
ld a, [wListMenuID]
and a ; PCPOKEMONLISTMENU?
jr nz, .skipPrintingPokemonLevel
-.printPokemonLevel
+; print Pokemon level
ld a, [wNamedObjectIndex]
push af
push hl
@@ -451,7 +451,7 @@ PrintListMenuEntries::
ld a, [wMonDataLocation]
and a ; is it a list of party pokemon or box pokemon?
jr z, .skipCopyingLevel
-.copyLevel
+; copy level
ld a, [wLoadedMonBoxLevel]
ld [wLoadedMonLevel], a
.skipCopyingLevel
@@ -468,7 +468,7 @@ PrintListMenuEntries::
ld a, [wListMenuID]
cp ITEMLISTMENU
jr nz, .nextListEntry
-.printItemQuantity
+; print item quantity
ld a, [wNamedObjectIndex]
ld [wCurItem], a
call IsKeyItem ; check if item is unsellable
diff --git a/home/load_font.asm b/home/load_font.asm
index 47ad60f1..e6e04113 100644
--- a/home/load_font.asm
+++ b/home/load_font.asm
@@ -2,7 +2,7 @@ LoadFontTilePatterns::
ldh a, [rLCDC]
bit B_LCDC_ENABLE, a
jr nz, .on
-.off
+; off
ld hl, FontGraphics
ld de, vFont
ld bc, FontGraphicsEnd - FontGraphics
@@ -18,7 +18,7 @@ LoadTextBoxTilePatterns::
ldh a, [rLCDC]
bit B_LCDC_ENABLE, a
jr nz, .on
-.off
+; off
ld hl, TextBoxGraphics
ld de, vChars2 tile $60
ld bc, TextBoxGraphicsEnd - TextBoxGraphics
@@ -34,7 +34,7 @@ LoadHpBarAndStatusTilePatterns::
ldh a, [rLCDC]
bit B_LCDC_ENABLE, a
jr nz, .on
-.off
+; off
ld hl, HpBarAndStatusGraphics
ld de, vChars2 tile $62
ld bc, HpBarAndStatusGraphicsEnd - HpBarAndStatusGraphics
diff --git a/home/map_objects.asm b/home/map_objects.asm
index 44b012e6..57364518 100644
--- a/home/map_objects.asm
+++ b/home/map_objects.asm
@@ -115,7 +115,7 @@ CheckCoords::
ld hl, wCoordIndex
inc [hl]
pop hl
-.compareYCoord
+; compare Y coord
cp b
jr z, .compareXCoord
inc hl
@@ -124,7 +124,7 @@ CheckCoords::
ld a, [hli]
cp c
jr nz, .loop
-.inArray
+; in array
scf
ret
.notInArray
diff --git a/home/move_mon.asm b/home/move_mon.asm
index cb19d0e3..def60bc1 100644
--- a/home/move_mon.asm
+++ b/home/move_mon.asm
@@ -106,7 +106,7 @@ CalcStat::
jr z, .getSpeedIV
cp $5
jr z, .getSpecialIV
-.getHpIV
+; get HP IV
push bc
ld a, [hl] ; Atk IV
swap a
diff --git a/home/overworld.asm b/home/overworld.asm
index f837815b..e994f694 100644
--- a/home/overworld.asm
+++ b/home/overworld.asm
@@ -546,7 +546,7 @@ ContinueCheckWarpsNoCollisionLoop::
; if no matching warp was found
CheckMapConnections::
-.checkWestMap
+; check west map
ld a, [wXCoord]
cp $ff
jr nz, .checkEastMap
@@ -1097,8 +1097,7 @@ IsSpriteOrSignInFrontOfPlayer::
ld a, [hli] ; sign X
cp e
jr nz, .retry
-.xCoordMatched
-; found sign
+; X coord matched: found sign
push hl
push bc
ld hl, wSignTextIDs
@@ -2047,7 +2046,7 @@ LoadMapHeader::
; copy connection data (if any) to WRAM
ld a, [wCurMapConnections]
ld b, a
-.checkNorth
+; check north
bit NORTH_F, b
jr z, .checkSouth
ld de, wNorthConnectionHeader
@@ -2080,7 +2079,7 @@ LoadMapHeader::
ld de, wMapBackgroundTile
ld a, [hli]
ld [de], a
-.loadWarpData
+; load warp data
ld a, [hli]
ld [wNumberOfWarps], a
and a
diff --git a/home/print_bcd.asm b/home/print_bcd.asm
index 2e501be5..cac6aba3 100644
--- a/home/print_bcd.asm
+++ b/home/print_bcd.asm
@@ -31,9 +31,9 @@ PrintBCDNumber::
inc de
dec c
jr nz, .loop
- bit BIT_LEADING_ZEROES, b
+ bit BIT_LEADING_ZEROES, b ; were any non-zero digits printed?
jr z, .done ; if so, we are done
-.numberEqualsZero ; if every digit of the BCD number is zero
+; if every digit of the BCD number is zero, print the last 0
bit BIT_LEFT_ALIGN, b
jr nz, .skipRightAlignmentAdjustment
dec hl ; if the string is right-aligned, it needs to be moved back one space
diff --git a/home/print_num.asm b/home/print_num.asm
index 32fae363..8027a764 100644
--- a/home/print_num.asm
+++ b/home/print_num.asm
@@ -82,11 +82,16 @@ MACRO print_digit
call .NextDigit
ENDM
-.millions print_digit 1000000
-.hundred_thousands print_digit 100000
-.ten_thousands print_digit 10000
-.thousands print_digit 1000
-.hundreds print_digit 100
+; millions
+ print_digit 1000000
+.hundred_thousands
+ print_digit 100000
+.ten_thousands
+ print_digit 10000
+.thousands
+ print_digit 1000
+.hundreds
+ print_digit 100
.tens
ld c, 0
@@ -113,7 +118,7 @@ ENDM
.next
call .NextDigit
-.ones
+; ones
ld a, '0'
add b
ld [hli], a
diff --git a/home/print_text.asm b/home/print_text.asm
index fe784350..8e351ba3 100644
--- a/home/print_text.asm
+++ b/home/print_text.asm
@@ -24,7 +24,7 @@ PrintLetterDelay::
.checkButtons
call Joypad
ldh a, [hJoyHeld]
-.checkAButton
+; check A button
bit B_PAD_A, a
jr z, .checkBButton
jr .endWait
diff --git a/home/start_menu.asm b/home/start_menu.asm
index 6de15182..9504d536 100644
--- a/home/start_menu.asm
+++ b/home/start_menu.asm
@@ -14,7 +14,7 @@ RedisplayStartMenu::
.loop
call HandleMenuInput
ld b, a
-.checkIfUpPressed
+; check if Up pressed
bit B_PAD_UP, a
jr z, .checkIfDownPressed
ld a, [wCurrentMenuItem] ; menu selection
diff --git a/home/trainers.asm b/home/trainers.asm
index f00c4df9..8d2cceaf 100644
--- a/home/trainers.asm
+++ b/home/trainers.asm
@@ -19,7 +19,7 @@ ExecuteCurMapScriptInTable::
ld hl, wStatusFlags7
bit BIT_USE_CUR_MAP_SCRIPT, [hl]
res BIT_USE_CUR_MAP_SCRIPT, [hl]
- jr z, .useProvidedIndex ; test if map script index was overridden manually
+ jr z, .useProvidedIndex ; test if map script index was overridden manually
ld a, [wCurMapScript]
.useProvidedIndex
pop hl
@@ -32,11 +32,11 @@ LoadGymLeaderAndCityName::
push de
ld de, wGymCityName
ld bc, GYM_CITY_LENGTH
- call CopyData ; load city name
+ call CopyData ; load city name
pop hl
ld de, wGymLeaderName
ld bc, NAME_LENGTH
- jp CopyData ; load gym leader name
+ jp CopyData ; load gym leader name
; reads specific information from trainer header (pointed to at wTrainerHeaderPtr)
; a: offset in header data
@@ -155,7 +155,7 @@ ENDC
ldh [hJoyHeld], a
call TrainerWalkUpToPlayer_Bank0
ld hl, wCurMapScript
- inc [hl] ; increment map script index (next script function is usually DisplayEnemyTrainerTextAndStartBattle)
+ inc [hl] ; increment map script index (next script function is usually DisplayEnemyTrainerTextAndStartBattle)
ret
; display the before battle text after the enemy trainer has walked up to the player's sprite
@@ -179,7 +179,7 @@ StartTrainerBattle::
ld hl, wStatusFlags4
set BIT_UNKNOWN_4_1, [hl]
ld hl, wCurMapScript
- inc [hl] ; increment map script index (next script function is usually EndTrainerBattle)
+ inc [hl] ; increment map script index (next script function is usually EndTrainerBattle)
ret
EndTrainerBattle::
@@ -201,14 +201,14 @@ EndTrainerBattle::
call TrainerFlagAction ; flag trainer as fought
ld a, [wEnemyMonOrTrainerClass]
cp OPP_ID_OFFSET
- jr nc, .skipRemoveSprite ; test if trainer was fought (in that case skip removing the corresponding sprite)
+ jr nc, .skipRemoveSprite ; test if trainer was fought (in that case skip removing the corresponding sprite)
ld hl, wMissableObjectList
ld de, $2
ld a, [wSpriteIndex]
- call IsInArray ; search for sprite ID
+ call IsInArray ; search for sprite ID
inc hl
ld a, [hl]
- ld [wMissableObjectIndex], a ; load corresponding missable object index and remove it
+ ld [wMissableObjectIndex], a ; load corresponding missable object index and remove it
predef HideObject
.skipRemoveSprite
ld hl, wStatusFlags5
@@ -269,7 +269,7 @@ CheckForEngagingTrainers::
.trainerLoop
call StoreTrainerHeaderPointer ; set trainer header pointer to current trainer
ld a, [de]
- ld [wSpriteIndex], a ; store trainer flag's bit
+ ld [wSpriteIndex], a ; store trainer flag's bit
ld [wTrainerHeaderFlagBit], a
cp -1
ret z
@@ -278,7 +278,7 @@ CheckForEngagingTrainers::
ld b, FLAG_TEST
ld a, [wTrainerHeaderFlagBit]
ld c, a
- call TrainerFlagAction ; read trainer flag
+ call TrainerFlagAction ; read trainer flag
ld a, c
and a ; has the trainer already been defeated?
jr nz, .continue
@@ -299,7 +299,7 @@ CheckForEngagingTrainers::
pop hl
ld a, [wTrainerSpriteOffset]
and a
- ret nz ; break if the trainer is engaging
+ ret nz ; break if the trainer is engaging
.continue
ld hl, $c
add hl, de
@@ -364,8 +364,8 @@ PrintEndBattleText::
GetSavedEndBattleTextPointer::
ld a, [wBattleResult]
and a
-; won battle
jr nz, .lostBattle
+; won battle
ld a, [wEndBattleWinTextPointer]
ld h, a
ld a, [wEndBattleWinTextPointer + 1]
diff --git a/home/window.asm b/home/window.asm
index 6885a138..2f2609d7 100644
--- a/home/window.asm
+++ b/home/window.asm
@@ -52,11 +52,11 @@ HandleMenuInput_::
ld b, a
bit B_PAD_UP, a
jr z, .checkIfDownPressed
-.upPressed
+; Up pressed
ld a, [wCurrentMenuItem] ; selected menu item
and a ; already at the top of the menu?
jr z, .alreadyAtTop
-.notAtTop
+; not at top
dec a
ld [wCurrentMenuItem], a ; move selected menu item up one space
jr .checkOtherKeys
@@ -70,14 +70,14 @@ HandleMenuInput_::
.checkIfDownPressed
bit B_PAD_DOWN, a
jr z, .checkOtherKeys
-.downPressed
+; Down pressed
ld a, [wCurrentMenuItem]
inc a
ld c, a
ld a, [wMaxMenuItem]
cp c
jr nc, .notAtBottom
-.alreadyAtBottom
+; already at bottom
ld a, [wMenuWrappingEnabled]
and a ; is wrapping around enabled?
jr z, .noWrappingAround
@@ -93,7 +93,7 @@ HandleMenuInput_::
ldh a, [hJoy5]
and PAD_A | PAD_B
jr z, .skipPlayingSound
-.AButtonOrBButtonPressed
+; A or B pressed
push hl
ld hl, wMiscFlags
bit BIT_NO_MENU_BUTTON_SOUND, [hl]
@@ -153,7 +153,7 @@ PlaceMenuCursor::
ld a, [hl]
cp '▶' ; was an arrow next to the previously selected menu item?
jr nz, .skipClearingArrow
-.clearArrow
+; clear arrow
ld a, [wTileBehindCursor]
ld [hl], a
.skipClearingArrow