summaryrefslogtreecommitdiff
path: root/engine/debug
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-10-06 18:09:33 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-10-06 18:09:33 -0400
commit2e90df15b76050c825f6c0b96c88453feec8f3dd (patch)
tree7370a11f6a1d961eeb180066ca34cc7c5c2bda58 /engine/debug
parentcf26f559857de7317900578c21c2e8727964d36c (diff)
Update battle anim bg function comments, and identify more unnamed labels
Diffstat (limited to 'engine/debug')
-rw-r--r--engine/debug/color_picker.asm78
1 files changed, 38 insertions, 40 deletions
diff --git a/engine/debug/color_picker.asm b/engine/debug/color_picker.asm
index 2d25c0748..d07cc97b6 100644
--- a/engine/debug/color_picker.asm
+++ b/engine/debug/color_picker.asm
@@ -269,7 +269,7 @@ DebugColorMain:
.SwitchMon
ld [wcf66], a
- ld a, 0 ; ScreenInitNo
+ ld a, 0
ld [wJumptableIndex], a
ret
@@ -1064,7 +1064,8 @@ INCBIN "gfx/debug/up_arrow.2bpp"
DebugColor_GFX:
INCBIN "gfx/debug/color_test.2bpp"
-TilesetColorTest:
+TilesetColorPicker:
+; A debug function to test tileset palettes at runtime.
; dummied out
ret
xor a
@@ -1094,21 +1095,21 @@ TilesetColorTest:
call ByteFill
hlcoord 0, 0, wAttrmap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
- ld a, $07
+ ld a, PAL_BG_TEXT
call ByteFill
- ld de, $15
+ decoord 1, 1, 0
ld a, DEBUGTEST_WHITE
- call Function821d2
- ld de, $1a
+ call DebugTileset_DrawColorSwatch
+ decoord 6, 1, 0
ld a, DEBUGTEST_LIGHT
- call Function821d2
- ld de, $1f
+ call DebugTileset_DrawColorSwatch
+ decoord 11, 1, 0
ld a, DEBUGTEST_DARK
- call Function821d2
- ld de, $24
+ call DebugTileset_DrawColorSwatch
+ decoord 16, 1, 0
ld a, DEBUGTEST_BLACK
- call Function821d2
- call Function821f4
+ call DebugTileset_DrawColorSwatch
+ call DebugTileset_LoadRGBMeter
call Function8220f
call WaitBGMap2
ld [wJumptableIndex], a
@@ -1116,42 +1117,39 @@ TilesetColorTest:
ldh [hWY], a
ret
-Function821d2:
+DebugTileset_DrawColorSwatch:
hlcoord 0, 0
- call Function821de
+ call _DebugColor_DrawSwatch
-Function821d8:
+DebugColor_DrawAttributeSwatch:
ld a, [wcf64]
hlcoord 0, 0, wAttrmap
-Function821de:
+_DebugColor_DrawSwatch:
+; Fills a 4x3 box at de with byte a.
add hl, de
rept 4
ld [hli], a
endr
- ld bc, $10
+rept 2
+ ld bc, SCREEN_WIDTH - 4
add hl, bc
rept 4
ld [hli], a
endr
- ld bc, $10
- add hl, bc
-rept 4
- ld [hli], a
endr
ret
-Function821f4:
+DebugTileset_LoadRGBMeter:
hlcoord 2, 4
call .Place
hlcoord 2, 6
call .Place
hlcoord 2, 8
-
.Place:
ld a, DEBUGTEST_TICKS_1
ld [hli], a
- ld bc, $10 - 1
+ ld bc, 15
ld a, DEBUGTEST_TICKS_2
call ByteFill
ret
@@ -1171,7 +1169,7 @@ Function8220f:
ld de, wBGPals1
add hl, de
ld de, wc608
- ld bc, 8
+ ld bc, 1 palettes
call CopyBytes
ld de, wc608
call DebugColor_CalculateRGB
@@ -1187,7 +1185,7 @@ DebugColorMain2: ; unreferenced
jr nz, .loop7
ld a, [hl]
and B_BUTTON
- jr nz, .asm_82299
+ jr nz, .cancel
call Function822f0
ret
@@ -1195,20 +1193,20 @@ DebugColorMain2: ; unreferenced
ld hl, wcf64
ld a, [hl]
inc a
- and 7
- cp 7
- jr nz, .asm_82253
- xor a
-.asm_82253
+ and PALETTE_MASK
+ cp PAL_BG_TEXT
+ jr nz, .palette_ok
+ xor a ; PAL_BG_GRAY
+.palette_ok
ld [hl], a
- ld de, $15
- call Function821d8
- ld de, $1a
- call Function821d8
- ld de, $1f
- call Function821d8
- ld de, $24
- call Function821d8
+ decoord 1, 1, 0
+ call DebugColor_DrawAttributeSwatch
+ decoord 6, 1, 0
+ call DebugColor_DrawAttributeSwatch
+ decoord 11, 1, 0
+ call DebugColor_DrawAttributeSwatch
+ decoord 16, 1, 0
+ call DebugColor_DrawAttributeSwatch
ldh a, [rSVBK]
push af
ld a, BANK(wBGPals2)
@@ -1230,7 +1228,7 @@ DebugColorMain2: ; unreferenced
ldh [hBGMapMode], a
ret
-.asm_82299
+.cancel
call ClearSprites
ldh a, [hWY]
xor %11010000