mirror of
https://github.com/pret/pokered.git
synced 2024-10-24 07:25:21 +00:00
16 lines
305 B
NASM
16 lines
305 B
NASM
; returns whether the player is one tile outside the map in Z
|
|
IsPlayerJustOutsideMap: ; 128d8 (4:68d8)
|
|
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
|