summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/phone/phone.asm2
-rw-r--r--engine/pokedex/pokedex.asm4
-rw-r--r--engine/pokedex/pokedex_2.asm4
-rw-r--r--engine/pokedex/pokedex_3.asm15
-rw-r--r--engine/pokegear/radio.asm2
-rw-r--r--engine/printer/printer_serial.asm16
-rw-r--r--engine/tilesets/map_palettes.asm16
-rw-r--r--engine/tilesets/tileset_anims.asm9
-rw-r--r--engine/tilesets/timeofday_pals.asm26
9 files changed, 47 insertions, 47 deletions
diff --git a/engine/phone/phone.asm b/engine/phone/phone.asm
index 7ee9d0f0..67f1fe0f 100644
--- a/engine/phone/phone.asm
+++ b/engine/phone/phone.asm
@@ -148,7 +148,7 @@ CheckPhoneCall::
; unused
ret
-UnusedInitCallReceiveDelay:
+UnreferencedInitCallReceiveDelay:
farcall InitCallReceiveDelay
ret
diff --git a/engine/pokedex/pokedex.asm b/engine/pokedex/pokedex.asm
index eaece5e9..fe89a551 100644
--- a/engine/pokedex/pokedex.asm
+++ b/engine/pokedex/pokedex.asm
@@ -1055,8 +1055,8 @@ Pokedex_ListingPosChanged:
ret
Pokedex_FillColumn:
-; Fills a column starting at HL, going downwards.
-; B is the height of the column and A is the tile it's filled with.
+; Fills a column starting at hl, going downwards.
+; b is the height of the column, and a is the tile it's filled with.
push de
ld de, SCREEN_WIDTH
.loop
diff --git a/engine/pokedex/pokedex_2.asm b/engine/pokedex/pokedex_2.asm
index a6eeef0a..a4e579d8 100644
--- a/engine/pokedex/pokedex_2.asm
+++ b/engine/pokedex/pokedex_2.asm
@@ -233,14 +233,14 @@ GetDexEntryPointer:
ld d, [hl]
rlca
rlca
- and %11
+ maskbits NUM_DEX_ENTRY_BANKS
add BANK("Pokedex Entries 001-064")
ld b, a
pop hl
ret
GetDexEntryPagePointer:
- call GetDexEntryPointer ; b:de
+ call GetDexEntryPointer
push hl
ld h, d
ld l, e
diff --git a/engine/pokedex/pokedex_3.asm b/engine/pokedex/pokedex_3.asm
index 7cde4dc4..ed35c766 100644
--- a/engine/pokedex/pokedex_3.asm
+++ b/engine/pokedex/pokedex_3.asm
@@ -55,7 +55,7 @@ DrawPokedexListWindow:
ld a, $51
hlcoord 11, 1
ld b, SCREEN_HEIGHT - 3
- call Bank70_FillColumn
+ call Pokedex_FillColumn2
ld [hl], $52
jr .Done
@@ -66,7 +66,7 @@ DrawPokedexListWindow:
ld a, $67
hlcoord 11, 1
ld b, SCREEN_HEIGHT - 3
- call Bank70_FillColumn
+ call Pokedex_FillColumn2
ld [hl], $68
.Done:
ret
@@ -89,7 +89,7 @@ DrawPokedexSearchResultsWindow:
ld a, $67
hlcoord 11, 1
ld b, SCREEN_HEIGHT / 2
- call Bank70_FillColumn
+ call Pokedex_FillColumn2
ld [hl], $68
ld a, $34
hlcoord 0, 11
@@ -104,7 +104,7 @@ DrawPokedexSearchResultsWindow:
ld a, $67
hlcoord 11, 12
ld b, 5
- call Bank70_FillColumn
+ call Pokedex_FillColumn2
ld [hl], $68
hlcoord 0, 12
lb bc, 5, 11
@@ -137,14 +137,14 @@ DrawDexEntryScreenRightEdge:
hlcoord 19, 1
ld a, $67
ld b, 15
- call Bank70_FillColumn
+ call Pokedex_FillColumn2
ld [hl], $68
hlcoord 19, 17
ld [hl], $3c
xor a
ld b, SCREEN_HEIGHT
hlcoord 19, 0, wAttrmap
- call Bank70_FillColumn
+ call Pokedex_FillColumn2
call WaitBGMap2
pop hl
ld a, l
@@ -153,7 +153,8 @@ DrawDexEntryScreenRightEdge:
ldh [hBGMapAddress + 1], a
ret
-Bank70_FillColumn:
+Pokedex_FillColumn2:
+; A local duplicate of Pokedex_FillColumn.
push de
ld de, SCREEN_WIDTH
.loop
diff --git a/engine/pokegear/radio.asm b/engine/pokegear/radio.asm
index 77ba764e..d161e770 100644
--- a/engine/pokegear/radio.asm
+++ b/engine/pokegear/radio.asm
@@ -653,7 +653,7 @@ PokedexShow2:
add hl, bc
rlca
rlca
- and %11
+ maskbits NUM_DEX_ENTRY_BANKS
add BANK("Pokedex Entries 001-064")
push af
ld a, BANK(PokedexDataPointerTable)
diff --git a/engine/printer/printer_serial.asm b/engine/printer/printer_serial.asm
index 37b06a9f..d047418e 100644
--- a/engine/printer/printer_serial.asm
+++ b/engine/printer/printer_serial.asm
@@ -73,7 +73,7 @@ Printer_NextSection:
ret
Printer_SectionOne:
- ld a, 1
+ ld a, $1
ld [wJumptableIndex], a
ret
@@ -118,7 +118,7 @@ Printer_StartTransmittingTilemap:
Printer_EndTilemapTransmission:
; ensure that we go from here to routine 7
- ld a, 6
+ ld a, $6
ld [wJumptableIndex], a
; send packet 4
ld hl, PrinterDataPacket4 ; signal no transmission
@@ -168,7 +168,7 @@ Printer_WaitSerial:
ld hl, wPrinterSerialFrameDelay
inc [hl]
ld a, [hl]
- cp 6
+ cp $6
ret c
xor a
ld [hl], a
@@ -179,7 +179,7 @@ Printer_WaitSerialAndLoopBack2:
ld hl, wPrinterSerialFrameDelay
inc [hl]
ld a, [hl]
- cp 6
+ cp $6
ret c
xor a
ld [hl], a
@@ -205,11 +205,11 @@ Printer_CheckConnectionStatus:
cp $81
jr nz, .printer_error
ld a, [wPrinterStatusFlags]
- cp 0
+ cp $0
jr nz, .printer_error
ld hl, wPrinterConnectionOpen
set 1, [hl]
- ld a, 5
+ ld a, $5
ld [wHandshakeFrameDelay], a
call _Printer_NextSection
ret
@@ -275,7 +275,7 @@ Printer_WaitHandshake:
xor a
ld [wPrinterSendByteOffset], a
ld [wPrinterSendByteOffset + 1], a
- ld a, 1
+ ld a, $1
ld [wPrinterOpcode], a
ld a, $88
ldh [rSB], a
@@ -351,7 +351,7 @@ Printer_ComputeChecksum:
ret
Printer_StageHeaderForSend:
- ld a, 1
+ ld a, $1
ld [wGameboyPrinter2bppSource + 0], a
ld a, [wPrinterMargins]
ld [wGameboyPrinter2bppSource + 1], a
diff --git a/engine/tilesets/map_palettes.asm b/engine/tilesets/map_palettes.asm
index 2cf1192b..ddc31371 100644
--- a/engine/tilesets/map_palettes.asm
+++ b/engine/tilesets/map_palettes.asm
@@ -19,7 +19,7 @@ _SwapTextboxPalettes::
and $f
bit 3, a
jr z, .next
- jr .asm_8038
+ jr .by_map_group
.UpperNybble:
ld hl, wTilesetPalettes
@@ -34,15 +34,15 @@ _SwapTextboxPalettes::
bit 3, a
jr z, .next
-.asm_8038
+.by_map_group
ld a, [wMapGroup]
dec a
ld hl, MapGroupPalettes
add l
ld l, a
- jr nc, .asm_8044
+ jr nc, .no_carry
inc h
-.asm_8044
+.no_carry
ld a, [hl]
.next
@@ -75,7 +75,7 @@ _ScrollBGMapPalettes::
and $f
bit 3, a
jr z, .next
- jr .asm_8083
+ jr .by_map_group
.UpperNybble:
ld hl, wTilesetPalettes
@@ -90,15 +90,15 @@ _ScrollBGMapPalettes::
bit 3, a
jr z, .next
-.asm_8083
+.by_map_group
ld a, [wMapGroup]
dec a
ld hl, MapGroupPalettes
add l
ld l, a
- jr nc, .asm_808f
+ jr nc, .no_carry
inc h
-.asm_808f
+.no_carry
ld a, [hl]
.next
diff --git a/engine/tilesets/tileset_anims.asm b/engine/tilesets/tileset_anims.asm
index a7b35c54..00cd4a86 100644
--- a/engine/tilesets/tileset_anims.asm
+++ b/engine/tilesets/tileset_anims.asm
@@ -9,7 +9,7 @@ _AnimateTileset::
; Iterate over a given pointer array of
; animation functions (one per frame).
-; Typically in wra1, vra0
+; Typically in WRAM bank 1.
ld a, [wTilesetAnim]
ld e, a
@@ -212,6 +212,8 @@ TilesetTowerAnim:
dw NULL, WaitTileAnimation
dw NULL, WaitTileAnimation
dw NULL, DoneTileAnimation
+
+UnusedTilesetAnim_fc266:
dw vTiles2 tile $4f, WriteTileToBuffer
dw wTileAnimBuffer, ScrollTileRightLeft
dw vTiles2 tile $4f, WriteTileFromBuffer
@@ -435,7 +437,6 @@ FlowerTileFrames:
INCBIN "gfx/tilesets/flower/cgb_2.2bpp"
LavaBubbleAnim1:
-; Splash in the bottom-right corner of the fountain.
ld hl, sp+0
ld b, h
ld c, l
@@ -455,7 +456,6 @@ LavaBubbleAnim1:
jp WriteTile
LavaBubbleAnim2:
-; Splash in the top-left corner of the fountain.
ld hl, sp+0
ld b, h
ld c, l
@@ -749,5 +749,4 @@ WhirlpoolTiles2: INCBIN "gfx/tilesets/whirlpool/2.2bpp"
WhirlpoolTiles3: INCBIN "gfx/tilesets/whirlpool/3.2bpp"
WhirlpoolTiles4: INCBIN "gfx/tilesets/whirlpool/4.2bpp"
-;unused
- ret
+ ret ; unused
diff --git a/engine/tilesets/timeofday_pals.asm b/engine/tilesets/timeofday_pals.asm
index 8a92484a..0c676d91 100644
--- a/engine/tilesets/timeofday_pals.asm
+++ b/engine/tilesets/timeofday_pals.asm
@@ -57,37 +57,37 @@ _TimeOfDayPals::
ret
_UpdateTimePals::
- ld c, 9 ; normal
+ ld c, $9 ; normal
call GetTimePalFade
call DmgToCgbTimePals
ret
FadeInPalettes::
- ld c, 18
+ ld c, $12
call GetTimePalFade
- ld b, 4
+ ld b, $4
call ConvertTimePalsDecHL
ret
FadeOutPalettes::
call FillWhiteBGColor
- ld c, 9
+ ld c, $9
call GetTimePalFade
- ld b, 4
+ ld b, $4
call ConvertTimePalsIncHL
ret
FadeInQuickly:
- ld c, 0
+ ld c, $0
call GetTimePalFade
- ld b, 4
+ ld b, $4
call ConvertTimePalsIncHL
ret
FadeBlackQuickly:
- ld c, 9
+ ld c, $9
call GetTimePalFade
- ld b, 4
+ ld b, $4
call ConvertTimePalsDecHL
ret
@@ -114,9 +114,9 @@ endr
ReplaceTimeOfDayPals::
ld hl, .BrightnessLevels
ld a, [wMapTimeOfDay]
- cp 4 ; Dark cave, needs Flash
- jr z, .DarkCave
- and 7
+ cp PALETTE_DARK
+ jr z, .NeedsFlash
+ and $7
add l
ld l, a
ld a, 0
@@ -126,7 +126,7 @@ ReplaceTimeOfDayPals::
ld [wTimeOfDayPalset], a
ret
-.DarkCave:
+.NeedsFlash:
ld a, [wStatusFlags]
bit STATUSFLAGS_FLASH_F, a
jr nz, .UsedFlash