![]() |
Routines |
| Prev: 907B | Up: Map | Next: 917C |
|
When Jetman crosses a cell boundary, point HL at the new terrain cell and DE at the screen column that has scrolled into view.
|
||||||||||||||||
|
Draw the new terrain column that has scrolled into view.
|
||||||||||||||||
| DrawNewColumn | 915C | LD A,E | Jump to LocateTerrainCell if Jetman is moving left. | |||||||||||||
| 915D | AND A | |||||||||||||||
| 915E | JP M,LocateTerrainCell | |||||||||||||||
| 9161 | LD DE,$0080 | Add 80 to the world X. | ||||||||||||||
| 9164 | ADD HL,DE | |||||||||||||||
| 9165 | LD A,H | Fetch the high byte. | ||||||||||||||
| 9166 | AND %00011111 | Keep only bits 0-4. | ||||||||||||||
| 9168 | LD H,A | Write it back to H. | ||||||||||||||
| 9169 | LD DE,$7000 | DE=TerrainData_Active. | ||||||||||||||
| 916C | SRA H | Divide the world position by 08. | ||||||||||||||
| 916E | RR L | |||||||||||||||
| 9170 | SRA H | |||||||||||||||
| 9172 | RR L | |||||||||||||||
| 9174 | SRA H | |||||||||||||||
| 9176 | RR L | |||||||||||||||
| 9178 | ADD HL,DE | HL+=DE. | ||||||||||||||
| 9179 | LD DE,$50DF | DE=50DF. | ||||||||||||||
|
Continue on to DrawTerrainColumn.
|
||||||||||||||||
| Prev: 907B | Up: Map | Next: 917C |