Prev: 51761 Up: Map Next: 51879
51775: Draw HUD
Used by the routines at RunGame and PrepareLife.
Draws the status panel at the top of the screen and the frame round the playfield. The panel has the scores, the numbers of ships with a ship icon beside each, and the high score. The frame has the sides, the lines along the top and bottom, the corners and some ticks. Last of all it draws the fuel gauge at the right.
status-panel
DrawHUD 51775 LD A,70 A=70.
51777 LD (51694),A Player one's score is bright yellow.
51780 LD A,66 A=66.
51782 LD (51710),A Player two's score is bright red.
51785 LD HL,3888 HL=3888.
51788 LD DE,51758 The second copy of the frame parameters.
51791 CALL FillAttributes Call FillAttributes.
51794 CALL PrintShipsRemaining Call PrintShipsRemaining.
51797 LD A,(63062) The other player's ships.
51800 ADD A,26 Add 26 to A.
51802 LD (51723),A The digit of the other player's ships.
51805 LD DE,51674 The hud text.
51808 LD B,8 B=8.
51810 CALL PrintTextRepeatedly Call PrintTextRepeatedly.
51813 LD HL,2864 HL=2864.
51816 LD DE,51495 The ship icon.
51819 CALL DrawBitmap Call DrawBitmap.
51822 LD HL,2992 HL=2992.
51825 LD DE,51495 The ship icon.
51828 CALL DrawBitmap Call DrawBitmap.
DrawHUD_Frame 51831 LD IX,51741 The frame parameters.
51835 LD DE,52216 The frame corner table.
51838 LD (IX+9),E Write E to offset 9 of IX.
51841 LD (IX+10),D Write D to offset 10 of IX.
51844 LD DE,52197 The frame tick table.
51847 LD (IX+12),E Write E to offset 12 of IX.
51850 LD (IX+13),D Write D to offset 13 of IX.
51853 CALL DrawFrame Call DrawFrame.
51856 CALL ColourFuelGauge_Yellow Call ColourFuelGauge_Yellow.
51859 CALL DrawFuelGaugeFrame Call DrawFuelGaugeFrame.
51862 LD HL,14320 HL=14320.
51865 PUSH HL Stash HL on the stack.
51866 LD DE,52136 The fuel gauge attributes.
51869 CALL FillAttributes Call FillAttributes.
51872 POP HL Bring HL back off the stack.
51873 LD DE,52070 The fuel label graphic.
51876 JP DrawBitmap Jump to DrawBitmap.
Prev: 51761 Up: Map Next: 51879