![]() |
Routines |
| Prev: 51352 | Up: Map | Next: 51402 |
|
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 | 51378 | LD E,A | Add the flash colour used in the last frame (PreviousFlashColour) to the attribute, and keep it. | |||||||||||
| 51379 | LD A,(48124) | |||||||||||||
| 51382 | OR E | |||||||||||||
| 51383 | EX AF,AF' | |||||||||||||
| 51384 | LD A,24 | Work out how far to move on from the end of one row of the rectangle to the start of the next. | ||||||||||||
| 51386 | SUB B | |||||||||||||
| 51387 | LD E,A | |||||||||||||
| 51388 | LD D,0 | |||||||||||||
| 51390 | EX AF,AF' | |||||||||||||
|
Fill each row of the rectangle.
|
||||||||||||||
| FillAttributeRectangle_Row | 51391 | PUSH BC | Keep the width and the height. | |||||||||||
| FillAttributeRectangle_Loop | 51392 | LD (HL),A | Set the attributes of one row of the rectangle. | |||||||||||
| 51393 | INC HL | |||||||||||||
| 51394 | DJNZ FillAttributeRectangle_Loop | |||||||||||||
| 51396 | ADD HL,DE | Move on to the start of the next row, and loop back until all of the rows have been set. | ||||||||||||
| 51397 | POP BC | |||||||||||||
| 51398 | DEC C | |||||||||||||
| 51399 | JR NZ,FillAttributeRectangle_Row | |||||||||||||
| 51401 | RET | Return. | ||||||||||||
| Prev: 51352 | Up: Map | Next: 51402 |