![]() |
Routines |
| Prev: E028 | Up: Map | Next: E063 |
|
Finds the tile at a cell of the map, which is 32 cells wide and 32 cells high.
|
||||||||||||||||
| FindMapTile | E051 | LD A,L | Save the column, and start with the row. | |||||||||||||
| E052 | LD L,H | |||||||||||||||
| E053 | LD H,$00 | |||||||||||||||
| E055 | ADD HL,HL | Multiply the row by thirty-two. | ||||||||||||||
| E056 | ADD HL,HL | |||||||||||||||
| E057 | ADD HL,HL | |||||||||||||||
| E058 | ADD HL,HL | |||||||||||||||
| E059 | ADD HL,HL | |||||||||||||||
| E05A | OR L | Add the column. | ||||||||||||||
| E05B | LD L,A | |||||||||||||||
| E05C | LD BC,$5E04 | Add the address of the map. | ||||||||||||||
| E05F | ADD HL,BC | |||||||||||||||
| E060 | LD A,(HL) | Fetch the tile and return. | ||||||||||||||
| E061 | AND A | |||||||||||||||
| E062 | RET | |||||||||||||||
| Prev: E028 | Up: Map | Next: E063 |