![]() |
Routines |
| Prev: C898 | Up: Map | Next: C8CA |
|
Used by the routine at UpdateLogoPiece.
Sets a rectangle of attributes in the attribute buffer.
|
||||||||||||||
|
Work out the distance from one row to the next.
|
||||||||||||||
| FillAttributeRectangle | C8B2 | LD E,A | Add the flash colour used in the last frame (PreviousFlashColour) to the attribute, and keep it. | |||||||||||
| C8B3 | LD A,($BBFC) | |||||||||||||
| C8B6 | OR E | |||||||||||||
| C8B7 | EX AF,AF' | |||||||||||||
| C8B8 | LD A,$18 | Work out how far to move on from the end of one row of the rectangle to the start of the next. | ||||||||||||
| C8BA | SUB B | |||||||||||||
| C8BB | LD E,A | |||||||||||||
| C8BC | LD D,$00 | |||||||||||||
| C8BE | EX AF,AF' | |||||||||||||
|
Fill each row of the rectangle.
|
||||||||||||||
| FillAttributeRectangle_Row | C8BF | PUSH BC | Keep the width and the height. | |||||||||||
| FillAttributeRectangle_Loop | C8C0 | LD (HL),A | Set the attributes of one row of the rectangle. | |||||||||||
| C8C1 | INC HL | |||||||||||||
| C8C2 | DJNZ FillAttributeRectangle_Loop | |||||||||||||
| C8C4 | ADD HL,DE | Move on to the start of the next row, and loop back until all of the rows have been set. | ||||||||||||
| C8C5 | POP BC | |||||||||||||
| C8C6 | DEC C | |||||||||||||
| C8C7 | JR NZ,FillAttributeRectangle_Row | |||||||||||||
| C8C9 | RET | Return. | ||||||||||||
| Prev: C898 | Up: Map | Next: C8CA |