Prev: C172 Up: Map Next: C19F
C17A: Is the player on or next to this object?
Used by the routine at upd_103.
Lowering the player by 4 makes an object the player stands on count as touching.
Input
IX the player
IY the object
F on exit, carry set if their boxes overlap in x and y, and in z with the player lowered by 4
is_on_or_near_obj C17A PUSH BC
C17B LD BC,$0000
C17E LD L,C
C17F LD H,C
C180 CALL do_objs_intersect_on_x
C183 JR NC,near_obj_done
C185 CALL do_objs_intersect_on_y
C188 JR NC,near_obj_done
C18A LD A,(IX+$03) z test with the player 4 units lower, then put back
C18D SUB $04
C18F LD (IX+$03),A
C192 CALL do_objs_intersect_on_z
C195 PUSH AF
C196 LD A,(IX+$03)
C199 ADD A,$04
C19B LD (IX+$03),A
C19E POP AF
Prev: C172 Up: Map Next: C19F