![]() |
Routines |
| Prev: 45496 | Up: Map | Next: 45526 |
|
Fills the attributes of the play window, which is 20 characters wide and 14 characters tall and starts at column 2 of row 2, with a single attribute.
|
||||||||
| FillPlayWindowAttributes | 45506 | LD HL,22594 | Point HL at the top left attribute of the play window. | |||||
| 45509 | LD DE,12 | There are 12 attributes between the end of one window row and the start of the next. | ||||||
| 45512 | LD BC,5134 | The window is 20 columns wide (B) and 14 rows tall (C). | ||||||
|
This entry point is used by the routines at FillLargeWindowAttributes and FillMessageAttributes.
|
||||||||
| FillAttributes_Row | 45515 | PUSH BC | Save the dimensions. | |||||
| FillAttributes_Column | 45516 | LD (HL),A | Write the attribute to the current cell. | |||||
| 45517 | INC L | Move on to the next column. | ||||||
| 45518 | DJNZ FillAttributes_Column | Loop back until the row is complete. | ||||||
| 45520 | ADD HL,DE | Move on to the start of the next row. | ||||||
| 45521 | POP BC | Restore the dimensions. | ||||||
| 45522 | DEC C | Decrease the row counter by one. | ||||||
| 45523 | JR NZ,FillAttributes_Row | Loop back until every row has been filled. | ||||||
| 45525 | RET | Return. | ||||||
| Prev: 45496 | Up: Map | Next: 45526 |