![]() |
Routines |
| Prev: D2DA | Up: Map | Next: D303 |
|
Used by the routine at draw_landscape.
The counterpart of piece_off_top_edge for the lower map cells: the piece's topmost y is compared with view_y, the in-cell y of the play area's bottom row. A flat piece's top is its start y less 4 (a flat step is four rows tall); a vertical wall's is +1 less +3 of its collision box; a slope's is +3.
|
||||||||||||||
| piece_off_bottom_edge | D2E1 | LD A,(piece_rise) | Flat piece. | |||||||||||
| D2E4 | AND A | |||||||||||||
| D2E5 | JR NZ,piece_off_bottom_edge_0 | |||||||||||||
| D2E7 | LD A,(piece_page_y) | |||||||||||||
| D2EA | SUB $04 | |||||||||||||
| D2EC | JR piece_off_bottom_edge_2 | |||||||||||||
| piece_off_bottom_edge_0 | D2EE | LD A,(piece_dx_copy) | Vertical wall. | |||||||||||
| D2F1 | AND A | |||||||||||||
| D2F2 | JR NZ,piece_off_bottom_edge_1 | |||||||||||||
| D2F4 | LD A,(IX+$01) | |||||||||||||
| D2F7 | SUB (IX+$03) | |||||||||||||
| D2FA | JR piece_off_bottom_edge_2 | |||||||||||||
| piece_off_bottom_edge_1 | D2FC | LD A,(IX+$03) | Slope. | |||||||||||
| piece_off_bottom_edge_2 | D2FF | CP B | NZ if below the bottom edge. | |||||||||||
| D300 | RET NC | |||||||||||||
| D301 | XOR A | |||||||||||||
| D302 | RET | |||||||||||||
| Prev: D2DA | Up: Map | Next: D303 |