![]() |
Routines |
| Prev: A7A3 | Up: Map | Next: A7CA |
|
Used by the routine at UpdatePanel.
Copies CounterBoxAttributes to the attribute file. The box is six cells wide and three cells high.
|
||||
|
Copy the attributes of the box.
|
||||
| ColourCounterBox | A7AE | LD HL,$5A99 | Point HL at 5A99 (in the attribute buffer). | |
| A7B1 | LD DE,$A7CA | Point DE at CounterBoxAttributes. | ||
| A7B4 | LD BC,$0603 | Set the width to 06 and the height to 03. | ||
| ColourCounterBox_Row | A7B7 | PUSH BC | Stash the size and the address of the row. | |
| A7B8 | PUSH HL | |||
| ColourCounterBox_Cell | A7B9 | LD A,(DE) | Fetch the attribute of the cell. | |
| A7BA | INC DE | Move on to the next attribute. | ||
| A7BB | LD (HL),A | Write it to the attribute file. | ||
| A7BC | INC HL | Move on to the next cell. | ||
| A7BD | DJNZ ColourCounterBox_Cell | Jump to ColourCounterBox_Cell until the row is done. | ||
| A7BF | POP HL | Restore the address of the row from the stack. | ||
| A7C0 | LD A,$20 | Set A to 20. | ||
| A7C2 | CALL AddAToHL | Call AddAToHL. | ||
| A7C5 | POP BC | Restore the size of the box from the stack. | ||
| A7C6 | DEC C | Jump to ColourCounterBox_Row until all of the rows are done. | ||
| A7C7 | JR NZ,ColourCounterBox_Row | |||
| A7C9 | RET | Return. | ||
| Prev: A7A3 | Up: Map | Next: A7CA |