summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
authorZumi <13794376+ZoomTen@users.noreply.github.com>2021-07-05 05:08:45 +0700
committerGitHub <noreply@github.com>2021-07-04 18:08:45 -0400
commitaf65010e2ca58f275b14046d60708b83398dddfd (patch)
tree624ef4cd0c305cd7bb98fd7ecc91d1dbb2739cd1 /home
parent71050d61347bfe1e196a385d84bfb6a3c6d7e22d (diff)
Disassemble field debug (bank $3f) (#97)
* Disassemble SFX and cries * Disassemble clock dialog * Disassemble slot machine minigame * Disassemble AnimateTilesetImpl * Disassemble start menu frame type dialog * Disassemble field menu * Split debug menus into debug folder * Remove redundant shims
Diffstat (limited to 'home')
-rw-r--r--home/map.asm2
-rw-r--r--home/overworld.asm2
-rw-r--r--home/tileset.asm1
-rw-r--r--home/toolgear.asm28
4 files changed, 18 insertions, 15 deletions
diff --git a/home/map.asm b/home/map.asm
index 76aa499..86793db 100644
--- a/home/map.asm
+++ b/home/map.asm
@@ -1665,7 +1665,7 @@ Function2b78::
ret
Function2b79::
- callab Functionfce3e
+ callab DebugMapViewer
ld a, $4
call WriteIntod637
ret
diff --git a/home/overworld.asm b/home/overworld.asm
index d8bf242..ee111a8 100644
--- a/home/overworld.asm
+++ b/home/overworld.asm
@@ -13,7 +13,7 @@ OverworldStartButtonCheck::
ld a, [wDebugFlags]
bit DEBUG_FIELD_F, a
ret z ; debug disabled
- callba InGameDebugMenu
+ callba FieldDebugMenu
jr CheckStartmenuSelectHook
.regularMenu
callba DisplayStartMenu
diff --git a/home/tileset.asm b/home/tileset.asm
index 16df729..6646fbb 100644
--- a/home/tileset.asm
+++ b/home/tileset.asm
@@ -357,6 +357,7 @@ GetBlockLocation::
GetFacingSignpost::
call GetFacingTileCoord
ld b, a
+GetSignpost::
ld a, d
sub $4
ld d, a
diff --git a/home/toolgear.asm b/home/toolgear.asm
index 6ae720e..38a4c1c 100644
--- a/home/toolgear.asm
+++ b/home/toolgear.asm
@@ -47,14 +47,14 @@ newcharmap local
EnableToolgear::
ld hl, wd153
- res 0, [hl]
+ res TOOLGEAR_COORDS_F, [hl]
ld hl, wToolgearFlags
- set 0, [hl]
+ set TOOLGEAR_COORDS_F, [hl]
ret
DisableToolgear::
ld hl, wToolgearFlags
- res 0, [hl]
+ res SHOW_TOOLGEAR_F, [hl]
xor a
ldh [hLCDCPointer], a
ret
@@ -63,10 +63,10 @@ InitToolgearBuffer::
xor a
ldh [hBGMapMode], a
ld hl, wToolgearFlags
- bit 0, [hl]
+ bit SHOW_TOOLGEAR_F, [hl]
jr z, .hide_window
- res 7, [hl]
+ res HIDE_TOOLGEAR_F, [hl]
call LoadToolgearGraphics
bgcoord hl, 0, 0, wToolgearBuffer
@@ -82,7 +82,7 @@ InitToolgearBuffer::
call UpdateToolgear
ld hl, vBGMap1
- ld bc, $0004 ; 4 tiles = 2 rows
+ ld bc, $4 ; 4 tiles = 2 rows
bgcoord de, 0, 0, wToolgearBuffer
call Get2bpp
@@ -93,7 +93,7 @@ InitToolgearBuffer::
ldh [hWY], a
ret
-.hide_window:
+.hide_window
xor a
ldh [hLCDCPointer], a
ld a, $90
@@ -110,19 +110,20 @@ UpdateToolgear::
call ByteFill
ld hl, wd153
- bit 0, [hl]
+ bit TOOLGEAR_COORDS_F, [hl]
jr z, .debug_show_time
+
ld hl, wXCoord
bgcoord de, 4, 1, wToolgearBuffer
- ld c, $01
+ ld c, 1
call .printHex
ld hl, wYCoord
bgcoord de, 8, 1, wToolgearBuffer
- ld c, $01
+ ld c, 1
call .printHex
ret
-.debug_show_time
+.debug_show_time
ld hl, hRTCHours
bgcoord de, 0, 1, wToolgearBuffer
call .printDec
@@ -140,7 +141,8 @@ UpdateToolgear::
ldh a, [hRTCSeconds]
and 1
ret z
- ld a, $70 ; :
+
+ ld a, ":"
ldbgcoord_a 2, 1, wToolgearBuffer
ret
@@ -180,7 +182,7 @@ UpdateToolgear::
.printDigit::
; .printDigit
; print a hexadecimal digit for value in a to de
- and $0f
+ and $f
add "0"
ld [de], a
inc de