![]() |
Routines |
| Prev: 6C7A | Up: Map | Next: 6E39 |
|
Used by the routine at DrawIfPictures.
Blanks the illustration from pixel row AF down to 50, lets the picture bytecode paint the saved attributes, then copies that buffer onto the screen.
|
||||
|
Blank the illustration pixels, row by row, from row AF down to row 50.
|
||||
| ClearIllustration | 6DFA | LD BC,$AF00 | Pixel row AF, column 00. | |
|
Blank one pixel row of 20 bytes.
|
||||
| ClearIllustration_Row | 6DFD | PUSH BC | Stash the row counter on the stack. | |
| 6DFE | CALL $22AA | Call PIXEL_ADD for this row's screen address. | ||
| 6E01 | PUSH HL | Copy the screen address to DE (using the stack). | ||
| 6E02 | POP DE | |||
| 6E03 | INC DE | Advance to the next byte. | ||
| 6E04 | LD BC,$001F | Count the remaining 001F bytes of this row. | ||
| 6E07 | LD (HL),$00 | Write 00 across the rest of the row. | ||
| 6E09 | LDIR | |||
| 6E0B | POP BC | Restore the row counter from the stack. | ||
| 6E0C | DEC B | Count down one row. | ||
| 6E0D | LD A,$4F | Jump to ClearIllustration_Row until row 50 has been cleared. | ||
| 6E0F | CP B | |||
| 6E10 | JR NZ,ClearIllustration_Row | |||
|
Clear the matching attribute rows, then copy them into the illustration buffer.
|
||||
| 6E12 | LD HL,$5800 | Point HL at 5800 (attribute buffer). | ||
| 6E15 | LD DE,$5801 | Point DE at the next byte. | ||
| 6E18 | LD BC,$017F | Count the remaining 017F bytes of the top twelve rows. | ||
| 6E1B | LD (HL),$00 | Write 00 across the block. | ||
| 6E1D | LDIR | |||
| 6E1F | LD HL,$5800 | Copy 0180 bytes from 5800 (attribute buffer) to AttributeBuffer. | ||
| 6E22 | LD DE,$6C7A | |||
| 6E25 | LD BC,$0180 | |||
| 6E28 | LDIR | |||
|
Paint the picture into the buffer.
|
||||
| 6E2A | CALL DrawRoomPicture | Call DrawRoomPicture. | ||
|
Copy the painted attributes back onto the screen.
|
||||
| 6E2D | LD DE,$5800 | Copy 0180 bytes from AttributeBuffer to 5800 (attribute buffer). | ||
| 6E30 | LD HL,$6C7A | |||
| 6E33 | LD BC,$0180 | |||
| 6E36 | LDIR | |||
| 6E38 | RET | Return. | ||
| Prev: 6C7A | Up: Map | Next: 6E39 |