Prev: B4F9 Up: Map Next: B510
B4FD: Does this object overlap any other?
Used by the routine at handle_pickup_drop.
Tests IX against all 40 records with the per-axis tests at do_objs_intersect_on_x, do_objs_intersect_on_y and do_objs_intersect_on_z, with no offset on any axis. Empty slots are skipped, and so is any object with bit 1 of byte 7 set -- which is how IX avoids finding itself: it sets its own bit 1 for the duration. Only handle_pickup_drop uses it, to see whether there is room above Sabreman's head for a dropped object.
Input
IX the object
F on exit: carry set if another object's box overlaps IX's where it stands
do_any_objs_intersect B4FD PUSH BC save the registers; IY walks all 40 records
B4FE PUSH DE
B4FF PUSH HL
B500 PUSH IY
B502 LD IY,$5C08
B506 LD B,$28
B508 LD C,$00 no offset on X, Y or Z; and IX out of its own way
B50A LD L,C
B50B LD H,C
B50C SET 1,(IX+$07)
The exit clears IX's bit 1 unconditionally, so an object that had the bit set before the call loses it. The only caller passes Sabreman's legs, which do not normally carry it.
Prev: B4F9 Up: Map Next: B510