Prev: B4B1 Up: Map Next: B4E6
B4B9: Draw Panel
Used by the routines at InitialiseGame and WinRound.
Draws the panel on the right of the screen, which holds the score, the hi-score and the sector map. It is 08 characters wide and 0F characters tall, and is built from the characters at PanelCharacters using the graphics at PanelGraphics, and coloured using the attributes at PanelAttributes.
Before After
draw-panel-before draw-panel-after
DrawPanel B4B9 LD HL,$9421 Point HL at the user interface graphics.
B4BC LD ($9618),HL Use them as the current character set.
B4BF LD DE,$9511 Point DE at PanelCharacters.
B4C2 LD BC,$080F The panel is 08 characters wide (B) and 0F rows tall (C).
B4C5 LD HL,$4018 Point HL at the top left of the panel, in column 18 of the display file.
B4C8 CALL PrintCharacterBlock Print the characters of the panel using PrintCharacterBlock.
B4CB LD BC,$080F The panel is 08 characters wide (B) and 0F rows tall (C).
B4CE LD HL,$5818 Point HL at the top left of the panel, in column 18 of the attribute file.
B4D1 LD DE,$9589 Point DE at PanelAttributes.
DrawPanel_Row B4D4 PUSH BC Save the dimensions.
B4D5 PUSH HL Save the address of the start of the row.
DrawPanel_Attribute B4D6 LD A,(DE) Copy an attribute into the attribute file and move on to the next column, until the row is done.
B4D7 INC DE
B4D8 LD (HL),A
B4D9 INC L
B4DA DJNZ DrawPanel_Attribute
B4DC POP HL Restore the address of the start of the row.
B4DD LD BC,$0020 Move down to the next row of attributes.
B4E0 ADD HL,BC
B4E1 POP BC Restore the dimensions.
B4E2 DEC C Decrease the row counter by one.
B4E3 JR NZ,DrawPanel_Row Loop back until every row of the panel has been coloured.
B4E5 RET Return.
Prev: B4B1 Up: Map Next: B4E6