Prev: 9DA9 Up: Map Next: 9DBB
9DB1: Test a box against another
The box at IX: x, bottom line, width, height. The other: x in L, bottom line in H, width D, height E. They overlap when their x ranges and their line ranges do (x_overlap, y_overlap). scratch_count is 1 if so, 0 if not. Used for the ship's touches (ship_contact), the shots (test_player_shots) and the landscape.
Input
IX The box
L The other's x
H The other's bottom line
D The other's width
E The other's height
boxes_overlap 9DB1 CALL x_overlap
9DB4 LD A,(scratch_count)
9DB7 AND A
9DB8 RET Z
9DB9 JR y_overlap
Prev: 9DA9 Up: Map Next: 9DBB