Prev: E216 Up: Map Next: E244
E235: Get Tile
Used by the routine at MakeTiles.
Gets the number of the tile at a column and a row of the map. It also stores the column, after it has wrapped, at NextColumn. If the row is zero there is no tile above the first row of the map, so the tile is blank and the address is moved up a row, ready for the next tile.
Input
DE 60
H Row
L Column
Output
A Tile number
HL Address in the map
GetTile E235 CALL FindMapAddress Call FindMapAddress.
E238 LD A,C A=C.
E239 LD ($DDF7),A Update the next column.
E23C LD A,($CE58) The map row.
E23F AND A Jump to GetBlankTile if A is zero.
E240 JR Z,GetBlankTile
E242 LD A,(HL) Read HL.
E243 RET Return.
Prev: E216 Up: Map Next: E244