Prev: 43559 Up: Map Next: 43713
43626: Game Over
Set up altering the "GAME OVER PLAYER X" message for 1UP.
GameOver_1UP 43626 LD A,"1"+128 A="1" + 128 (escape character).
Print the messaging and pause to show it for a period of time.
GameOver_Write 43628 LD (43731),A Write ASCII player number to 43731(GameOver_Text).
43631 CALL ClearPlayArea_Attributes Call ClearPlayArea_Attributes.
43634 CALL ClearPlayArea Call ClearPlayArea.
43637 LD DE,43732 DE=AdventureCompleted_Text.
43640 LD HL,30752 HL=30752.
43643 CALL PrintStringColour Call PrintStringColour.
43646 LD DE,43713 DE=GameOver_Text.
43649 LD HL,24632 HL=24632.
43652 CALL PrintStringColour Call PrintStringColour.
43655 CALL PrintRoomsVisited Call PrintRoomsVisited.
43658 LD DE,48424 DE=MusicData_GameOver.
43661 CALL PlayAudio Call PlayAudio.
Introduce a pause by counting down from 65536 twice.
43664 LD B,2 B=2 (counter).
43666 LD HL,0 HL=0 (large counter).
43669 JP Pause Call Pause.
Set up altering the "GAME OVER PLAYER X" message for 2UP.
GameOver_2UP 43672 LD A,"2"+128 A="2" + 128 (escape character).
43674 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 43676 LD A,(38558) If Flag_ActivePlayer is zero, jump to GameOver_1UP.
43679 AND A
43680 JR Z,GameOver_1UP
43682 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 43684 LD A,(38558) If Flag_ActivePlayer is not zero, jump to GameOver_Restart2UP.
43687 AND A
43688 JR NZ,GameOver_Restart2UP
43690 CALL GameOver_1UP Call GameOver_1UP.
GameOver_1UP_0 43693 CALL NewHighScore Call NewHighScore.
43696 LD A,(38586) If 38586 is not zero, jump to GameOver_Restart.
43699 AND A
43700 JR Z,GameOver_Restart
43702 CALL HandlerHallOfFame_0 Call HandlerHallOfFame_0.
GameOver_Restart 43705 JP Game_Restart Jump to Game_Restart.
GameOver_Restart2UP 43708 CALL GameOver_2UP Call GameOver_2UP.
43711 JR GameOver_1UP_0 Jump to GameOver_1UP_0.
Prev: 43559 Up: Map Next: 43713