summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-10-26 15:45:57 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-10-26 20:29:58 -0400
commit9dcdad5e60fbc10ba81ae127743c78a6b00d3dd5 (patch)
tree1bbe56fe1c3b0ad4c95d191f0137007becef7169 /home
parenta2b6befd7d12b2ad8bb97979a10519500dcdd870 (diff)
Comment, remove, or revise many unreferenced labels
Diffstat (limited to 'home')
-rw-r--r--home/audio.asm2
-rw-r--r--home/battle.asm4
-rw-r--r--home/decompress.asm9
-rw-r--r--home/gfx.asm18
-rw-r--r--home/print_bcd.asm7
-rw-r--r--home/serial.asm2
-rw-r--r--home/text.asm19
-rw-r--r--home/video.asm20
8 files changed, 41 insertions, 40 deletions
diff --git a/home/audio.asm b/home/audio.asm
index c2d60adb0..7c7b84371 100644
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -436,7 +436,7 @@ SpecialMapMusic::
and a
ret
-.bike
+.bike ; unreferenced
ld de, MUSIC_BICYCLE
scf
ret
diff --git a/home/battle.asm b/home/battle.asm
index da9c081a2..0fb077c90 100644
--- a/home/battle.asm
+++ b/home/battle.asm
@@ -275,6 +275,6 @@ PushLYOverrides::
ld a, HIGH(wLYOverrides)
ld [wRequested2bppDest + 1], a
- ld a, (wLYOverridesEnd - wLYOverrides) / 16
- ld [wRequested2bpp], a
+ ld a, (wLYOverridesEnd - wLYOverrides) / LEN_2BPP_TILE
+ ld [wRequested2bppSize], a
ret
diff --git a/home/decompress.asm b/home/decompress.asm
index 0ac2c0b6b..a072b1e74 100644
--- a/home/decompress.asm
+++ b/home/decompress.asm
@@ -80,7 +80,6 @@ LZ_LONG_HI EQU %00000011
cp LZ_LONG
jr nz, .short
-.long
; The count is now 10 bits.
; Read the next 3 bits.
@@ -133,7 +132,7 @@ LZ_LONG_HI EQU %00000011
cp LZ_ZERO
jr z, .Zero
-.Literal:
+; Literal
; Read literal data for bc bytes.
.lloop
dec c
@@ -215,10 +214,8 @@ LZ_LONG_HI EQU %00000011
bit 7, a ; sign
jr z, .positive
-.negative
-; hl = de - a
- ; Since we can't subtract a from de,
- ; Make it negative and add de.
+; negative
+ ; hl = de + -a
and %01111111
cpl
add e
diff --git a/home/gfx.asm b/home/gfx.asm
index fa5cdd7be..50c2e98b7 100644
--- a/home/gfx.asm
+++ b/home/gfx.asm
@@ -111,7 +111,7 @@ LoadFontsExtra::
farcall _LoadFontsExtra2
ret
-LoadFontsExtra2:
+LoadFontsExtra2: ; unreferenced
farcall _LoadFontsExtra2
ret
@@ -226,10 +226,10 @@ Request2bpp::
cp [hl]
jr nc, .cycle
- ld [wRequested2bpp], a
+ ld [wRequested2bppSize], a
.wait
call DelayFrame
- ld a, [wRequested2bpp]
+ ld a, [wRequested2bppSize]
and a
jr nz, .wait
@@ -245,11 +245,11 @@ Request2bpp::
.cycle
ldh a, [hTilesPerCycle]
- ld [wRequested2bpp], a
+ ld [wRequested2bppSize], a
.wait2
call DelayFrame
- ld a, [wRequested2bpp]
+ ld a, [wRequested2bppSize]
and a
jr nz, .wait2
@@ -300,10 +300,10 @@ Request1bpp::
cp [hl]
jr nc, .cycle
- ld [wRequested1bpp], a
+ ld [wRequested1bppSize], a
.wait
call DelayFrame
- ld a, [wRequested1bpp]
+ ld a, [wRequested1bppSize]
and a
jr nz, .wait
@@ -319,11 +319,11 @@ Request1bpp::
.cycle
ldh a, [hTilesPerCycle]
- ld [wRequested1bpp], a
+ ld [wRequested1bppSize], a
.wait2
call DelayFrame
- ld a, [wRequested1bpp]
+ ld a, [wRequested1bppSize]
and a
jr nz, .wait2
diff --git a/home/print_bcd.asm b/home/print_bcd.asm
index 74e2d1619..4182eadfc 100644
--- a/home/print_bcd.asm
+++ b/home/print_bcd.asm
@@ -33,10 +33,11 @@ PrintBCDNumber::
jr nz, .loop
bit PRINTNUM_LEADINGZEROS_F, b
jr z, .done ; if so, we are done
-.numberEqualsZero ; if every digit of the BCD number is zero
+; every digit of the BCD number is zero
bit PRINTNUM_LEFTALIGN_F, b
jr nz, .skipLeftAlignmentAdjustment
- dec hl ; if the string is left-aligned, it needs to be moved back one space
+; the string is left-aligned; it needs to be moved back one space
+ dec hl
.skipLeftAlignmentAdjustment
bit PRINTNUM_MONEY_F, b
jr z, .skipCurrencySymbol
@@ -53,7 +54,7 @@ PrintBCDDigit::
and %00001111
and a
jr z, .zeroDigit
-.nonzeroDigit
+; nonzero digit
bit PRINTNUM_LEADINGZEROS_F, b ; have any non-space characters been printed?
jr z, .outputDigit
; if bit 7 is set, then no numbers have been printed yet
diff --git a/home/serial.asm b/home/serial.asm
index 6b03649a2..fe2a78761 100644
--- a/home/serial.asm
+++ b/home/serial.asm
@@ -278,7 +278,7 @@ Serial_PrintWaitingTextAndSyncAndExchangeNybble::
call WaitLinkTransfer
jp SafeLoadTempTilemapToTilemap
-Serial_SyncAndExchangeNybble::
+Serial_SyncAndExchangeNybble:: ; unreferenced
call LoadTilemapToTempTilemap
callfar PlaceWaitingText
jp WaitLinkTransfer
diff --git a/home/text.asm b/home/text.asm
index d9236a7a7..f6fd2746e 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -242,7 +242,7 @@ ENDM
dict "゙", .place ; should be .diacritic
jr .not_diacritic
-.diacritic
+.diacritic ; unreferenced
ld b, a
call Diacritic
jp NextChar
@@ -250,18 +250,19 @@ ENDM
.not_diacritic
cp FIRST_REGULAR_TEXT_CHAR
jr nc, .place
-
+; dakuten or handakuten
cp "パ"
jr nc, .handakuten
-
-.dakuten
+; dakuten
cp FIRST_HIRAGANA_DAKUTEN_CHAR
jr nc, .hiragana_dakuten
+; katakana dakuten
add "カ" - "ガ"
- jr .katakana_dakuten
+ jr .place_dakuten
+
.hiragana_dakuten
add "か" - "が"
-.katakana_dakuten
+.place_dakuten
ld b, "゙" ; dakuten
call Diacritic
jr .place
@@ -269,11 +270,13 @@ ENDM
.handakuten
cp "ぱ"
jr nc, .hiragana_handakuten
+; katakana handakuten
add "ハ" - "パ"
- jr .katakana_handakuten
+ jr .place_handakuten
+
.hiragana_handakuten
add "は" - "ぱ"
-.katakana_handakuten
+.place_handakuten
ld b, "゚" ; handakuten
call Diacritic
diff --git a/home/video.asm b/home/video.asm
index 2e577da7f..96490c3c5 100644
--- a/home/video.asm
+++ b/home/video.asm
@@ -184,7 +184,7 @@ UpdateBGMap::
THIRD_HEIGHT EQU SCREEN_HEIGHT / 3
-.bottom
+; bottom
ld de, 2 * THIRD_HEIGHT * SCREEN_WIDTH
add hl, de
ld sp, hl
@@ -267,7 +267,7 @@ endr
Serve1bppRequest::
; Only call during the first fifth of VBlank
- ld a, [wRequested1bpp]
+ ld a, [wRequested1bppSize]
and a
ret z
@@ -278,7 +278,7 @@ Serve1bppRequest::
cp LY_VBLANK + 2
ret nc
-; Copy [wRequested1bpp] 1bpp tiles from [wRequested1bppSource] to [wRequested1bppDest]
+; Copy [wRequested1bppSize] 1bpp tiles from [wRequested1bppSource] to [wRequested1bppDest]
ld [hSPBuffer], sp
@@ -296,11 +296,11 @@ Serve1bppRequest::
ld l, a
; # tiles to copy
- ld a, [wRequested1bpp]
+ ld a, [wRequested1bppSize]
ld b, a
xor a
- ld [wRequested1bpp], a
+ ld [wRequested1bppSize], a
.next
@@ -345,7 +345,7 @@ endr
Serve2bppRequest::
; Only call during the first fifth of VBlank
- ld a, [wRequested2bpp]
+ ld a, [wRequested2bppSize]
and a
ret z
@@ -358,12 +358,12 @@ Serve2bppRequest::
jr _Serve2bppRequest
Serve2bppRequest_VBlank::
- ld a, [wRequested2bpp]
+ ld a, [wRequested2bppSize]
and a
ret z
_Serve2bppRequest::
-; Copy [wRequested2bpp] 2bpp tiles from [wRequested2bppSource] to [wRequested2bppDest]
+; Copy [wRequested2bppSize] 2bpp tiles from [wRequested2bppSource] to [wRequested2bppDest]
ld [hSPBuffer], sp
@@ -381,11 +381,11 @@ _Serve2bppRequest::
ld l, a
; # tiles to copy
- ld a, [wRequested2bpp]
+ ld a, [wRequested2bppSize]
ld b, a
xor a
- ld [wRequested2bpp], a
+ ld [wRequested2bppSize], a
.next