Prev: 57384 Up: Map Next: 57443
57425: Find Map Tile
Used by the routines at MarkCellVisited, SpawnItem, SpawnBall and SpawnBonus.
Finds the tile at a cell of the map, which is 32 cells wide and 32 cells high.
Input
L Column of the cell
H Row of the cell
Output
A The tile (zero for no tile)
F The zero flag is set if there is no tile
FindMapTile 57425 LD A,L Save the column, and start with the row.
57426 LD L,H
57427 LD H,0
57429 ADD HL,HL Multiply the row by thirty-two.
57430 ADD HL,HL
57431 ADD HL,HL
57432 ADD HL,HL
57433 ADD HL,HL
57434 OR L Add the column.
57435 LD L,A
57436 LD BC,24068 Add the address of the map.
57439 ADD HL,BC
57440 LD A,(HL) Fetch the tile and return.
57441 AND A
57442 RET
Prev: 57384 Up: Map Next: 57443