Prev: 62702 Up: Map Next: 62762
62716: Game Over
Used by the routine at LoseLife.
Ends the game for the current player. It prints the number of the player and the text GAME OVER, updates the high score and plays a tune. Then it waits for a while or until the 0 key is pressed, clears the playfield and (with two players) swaps the players.
GameOver 62716 CALL PrintPlayer Call PrintPlayer.
62719 LD DE,62926 The text: game over.
62722 CALL PrintText Call PrintText.
62725 CALL UpdateHighScore Call UpdateHighScore.
62728 LD DE,62848 The tune: game over.
62731 CALL PlayMusic Call PlayMusic.
62734 LD B,12 B=12.
GameOver_Wait 62736 CALL Delay Call Delay.
62739 LD A,239 A=239.
62741 OUT (253),A Send A to port 253.
62743 IN A,(254) Read port 254.
62745 AND %00000001 Keep the bits of A that are set in 1.
62747 JR Z,GameOver_Done Jump to GameOver_Done if the zero flag is set.
62749 DJNZ GameOver_Wait Decrease B and jump to GameOver_Wait until none remain.
GameOver_Done 62751 CALL ClearPlayfield Call ClearPlayfield.
62754 LD A,(62178) The two player flag.
62757 AND A Call SwapPlayers if A is not zero.
62758 CALL NZ,SwapPlayers
62761 RET Return.
Prev: 62702 Up: Map Next: 62762