Prev: 90CC Up: Map Next: 9117
90FB: Is the player within 12 pixels of this thing?
Used by the routines at EAT_FOOD, PICK_UP and MUSHROOM.
The symmetric version of the test PLAYER_AT_DOOR makes -- absolute difference on both axes against the same 12-pixel box CHECK_HIT uses, with no room check and no one-sidedness.
Input
IX The thing to measure from
NEAR_PLAYER 90FB LD A,($EA93) |dx|, by negating if it came out negative.
90FE SUB (IX+$03)
9101 JP P,NEAR_PLAYER_0
9104 NEG
NEAR_PLAYER_0 9106 CP $0C
9108 RET NC
9109 LD A,($EA94)
910C SUB (IX+$04)
910F JP P,NEAR_PLAYER_1
9112 NEG
NEAR_PLAYER_1 9114 CP $0C
9116 RET
Prev: 90CC Up: Map Next: 9117