![]() |
Routines |
| Prev: 41459 | Up: Map | Next: 41536 |
|
Used by the routine at StartGame.
Draws the side panel on the right of the screen. The panel is 8 characters wide and 24 characters high, and the characters to use are listed in SidePanelData. They are drawn with the graphics at SidePanelUDG as the font. It then jumps to Score_1UP to print the score.
|
||||||||
| DrawSidePanel | 41497 | LD HL,45114 | Write SidePanelUDG to FontPointer. | |||||
| 41500 | LD (24065),HL | |||||||
| 41503 | LD HL,192 | HL=0192 (screen buffer location). | ||||||
| 41506 | LD DE,45866 | Point DE at the side panel data at SidePanelData. | ||||||
| 41509 | LD BC,2072 | BC=8 (width), 24 (height). | ||||||
| SidePanel_Loop_Y | 41512 | PUSH BC | Stash BC and HL on the stack. | |||||
| 41513 | PUSH HL | |||||||
| 41514 | CALL ScreenAddress | Call ScreenAddress to get the screen address. | ||||||
| SidePanel_Loop_X | 41517 | LD A,(DE) | Fetch the next character of the panel. | |||||
| 41518 | INC DE | Increment the character data pointer by one. | ||||||
| 41519 | CALL PrintScreen | Call PrintScreen to print the character. | ||||||
| 41522 | DJNZ SidePanel_Loop_X | Decrease the width counter by one and loop back to SidePanel_Loop_X until the row of the panel has been printed. | ||||||
| 41524 | POP HL | Restore HL from the stack. | ||||||
| 41525 | LD A,H | Add 8 to H, to move down one character row. | ||||||
| 41526 | ADD A,8 | |||||||
| 41528 | LD H,A | |||||||
| 41529 | POP BC | Restore BC from the stack. | ||||||
| 41530 | DEC C | Decrease the height counter by one and loop back to SidePanel_Loop_Y until all the rows of the panel have been printed. | ||||||
| 41531 | JR NZ,SidePanel_Loop_Y | |||||||
| 41533 | JP Score_1UP | Jump to Score_1UP to print the scores. | ||||||
| Prev: 41459 | Up: Map | Next: 41536 |