![]() |
Routines |
| Prev: 5FAF | Up: Map | Next: 5FE1 |
|
Clears the screen and draws the top line of the game window: the 1UP, HI and 2UP labels, the colours for the lives icons, and the three scores.
|
|||||
|
Blank the screen and write the banner.
|
|||||
| CreateWindow | 5FB7 | CALL ResetAttributes | Blank the attribute buffer using ResetAttributes. | ||
| 5FBA | CALL ResetScreen | Blank the screen buffer using ResetScreen. | |||
| 5FBD | CALL PrintBanner | Print the "1UP", "HI" and "2UP" labels using PrintBanner. | |||
|
Set the attributes for the 1UP lives graphic.
|
|||||
| 5FC0 | LD HL,$5808 | Set the attribute buffer address of the 1UP lives. | |||
| 5FC3 | LD A,$47 | Set the colour of the lives to INK:WHITE, PAPER:BLACK (BRIGHT). | |||
| 5FC5 | LD (HL),A | Colour the 1UP lives digit. | |||
| 5FC6 | INC HL | Move onto the next column. | |||
| 5FC7 | LD (HL),A | Colour the 1UP lives icon. | |||
|
Set the attributes for the 2UP lives graphic.
|
|||||
| 5FC8 | LD HL,$5816 | Set the attribute buffer address of the 2UP lives. | |||
| 5FCB | LD (HL),A | Colour the 2UP lives digit. | |||
| 5FCC | INC HL | Move onto the next column. | |||
| 5FCD | LD (HL),A | Colour the 2UP lives icon. | |||
|
Set the attributes for the score line (the whole line is INK:CYAN, PAPER:BLACK (BRIGHT)).
|
|||||
| 5FCE | LD HL,$5820 | Set the attribute buffer address of the score line. | |||
| 5FD1 | LD BC,$2045 | Set the column counter to 20 (the width of the screen) and the colour of the score line to INK:CYAN, PAPER:BLACK (BRIGHT). | |||
| CreateWindow_Loop | 5FD4 | LD (HL),C | Colour a cell of the score line. | ||
| 5FD5 | INC L | Move onto the next column. | |||
| 5FD6 | DJNZ CreateWindow_Loop | Decrease the column counter by one and loop back to CreateWindow_Loop until the whole score line has been coloured. | |||
|
Write the 1UP, 2UP and HI scores.
|
|||||
| 5FD8 | CALL Score_1UP | Print the 1UP score using Score_1UP. | |||
| 5FDB | CALL Score_2UP | Print the 2UP score using Score_2UP. | |||
| 5FDE | JP Score_HI | Jump to Score_HI to print the high score. | |||
|
View the equivalent code in;
|
|||||
| Prev: 5FAF | Up: Map | Next: 5FE1 |