summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-10-23 20:39:20 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-10-26 20:30:09 -0400
commit46f6cc4d41494c044f1091491c712afc2a5bfd3a (patch)
treefee103b542f99af23954d6610029b481e8f6742b /home
parent26ddba8cfd8f035c06bd6419b64a6c4d7dbc226f (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.asm8
-rw-r--r--home/print_bcd.asm7
-rw-r--r--home/print_num.asm5
-rw-r--r--home/text.asm17
-rw-r--r--home/video.asm18
-rw-r--r--home/warp_connection.asm2
9 files changed, 35 insertions, 37 deletions
diff --git a/home/audio.asm b/home/audio.asm
index 410dad55..a1158427 100644
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -409,7 +409,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 c0bcaad3..f471ba1e 100644
--- a/home/battle.asm
+++ b/home/battle.asm
@@ -252,6 +252,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 0ac2c0b6..a072b1e7 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 efb0499a..42929935 100644
--- a/home/gfx.asm
+++ b/home/gfx.asm
@@ -137,7 +137,7 @@ Request2bpp::
cp TILES_PER_CYCLE
jr nc, .cycle
- ld [wRequested2bpp], a
+ ld [wRequested2bppSize], a
call DelayFrame
pop af
@@ -149,7 +149,7 @@ Request2bpp::
.cycle
ld a, TILES_PER_CYCLE
- ld [wRequested2bpp], a
+ ld [wRequested2bppSize], a
call DelayFrame
ld a, c
@@ -182,7 +182,7 @@ Request1bpp::
cp TILES_PER_CYCLE
jr nc, .cycle
- ld [wRequested1bpp], a
+ ld [wRequested1bppSize], a
call DelayFrame
pop af
@@ -194,7 +194,7 @@ Request1bpp::
.cycle
ld a, TILES_PER_CYCLE
- ld [wRequested1bpp], a
+ ld [wRequested1bppSize], a
call DelayFrame
ld a, c
diff --git a/home/print_bcd.asm b/home/print_bcd.asm
index 74e2d161..4182eadf 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/print_num.asm b/home/print_num.asm
index d9cf15f5..62f03f5a 100644
--- a/home/print_num.asm
+++ b/home/print_num.asm
@@ -35,7 +35,6 @@ PrintNum::
cp 2
jr z, .word
; maximum 3 bytes
-.long
ld a, [de]
ldh [hPrintNumBuffer + 1], a
inc de
@@ -81,7 +80,7 @@ PrintNum::
cp 6
jr z, .six
-.seven
+; seven
ld a, HIGH(1000000 >> 8)
ldh [hPrintNumBuffer + 4], a
ld a, HIGH(1000000) ; mid
@@ -301,7 +300,7 @@ PrintNum::
inc hl
ret
-PrintHexNumber:: ; unreferenced
+PrintHexNumber::
; Print the c-byte value from de to hl as hexadecimal digits.
.loop
push bc
diff --git a/home/text.asm b/home/text.asm
index 9d3428ac..5e2942f6 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -238,18 +238,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
@@ -257,11 +258,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 dcf7b47c..415b23ae 100644
--- a/home/video.asm
+++ b/home/video.asm
@@ -159,7 +159,7 @@ UpdateBGMap::
THIRD_HEIGHT EQU SCREEN_HEIGHT / 3
-.bottom
+; bottom
ld de, 2 * THIRD_HEIGHT * SCREEN_WIDTH
add hl, de
ld sp, hl
@@ -240,11 +240,11 @@ endr
ret
Serve1bppRequest::
- ld a, [wRequested1bpp]
+ ld a, [wRequested1bppSize]
and a
ret z
-; Copy [wRequested1bpp] 1bpp tiles from [wRequested1bppSource] to [wRequested1bppDest]
+; Copy [wRequested1bppSize] 1bpp tiles from [wRequested1bppSource] to [wRequested1bppDest]
ld [hSPBuffer], sp
@@ -262,11 +262,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
@@ -309,11 +309,11 @@ endr
ret
Serve2bppRequest::
- ld a, [wRequested2bpp]
+ ld a, [wRequested2bppSize]
and a
ret z
-; Copy [wRequested2bpp] 2bpp tiles from [wRequested2bppSource] to [wRequested2bppDest]
+; Copy [wRequested2bppSize] 2bpp tiles from [wRequested2bppSource] to [wRequested2bppDest]
ld [hSPBuffer], sp
@@ -331,11 +331,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
diff --git a/home/warp_connection.asm b/home/warp_connection.asm
index 3c4c5929..a5465b4c 100644
--- a/home/warp_connection.asm
+++ b/home/warp_connection.asm
@@ -497,8 +497,6 @@ EnterMapWarp::
ld a, c
cp TILESET_POKECENTER
ret nz
-
-.pokecenter
ld a, [wPrevMapGroup]
ld [wLastSpawnMapGroup], a
ld a, [wPrevMapNumber]