Files
pokegold-spaceworld/engine/debug/field/check_tile.asm
T
Narishma-gb e88fe24e15 Use the same Makefile build system as Gen 1+2 repos (#163)
This uses catch-all files like main.asm to reduce the total quantity and size of
build objects (from 1.1 GB to 70 MB).

---------

Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com>
2026-07-05 15:36:09 -04:00

64 lines
849 B
NASM

FieldDebug_CheckTile:
call .CheckTile
ld a, FIELDDEBUG_RETURN_REOPEN
ret
.CheckTile:
ld hl, .MenuHeader
call LoadMenuHeader
call MenuBox
ld a, [wPlayerMapX]
ld d, a
ld a, [wPlayerMapY]
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"