Prev: D647 Up: Map Next: D6CE
D682: Test Wide Overlap
Used by the routine at TestGroupObjects.
Tests the entity against a block with TestBlockOverlap after widening the x and y edges by half the matching extent, less four. For the test, the edge path takes its size from A, and a miss on z returns the distance instead of setting the flags to FF. The edges and those two patches are put back.
Input
IX The entity
TestWideOverlap D682 PUSH BC Remember the caller's count.
D683 LD A,$4F Make the edge path take its size from A.
D685 LD ($D716),A
D688 LD HL,($D6E7) Widen the x edge by half the x extent, less four.
D68B LD B,$00
D68D PUSH HL
D68E LD C,(IX+$0B)
D691 SRL C
D693 ADD HL,BC
D694 LD C,$04
D696 SBC HL,BC
D698 LD ($D6E7),HL
D69B LD HL,($D6F8) Widen the y edge by half the y extent, less four.
D69E PUSH HL
D69F LD C,(IX+$0C)
D6A2 SRL C
D6A4 ADD HL,BC
D6A5 LD C,$04
D6A7 SBC HL,BC
D6A9 LD ($D6F8),HL
D6AC LD HL,($D73A) A miss on z returns the distance instead of failing.
D6AF PUSH HL
D6B0 LD A,$6F
D6B2 LD H,A
D6B3 LD L,$18
D6B5 LD ($D73A),HL
D6B8 CALL TestBlockOverlap Test the widened block.
D6BB POP HL Put the edges and that branch back.
D6BC LD ($D73A),HL
D6BF POP HL
D6C0 LD ($D6F8),HL
D6C3 POP HL
D6C4 LD ($D6E7),HL
D6C7 LD A,$48 Put the edge path back to taking its size from B.
D6C9 LD ($D716),A
D6CC POP BC Restore the caller's count.
D6CD RET Return.
Prev: D647 Up: Map Next: D6CE