Prev: CB8C Up: Map Next: CBA0
CB9A: Shorten dX against the other objects
Used by the routine at dZ_ok.
Tries the object's box against every one of the forty records. For each one it already overlaps in Y and Z -- with the moves accepted so far -- an overlap in X after the move means dX has to be shortened, a unit at a time, until the boxes no longer meet. If dX reaches zero the scan stops.
Every such meeting also passes harm between the two (see dX_obj_hit_test) and, if the obstacle can be pushed (bit 2 of its +$07), gives it the mover's whole intended dX, so it moves off on its own next update.
Input
IX the moving object
C dX
L dY so far (zero)
H dZ as accepted
C on exit, dX shortened
adj_dX_for_obj_intersect CB9A LD IY,$5C08 IY = the first record; forty of them
CB9E LD B,$28
Prev: CB8C Up: Map Next: CBA0