Prev: E0A0 Up: Map Next: E0DD
E0C4: Do the moved object and a box overlap in V?
Used by the routines at HIT_BOXES_U and HIT_BOXES_V.
As OVERLAP_U, in V: the object's half-size +9 and step +B, the box's centre and half-size at +1 and +3.
Input
D The object's V in the cell (PLACE_IN_CELL)
IX The object
IY The box
Output
A The gap between them, negative for an overlap
F Carry set if they overlap
OVERLAP_V E0C4 LD A,(IX+$09) C = the object's half-size in V, halved, plus the box's
E0C7 SRL A
E0C9 ADD A,(IY+$03)
E0CC LD C,A
E0CD LD A,(IX+$0B) The object's V after half its step, less the box's centre
E0D0 SRA A
E0D2 ADD A,D
E0D3 SUB (IY+$01)
E0D6 JP P,OVERLAP_V_0 Made positive
E0D9 NEG
OVERLAP_V_0 E0DB SUB C Less the two half-sizes: carry if they overlap
E0DC RET
Prev: E0A0 Up: Map Next: E0DD