![]() |
Routines |
| Prev: 40379 | Up: Map | Next: 40430 |
|
Used by the routine at TestBoxesOverlap.
Tests whether two boxes overlap vertically. The result is stored in 23580.
|
||||||||||||
| TestVerticalOverlap | 40408 | XOR A | Clear the result. | |||||||||
| 40409 | LD (23580),A | Store it. | ||||||||||
| 40412 | LD A,(IX+1) | Fetch the top of the first box. | ||||||||||
| 40415 | SUB H | Subtract the position of the second box. | ||||||||||
| 40416 | CP (IX+3) | Is it less than the height of the first box? | ||||||||||
| 40419 | JR C,SetOverlapFlag | Jump to SetOverlapFlag if so. | ||||||||||
| 40421 | LD A,H | Fetch the position of the second box. | ||||||||||
| 40422 | SUB (IX+1) | Subtract the top of the first box. | ||||||||||
| 40425 | CP E | Is it less than the height of the second box? | ||||||||||
| 40426 | RET NC | Return if not, as the boxes do not overlap. | ||||||||||
| 40427 | JP SetOverlapFlag | Jump to SetOverlapFlag. | ||||||||||
| Prev: 40379 | Up: Map | Next: 40430 |