Prev: D30C Up: Map Next: D347
D317: Render HUD
Used by the routines at Stage_Next_Wave and PlayerDeath.
Clears the screen buffer, sets a white background, draws the playfield border (DrawPlayfieldBorder), and redraws the attribute bar (UpdateAttributeBar) before falling through to RenderHUD_Draw. Scores (PrintPlayerScore) and lives (DrawLivesDisplay) are then rendered for each player in turn by swapping state with Swap_Player_State; the "WAVE" label and wave number (PrintWaveNumber) are printed last for player 1.
RenderHUD D317 CALL ClearScreenBuffer Call ClearScreenBuffer.
D31A LD A,$07 Call SetBackgroundColour using WHITE.
D31C CALL SetBackgroundColour
D31F CALL DrawPlayfieldBorder Call DrawPlayfieldBorder.
D322 CALL UpdateAttributeBar Call UpdateAttributeBar.
This entry point is used by the routine at Clear_Screen_And_Render_HUD.
Shared entry point, also reached from Clear_Screen_And_Render_HUD via JP (which clears the screen and sets the background but skips the wave animation and attribute bar setup). Renders scores and lives for player 1, then swaps to player 2.
RenderHUD_Draw D325 CALL PrintPlayerScore Call PrintPlayerScore.
D328 CALL DrawLivesDisplay Call DrawLivesDisplay.
Swap to player 2 to render their score, lives and wave number.
D32B CALL Swap_Player_State Call Swap_Player_State.
D32E CALL PrintPlayerScore Call PrintPlayerScore.
D331 CALL DrawLivesDisplay Call DrawLivesDisplay.
D334 CALL PrintWaveNumber Call PrintWaveNumber.
Swap back to player 1; print the "WAVE" label and player 1's wave number, then redraw the attribute bar to complete the HUD.
D337 CALL Swap_Player_State Call Swap_Player_State.
D33A LD HL,$D0E6 Call PrintMessaging using Messaging_Wave.
D33D CALL PrintMessaging
D340 CALL PrintWaveNumber Call PrintWaveNumber.
D343 CALL UpdateAttributeBar Call UpdateAttributeBar.
D346 RET Return.
Prev: D30C Up: Map Next: D347