![]() |
Routines |
| Prev: D292 | Up: Map | Next: D2DA |
|
Used by the routine at draw_landscape.
The counterpart of piece_off_left_edge for the two right-hand map cells of the window. In the right-hand cell the play area's right edge falls at the same in-cell x as the left edge does in the left-hand one (view_x), so a piece whose leftmost x is beyond it is out of sight.
|
||||||||||||||
| piece_off_right_edge | D2C0 | LD A,(piece_dx_copy) | A sloped piece running left: its leftmost x is its far end, +2, less one. | |||||||||||
| D2C3 | AND A | |||||||||||||
| D2C4 | JR Z,piece_off_right_edge_0 | |||||||||||||
| D2C6 | LD A,(direction_flag) | |||||||||||||
| D2C9 | CP $FF | |||||||||||||
| D2CB | JR Z,piece_off_right_edge_0 | |||||||||||||
| D2CD | LD A,(IX+$02) | |||||||||||||
| D2D0 | DEC A | |||||||||||||
| D2D1 | JR piece_off_right_edge_1 | |||||||||||||
| piece_off_right_edge_0 | D2D3 | LD A,(piece_page_x) | Otherwise the piece's start x. | |||||||||||
| piece_off_right_edge_1 | D2D6 | CP B | NZ if beyond the edge. (A piece starting exactly on the edge gives Z and is walked anyway.) | |||||||||||
| D2D7 | RET NC | |||||||||||||
| D2D8 | XOR A | |||||||||||||
| D2D9 | RET | |||||||||||||
| Prev: D292 | Up: Map | Next: D2DA |