Prev: E200 Up: Map Next: E2E9
E229: Draw Panel
Used by the routines at SwitchPlayer and RunGame.
Draws the panel at the edges of the screen. This is made of four frames, which are drawn with DrawFrame using the table at FrameTable, the pictures and the text of the panel, and the attributes of the rectangles at PanelRectangles. The direction gauges are also drawn.
draw-panel
DrawPanel E229 CALL UpdatePanelDigits Refresh the digits of the lives and bottles in the panel text.
Draw the four frames of the panel: the message box, the game window and the frames of the two direction gauges.
E22C LD IX,$E41B Point IX at the first frame in the table at FrameTable.
E230 CALL DrawFrame Draw the message box.
E233 CALL DrawFrame Draw the game window.
E236 CALL DrawFrame Draw the frame of the left direction gauge.
E239 CALL DrawFrame Draw the frame of the right direction gauge.
Draw the corner pieces beside the message box and the empty dial of each direction gauge.
E23C LD HL,$7D58 Set the position of the left corner piece.
E23F LD DE,$6307 Point DE at MenuCornerLeft.
E242 CALL DrawPicture Draw it.
E245 LD HL,$7DA0 Set the position of the right corner piece.
E248 LD DE,$630D Point DE at MenuCornerRight.
E24B CALL DrawPicture Draw it.
E24E LD HL,$B7B8 Set the position of the empty dial of the right gauge.
E251 LD DE,$81E5 Point DE at DialPicture.
E254 CALL DrawPicture Draw it.
E257 LD HL,$B710 Set the position of the empty dial of the left gauge.
E25A LD DE,$81E5 Point DE at DialPicture.
E25D CALL DrawPicture Draw it.
Draw the dial and needle of each direction gauge.
E260 LD A,$08 Set the heading of the needle to 08.
E262 LD ($5CD8),A Store it as the heading to draw.
E265 LD A,($A5A2) Fetch the column of the second gauge.
E268 LD ($A78A),A Patch it into the drawing routine as the column to draw at.
E26B CALL DrawDirectionGauge Draw the dial of the second gauge.
E26E LD A,($A59E) Fetch the column of the first gauge.
E271 LD ($A78A),A Patch it into the drawing routine as the column to draw at.
E274 LD A,$08 Set the heading of the needle to 08 again.
E276 LD ($5CD8),A Store it as the heading to draw.
E279 CALL DrawDirectionGauge Draw the dial of the first gauge.
Print the 13 text records of the panel: the headings of the scores, the digits, the lives and bottles, and the high score.
E27C LD DE,$E11F Point DE at PanelText.
E27F LD B,$13 Set the number of records to 13.
E281 CALL PrintTextRecords Print them.
Colour the icons on both sides of the panel.
E284 LD HL,$2F00 Set the position of the left lives icon.
E287 LD DE,$E1E0 Point DE at PanelRectangles.
E28A CALL FillRectangle Colour it.
E28D LD L,$E8 Move across to the right side.
E28F LD DE,$E1E0 Point DE at PanelRectangles.
E292 CALL FillRectangle Colour it.
E295 LD H,$50 Move down to the bottle icons.
E297 LD DE,$E1E3 Point DE at PanelRectangles_Second.
E29A CALL FillRectangle Colour the right bottle icon.
E29D LD L,$00 Move across to the left side.
E29F LD DE,$E1E3 Point DE at PanelRectangles_Second.
E2A2 CALL FillRectangle Colour the left bottle icon.
E2A5 LD HL,$6808 Set the position of the left spare icon.
E2A8 LD DE,$E1E6 Point DE at PanelRectangles_Third.
E2AB CALL FillRectangle Colour it.
E2AE LD L,$E8 Move across to the right side.
E2B0 LD DE,$E1E6 Point DE at PanelRectangles_Third.
E2B3 CALL FillRectangle Colour it.
Draw the bubbles that show the lives and the bottles of each player.
E2B6 LD DE,$7601 Point DE at SpriteBubble_1.
E2B9 CALL CopyRectangleRows Copy it into the picture buffer at F500.
E2BC LD HL,$5000 Set the position of the left bottle.
E2BF LD DE,$644B Point DE at BottlePicture.
E2C2 CALL DrawPicture Draw it.
E2C5 LD L,$E8 Move across to the right side.
E2C7 LD DE,$644B Point DE at BottlePicture.
E2CA CALL DrawPicture Draw it.
E2CD LD HL,$2F00 Set the position of the left bubble.
E2D0 LD DE,$F500 Point DE at the buffered bubble picture.
E2D3 CALL DrawPicture Draw it.
E2D6 LD L,$E8 Move across to the right side.
E2D8 LD DE,$F500 Point DE at the buffered bubble picture.
E2DB CALL DrawPicture Draw it.
Draw the empty bars of the two gauges.
E2DE LD HL,$8700 Set the position of the bar of the first gauge.
E2E1 CALL DrawGaugeBar Draw it.
E2E4 LD L,$A8 Set the position of the bar of the second gauge.
E2E6 JP DrawGaugeBar Jump to DrawGaugeBar.
Prev: E200 Up: Map Next: E2E9