![]() |
Routines |
| Prev: 99AF | Up: Map | Next: 99E5 |
|
The handler of DrawGraphic for a graphic that is drawn as it is stored. A row of bytes is copied at a time, and then ScreenPosition1PixelAbove moves up a line.
|
||||
| DrawGraphic_Upright | 99C9 | POP BC | Restore the attribute and graphic ID from the stack. | |
| 99CA | CALL GetBlendInstruction | Call GetBlendInstruction to get the instruction to mix the graphic with the screen. | ||
| 99CD | LD ($99D7),A | Write it over the instruction at 99D7. | ||
| 99D0 | CALL GetGraphicDetails | Call GetGraphicDetails to get the details of the graphic. | ||
| DrawGraphic_Upright_Row | 99D3 | PUSH BC | Stash the width and height on the stack. | |
| 99D4 | PUSH HL | Stash the screen address on the stack. | ||
| DrawGraphic_Upright_Byte | 99D5 | LD A,(DE) | Fetch the next byte of the graphic. | |
| 99D6 | INC DE | Move DE on to the next byte. | ||
| 99D7 | NOP | This is replaced by an instruction that mixes A with the screen. | ||
| 99D8 | LD (HL),A | Write A to the screen. | ||
| 99D9 | INC L | Move HL on to the next byte. | ||
| 99DA | DJNZ DrawGraphic_Upright_Byte | Decrease the width by one and loop back to DrawGraphic_Upright_Byte until all of the bytes in the row have been drawn. | ||
| 99DC | POP HL | Restore the screen address from the stack. | ||
| 99DD | CALL ScreenPosition1PixelAbove | Call ScreenPosition1PixelAbove to move up a line. | ||
| 99E0 | POP BC | Restore the width and height from the stack. | ||
| 99E1 | DEC C | Decrease the height by one and loop back to DrawGraphic_Upright_Row until all of the rows have been done. | ||
| 99E2 | JR NZ,DrawGraphic_Upright_Row | |||
| 99E4 | RET | Return. | ||
| Prev: 99AF | Up: Map | Next: 99E5 |