Files
pokegold-spaceworld/engine/debug/field/check_tile.inc
T
Zumi af65010e2c 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
2021-07-04 18:08:45 -04:00

65 lines
858 B
PHP

FieldDebug_CheckTile:
call .CheckTile
ld a, FIELDDEBUG_RETURN_REOPEN
ret
.CheckTile:
ld hl, .MenuHeader
call LoadMenuHeader
call MenuBox
ld a, [wPlayerNextMapX]
ld d, a
ld a, [wPlayerNextMapY]
ld e, a
call GetBlockLocation
ld a, [hl]
push af
call MenuBoxCoord2Tile
ld bc, $2a
add hl, bc
pop af
call .ShowTileNumber
ld a, 10
call DelayFrames
ld a, BUTTONS
call FieldDebug_WaitJoypadInput
call CloseWindow
ret
.MenuHeader:
db $40
menu_coords 0, 0, 5, 4
dw .MenuData
db 0
.MenuData: ; empty
db 0
.ShowTileNumber:
push af
swap a
and $f
call .ShowHexDigit
ld [hli], a
pop af
and $f
call .ShowHexDigit
ld [hli], a
ret
.ShowHexDigit:
push de
push hl
ld hl, .HexadecimalNumbers
ld e, a
ld d, 0
add hl, de
ld a, [hl]
pop hl
pop de
ret
.HexadecimalNumbers:
db "0123456789ABCDEF"