Prev: 46257 Up: Map Next: 46310
46265: 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 8 characters wide and 15 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 46265 LD HL,37921 Point HL at the user interface graphics.
46268 LD (38424),HL Use them as the current character set.
46271 LD DE,38161 Point DE at PanelCharacters.
46274 LD BC,2063 The panel is 8 characters wide (B) and 15 rows tall (C).
46277 LD HL,16408 Point HL at the top left of the panel, in column 24 of the display file.
46280 CALL PrintCharacterBlock Print the characters of the panel using PrintCharacterBlock.
46283 LD BC,2063 The panel is 8 characters wide (B) and 15 rows tall (C).
46286 LD HL,22552 Point HL at the top left of the panel, in column 24 of the attribute file.
46289 LD DE,38281 Point DE at PanelAttributes.
DrawPanel_Row 46292 PUSH BC Save the dimensions.
46293 PUSH HL Save the address of the start of the row.
DrawPanel_Attribute 46294 LD A,(DE) Copy an attribute into the attribute file and move on to the next column, until the row is done.
46295 INC DE
46296 LD (HL),A
46297 INC L
46298 DJNZ DrawPanel_Attribute
46300 POP HL Restore the address of the start of the row.
46301 LD BC,32 Move down to the next row of attributes.
46304 ADD HL,BC
46305 POP BC Restore the dimensions.
46306 DEC C Decrease the row counter by one.
46307 JR NZ,DrawPanel_Row Loop back until every row of the panel has been coloured.
46309 RET Return.
Prev: 46257 Up: Map Next: 46310