Prev: 25404 Up: Map Next: 25478
25427: Game Over
Used by the routine at 25368.
GameOver 25427 CALL ActorEraseDestroyed Call ActorEraseDestroyed.
25430 CALL SetNightAttributes Call SetNightAttributes.
Give a 50/50 chance of "Night Driver" mode.
25433 LD A,R A=random number.
25435 AND %00000001 Keep only bit 0.
25437 JR Z,GameOver_Skip If A is zero jump to GameOver_Skip.
Else set "day" time.
25439 CALL SetDayAttributes Call SetDayAttributes.
GameOver_Skip 25442 LD HL,24125 HL=Player_Lives.
25445 DEC (HL) Decrease Player_Lives by one.
25446 JP P,PlayerInit If lives are still a positive number jump to PlayerInit.
Else, trigger the game over events.
25449 LD (HL),0 Write 0 to Player_Lives.
25451 POP HL Restore HL from the stack.
25452 CALL CheckHighScore Call CheckHighScore.
25455 CALL SetDayAttributes Call SetDayAttributes.
25458 CALL CreateWindow Call CreateWindow.
Print the "Game Over" messaging.
25461 LD HL,22648 HL=22648 (screen location).
25464 LD DE,25562 DE=Message_GameOver.
25467 CALL MenuWriteText Call MenuWriteText.
Display the text for a short time.
25470 LD B,4 B=4.
25472 CALL Delay Call Delay.
25475 JP Game_Restart Jump to Game_Restart.
Prev: 25404 Up: Map Next: 25478