![]() |
Routines |
| Prev: CCC5 | Up: Map | Next: CCD6 |
|
Used by the routines at overlap_test_obj, is_on_or_near_obj, dX_obj_loop, dY_obj_loop and dZ_obj_hit_test.
Not centred like X and Y: Z is an object's base and +$06 its whole height. So the test takes the gap between the two bases and compares it with the height of whichever object is lower. The player's top half has a height of 0, which is why it is kept out of the scans while the legs move (player_move_and_draw): the legs, 23 high, would find it inside them.
|
||||||||||||||
| do_objs_intersect_on_z | CCC7 | LD A,(IX+$03) | A = Z + dZ - other Z | |||||||||||
| CCCA | ADD A,H | |||||||||||||
| CCCB | SUB (IY+$03) | |||||||||||||
| CCCE | JP P,intersect_z_above | we are the lower one: our height | ||||||||||||
| CCD1 | NEG | |||||||||||||
| CCD3 | LD D,(IX+$06) | |||||||||||||
| Prev: CCC5 | Up: Map | Next: CCD6 |