Prev: 68C4 Up: Map Next: 6C31
6BE0: Game Over
Set up altering the "GAME OVER PLAYER X" message for 1UP.
GameOver_1UP 6BE0 LD A,"1"+$80 A="1" + 80 (escape character).
Print the messaging and pause to show it for a period of time.
GameOver_Write 6BE2 LD ($6C30),A Write ASCII player number to 6C30.
6BE5 CALL CreateWindow Call CreateWindow.
6BE8 LD DE,$6C1E DE=GameOver_Text.
6BEB LD HL,$7038 HL=7038.
6BEE CALL PrintString Call PrintString.
Introduce a pause by counting down from 10000 four times.
6BF1 LD B,$04 B=04 (counter).
This entry point is used by the routine at 64E8.
GameOver_1UP_0 6BF3 LD HL,$0000 HL=00 (large counter).
GameOver_Pause 6BF6 DEC HL Decrease HL by one.
6BF7 LD A,H Loop back to GameOver_Pause until HL is zero.
6BF8 OR L
6BF9 JR NZ,GameOver_Pause
6BFB DJNZ GameOver_Pause Decrease counter by one and loop back to GameOver_Pause until counter is zero.
6BFD RET Return.
Set up altering the "GAME OVER PLAYER X" message for 2UP.
GameOver_2UP 6BFE LD A,"2"+$80 A="2" + 80 (escape character).
6C00 JR GameOver_Write Jump to GameOver_Write.
This controller simply returns on end. This is for when the game continues after the messaging.
GameOver_Controller 6C02 LD A,($5F21) If ActivePlayer is zero, jump to GameOver_1UP.
6C05 AND A
6C06 JR Z,GameOver_1UP
6C08 JR GameOver_2UP Else, jump to GameOver_2UP.
This is a controller with a jump to Game_Restart to return to the game selection screen.
GameOver_ControllerRestart 6C0A CALL CheckHighScore Call CheckHighScore.
6C0D LD A,($5F21) If ActivePlayer is not zero, jump to GameOver_Restart2UP.
6C10 AND A
6C11 JR NZ,GameOver_Restart2UP
6C13 CALL GameOver_1UP Call GameOver_1UP.
GameOver_Restart 6C16 JP Game_Restart Jump to Game_Restart.
GameOver_Restart2UP 6C19 CALL GameOver_2UP Call GameOver_2UP.
6C1C JR GameOver_Restart Jump to GameOver_Restart.
Game Over Messaging
GameOver_Text 6C1E DEFM $47 "GAME OVER PLAYER X" (47 is the attribute).
6C1F DEFM "GAME OVER PLAYER ","1"+$80
Prev: 68C4 Up: Map Next: 6C31