Prev: A1F3 Up: Map Next: A240
A219: Draw Side Panel
Used by the routine at StartGame.
Draws the side panel on the right of the screen. The panel is 08 characters wide and 18 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.
Before After
side-panel-before side-panel-after
DrawSidePanel A219 LD HL,$B03A Write SidePanelUDG to FontPointer.
A21C LD ($5E01),HL
A21F LD HL,$00C0 HL=00C0 (screen buffer location).
A222 LD DE,$B32A Point DE at the side panel data at SidePanelData.
A225 LD BC,$0818 BC=08 (width), 18 (height).
SidePanel_Loop_Y A228 PUSH BC Stash BC and HL on the stack.
A229 PUSH HL
A22A CALL ScreenAddress Call ScreenAddress to get the screen address.
SidePanel_Loop_X A22D LD A,(DE) Fetch the next character of the panel.
A22E INC DE Increment the character data pointer by one.
A22F CALL PrintScreen Call PrintScreen to print the character.
A232 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.
A234 POP HL Restore HL from the stack.
A235 LD A,H Add 08 to H, to move down one character row.
A236 ADD A,$08
A238 LD H,A
A239 POP BC Restore BC from the stack.
A23A 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.
A23B JR NZ,SidePanel_Loop_Y
A23D JP Score_1UP Jump to Score_1UP to print the scores.
Prev: A1F3 Up: Map Next: A240