![]() |
Routines |
| Prev: D595 | Up: Map | Next: D5C9 |
|
Used by the routine at DrawSidePictures.
The same as DrawTileBlock, except that each row is drawn from right to left and each tile is reflected, which makes a reflection of the block.
|
||||||||||||||||
|
Draw each row from right to left.
|
||||||||||||||||
| DrawTileBlockReflected | D5AE | PUSH BC | Stash the size and the screen address on the stack. | |||||||||||||
| D5AF | PUSH HL | |||||||||||||||
|
Draw a tile, reflected.
|
||||||||||||||||
| DrawTileBlockReflected_Tile | D5B0 | LD A,(DE) | Fetch the number of the tile. | |||||||||||||
| D5B1 | INC DE | |||||||||||||||
| D5B2 | XOR %01000000 | Reflect it horizontally. | ||||||||||||||
| D5B4 | PUSH BC | Stash the counters on the stack. | ||||||||||||||
| D5B5 | LD BC,($A20F) | Fetch TileSetAddress. | ||||||||||||||
|
Draw the tile.
|
||||||||||||||||
| D5B9 | CALL DrawTile | Call DrawTile. | ||||||||||||||
| D5BC | POP BC | Restore the counters from the stack. | ||||||||||||||
| D5BD | DEC L | Move on to the next column to the left. | ||||||||||||||
| D5BE | DJNZ DrawTileBlockReflected_Tile | Jump to DrawTileBlockReflected_Tile if there are tiles left in the row. | ||||||||||||||
|
Move down a row.
|
||||||||||||||||
| D5C0 | POP HL | Restore the screen address of the row from the stack. | ||||||||||||||
| D5C1 | CALL MoveDownRow | Call MoveDownRow. | ||||||||||||||
| D5C4 | POP BC | Restore the size from the stack. | ||||||||||||||
| D5C5 | DEC C | Count down the rows. | ||||||||||||||
| D5C6 | JR NZ,DrawTileBlockReflected | Jump to DrawTileBlockReflected if there are rows left. | ||||||||||||||
| D5C8 | RET | Return. | ||||||||||||||
| Prev: D595 | Up: Map | Next: D5C9 |