![]() |
Routines |
| Prev: D6AD | Up: Map | Next: D6D3 |
|
Used by the routine at DrawTilePixels.
Draws a tile reflected both horizontally and vertically.
|
||||||||||
|
Start at the last line.
|
||||||||||
| DrawTileBoth | D6BD | LD B,$08 | Set the number of lines. | |||||||
| D6BF | INC DE | Move to the last line. | ||||||||
| D6C0 | INC DE | |||||||||
| D6C1 | INC DE | |||||||||
| D6C2 | INC DE | |||||||||
| D6C3 | INC DE | |||||||||
| D6C4 | INC DE | |||||||||
| D6C5 | INC DE | |||||||||
|
Draw each line turned round, from last to first.
|
||||||||||
| DrawTileBoth_Line | D6C6 | LD A,(DE) | Fetch a line, move to the previous one and keep the line in C. | |||||||
| D6C7 | DEC DE | |||||||||
| D6C8 | LD C,A | |||||||||
| D6C9 | PUSH BC | Save the counters. | ||||||||
| D6CA | LD B,$F9 | Point BC at the page of bytes turned round. | ||||||||
| D6CC | LD A,(BC) | Draw the line turned round. | ||||||||
| D6CD | LD (HL),A | |||||||||
| D6CE | INC H | |||||||||
| D6CF | POP BC | Restore the counters. | ||||||||
| D6D0 | DJNZ DrawTileBoth_Line | Go back for the next line. | ||||||||
| D6D2 | RET | Return. | ||||||||
| Prev: D6AD | Up: Map | Next: D6D3 |