![]() |
Routines |
| Prev: B8B7 | Up: Map | Next: B8E2 |
|
Used by the routines at ADJ_DU_FOR_OBJ_INTERSECT, ADJ_DV_FOR_OBJ_INTERSECT, ADJ_DZ_FOR_OBJ_INTERSECT, DO_ANY_OBJS_INTERSECT and CAN_PICK_UP.
Not centred like U and V: Z is an object's base and +$06 its whole height. So the test takes the gap between the two bases, after the mover's dZ, and compares it with the height of whichever object is lower.
|
||||||||||||||||
| DO_OBJS_INTERSECT_ON_Z | B8CC | LD A,(IX+$03) | A = Z + dZ - the other's Z; the mover higher, use the other's height | |||||||||||||
| B8CF | ADD A,H | |||||||||||||||
| B8D0 | SUB (IY+$03) | |||||||||||||||
| B8D3 | JP P,DO_OBJS_INTERSECT_ON_Z_1 | |||||||||||||||
| B8D6 | NEG | the mover lower: the distance, and its own height | ||||||||||||||
| B8D8 | LD D,(IX+$06) | |||||||||||||||
| DO_OBJS_INTERSECT_ON_Z_0 | B8DB | SUB D | carry if the gap is less than the lower one's height | |||||||||||||
| B8DC | RET | |||||||||||||||
| DO_OBJS_INTERSECT_ON_Z_1 | B8DD | LD D,(IY+$06) | the other's height | |||||||||||||
| B8E0 | JR DO_OBJS_INTERSECT_ON_Z_0 | |||||||||||||||
| Prev: B8B7 | Up: Map | Next: B8E2 |