mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-10-16 04:04:19 +13:00
17 lines
288 B
NASM
17 lines
288 B
NASM
; returns whether the player is one tile outside the map in Z
|
|
IsPlayerJustOutsideMap:
|
|
ld a, [wYCoord]
|
|
ld b, a
|
|
ld a, [wCurMapHeight]
|
|
call .compareCoordWithMapDimension
|
|
ret z
|
|
ld a, [wXCoord]
|
|
ld b, a
|
|
ld a, [wCurMapWidth]
|
|
.compareCoordWithMapDimension
|
|
add a
|
|
cp b
|
|
ret z
|
|
inc b
|
|
ret
|