Prev: E216 Up: Map Next: E249
E235: Read a tile byte from the map
Used by the routine at load_map_window.
Returns the tile byte at (column, row), keeping the wrapped column in right_map_column. For the upper row 0 (above the map) it returns 0 (empty) and moves HL a row back so that HL + $60 is still the lower cell's.
Input
HL Column (L), row (H)
Output
A Tile byte
read_map_cell E235 CALL map_cell_address
E238 LD A,C
E239 LD (right_map_column),A
E23C LD A,(view_row)
E23F AND A
E240 JR Z,read_map_cell_0
E242 LD A,(HL)
E243 RET
read_map_cell_0 E244 AND A Row 0.
E245 SBC HL,DE
E247 XOR A
E248 RET
Prev: E216 Up: Map Next: E249