Prev: 9F16 Up: Map Next: 9F91
9F6A: Game Complete
Used by the routine at TestPlayerProgress.
Shows the "Game Complete" screen when the player has reached the end of the game (see TestPlayerProgress). The play area is cleared and the room data at Room_Special_Complete is drawn, followed by the six messages at GameComplete_Copy, and then the tune at MusicData_GameComplete is played.
The player is then left with no lives, so that HandlePlayerDeath ends the game for the player (or hands over to the other player in a two player game).
Before After
game-complete-before game-complete-after
Clear down the play area.
GameComplete 9F6A CALL ClearPlayArea_Attributes Clear the attribute buffer of the play area.
9F6D CALL ClearPlayArea Clear the play area.
Display the "Game Complete" screen.
9F70 LD HL,$C386 Point HL at the room data for the "Game Complete" screen at Room_Special_Complete.
9F73 CALL DrawRoom Draw the room.
Display the "Game Complete" messaging.
9F76 LD DE,$9F91 Point DE at the "Game Complete" messages at GameComplete_Copy.
There are six messages. Calling Poem_Loop skips setting up the counter.
9F79 LD B,$06 Set the message counter in B to 06.
9F7B CALL Poem_Loop Print the messages.
Play the tune and then check if the game is being paused.
9F7E LD DE,$BC67 Point DE at the tune at MusicData_GameComplete.
9F81 CALL PlayMusic Play the tune.
9F84 CALL PauseGame Check if the game is paused.
The game is over, so the player has no lives left.
9F87 XOR A Set the number of lives in ActivePlayer_Lives to 00.
9F88 LD ($96BD),A
9F8B CALL DisplayPlayerLives Update the lives display.
9F8E JP HandlePlayerDeath Jump to HandlePlayerDeath to end the game.
Prev: 9F16 Up: Map Next: 9F91