![]() |
Routines |
| Prev: CC95 | Up: Map | Next: CCB0 |
|
Used by the routines at overlap_test_obj, is_on_or_near_obj, dX_obj_hit_test, dY_obj_loop and dZ_obj_loop.
Boxes are centred on X and Y, with +$04 and +$05 the half-sizes. They overlap in X if the distance between the centres, after the mover's dX, is less than the two half-widths added: exactly touching is not overlapping. Also used by overlap_test_obj and is_on_or_near_obj.
|
||||||||||||||
| do_objs_intersect_on_x | CC9D | LD A,(IX+$04) | D = the two half-widths | |||||||||||
| CCA0 | ADD A,(IY+$04) | |||||||||||||
| CCA3 | LD D,A | |||||||||||||
| CCA4 | LD A,(IX+$01) | A = |X + dX - other X| | ||||||||||||
| CCA7 | ADD A,C | |||||||||||||
| CCA8 | SUB (IY+$01) | |||||||||||||
| CCAB | JP P,intersect_x_result | |||||||||||||
| CCAE | NEG | |||||||||||||
| Prev: CC95 | Up: Map | Next: CCB0 |