Files
pokegold-spaceworld/engine/debug/field/check_tile.inc
T
Rangi 062a875864 Clean up some whitespace
- Exactly one newline at the end of each file
- No double blank lines, except to separate SECTIONs
- Tabs only used for indentation, not alignment
2026-06-21 09:34:04 -04:00

64 lines
849 B
PHP

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"