Prev: 46802 Up: Map Next: 46871
46845: Game Over
Used by the routine at LoseGame.
Ends the game. The game over message is shown and then the high score table is updated. If the player has earned a place in the table the hall of fame is shown, and then the game restarts from the title screen.
Show the game over message.
GameOver 46845 CALL ShowGameOver Show the game over message using ShowGameOver.
46848 CALL DrawBorder Draw the border around the screen using DrawBorder.
46851 LD A,71 Use bright white on black as the attribute.
46853 CALL ClearLargeWindowWithAttributes Clear the large window using ClearLargeWindowWithAttributes.
Update the high score table.
46856 CALL NewHighScore Insert the score into the high score table, if it is high enough, using NewHighScore.
46859 LD A,(38451) Fetch the flag that is set if a name was entered in the table.
46862 AND A Test whether it is set.
46863 JR Z,GameOver_Title Jump to GameOver_Title if not.
46865 CALL HandlerHallOfFame Show the hall of fame using HandlerHallOfFame.
Go back to the title screen.
GameOver_Title 46868 JP TitleScreen Jump to TitleScreen to go back to the title screen.
Prev: 46802 Up: Map Next: 46871