Prev: 47000 Up: Map Next: 47066
47016: Show Game Over
Used by the routine at CheckSheriffLost.
Shows the game over screen for the player whose game has ended, which has "GAME OVER" and the number of the player in large letters. It plays the game over tune.
game-over
Show the game over screen.
ShowGameOver 47016 LD E,0 Set the attribute to INK:BLACK, PAPER:BLACK.
47018 CALL SetAttributes Set all the attributes.
47021 CALL ClearScreen Clear the screen.
47024 LD A,(41535) Fetch the number of the current player, which is zero or one.
47027 ADD A,49 Make it the character "1" or "2".
47029 LD (47086),A Put it in the text.
Print "GAME OVER".
47032 LD HL,18470 Point HL at 18470 (in the screen buffer).
47035 LD DE,47066 Point DE at GameOverTexts.
47038 CALL PrintLargeText Print it in large letters.
Print the number of the player.
47041 LD HL,18600 Point HL at 18600 (in the screen buffer).
47044 LD DE,47078 Point DE at GameOverTexts_Player.
47047 CALL PrintLargeText Print it in large letters.
Play the tune.
47050 LD HL,0 Set the length of the wait.
47053 CALL Wait Wait for a while.
47056 XOR A Write 0 to TunePlayedFlag to allow the tune to play.
47057 LD (41538),A
47060 LD DE,45519 Point DE at GameOverTune.
47063 JP PlayMusicOnce Jump to PlayMusicOnce.
Prev: 47000 Up: Map Next: 47066