Routines |
Prev: A8B5 | Up: Map | Next: A94B |
|
||||
Set up altering the "" message for 1UP.
|
||||
GameOver_1UP_Messaging | A8E3 | LD A,"1"+$80 | A="1" + 80 (escape character). | |
Print the altered messaging and pause to show it for a period of time.
|
||||
GameOver_Write | A8E5 | LD ($A95D),A | Write ASCII player number to A95D. | |
A8E8 | CALL CreateWindow | Call CreateWindow. | ||
Handle printing "" messaging.
|
||||
A8EB | LD DE,$A94B | DE=String_GameOver. | ||
A8EE | LD HL,$7038 | HL=7038 (screen location). | ||
A8F1 | CALL PrintStringColour | Call PrintStringColour. | ||
A8F4 | LD DE,$B9D2 | DE=B9D2. | ||
A8F7 | CALL $B9BC | Call B9BC. | ||
Set a lower delay period for the following test.
|
||||
A8FA | LD B,$04 | B=04 (delay loop counter). | ||
A8FC | LD A,($6090) | A=6090-1A. | ||
A8FF | SUB $1A | |||
A901 | CP $10 | If the lunar rover was not destroyed, jump straight to GameOverDelay. | ||
A903 | JR C,GameOverDelay | |||
Handle printing "" messaging.
|
||||
A905 | LD DE,$A95E | DE=String_Lunar_Rover. | ||
A908 | LD HL,$3818 | HL=3818 (screen location). | ||
A90B | CALL PrintStringColour | Call PrintStringColour. | ||
Handle printing "" messaging.
|
||||
A90E | LD DE,$A979 | DE=String_Destroyed. | ||
A911 | LD HL,$4858 | HL=4858 (screen location). | ||
A914 | CALL PrintStringColour | Call PrintStringColour. | ||
Handle printing "" messaging.
|
||||
A917 | LD DE,$A985 | DE=String_All_Lost. | ||
A91A | LD HL,$5850 | HL=5850 (screen location). | ||
A91D | CALL PrintStringColour | Call PrintStringColour. | ||
Provide a pause for us to reflect that the game has now ended.
|
||||
A920 | LD B,$08 | B=08 (delay loop counter). | ||
GameOverDelay | A922 | LD HL,$0000 | HL=0000. | |
From HL being set above, note that decrementing 0000 by one gives FFFF.
|
||||
GameOverDelay_Loop | A925 | DEC HL | Decrease HL by one. | |
A926 | LD A,H | Jump back to GameOverDelay_Loop until HL is zero. | ||
A927 | OR L | |||
A928 | JR NZ,GameOverDelay_Loop | |||
A92A | DJNZ GameOverDelay_Loop | Decrease delay loop counter by one and loop back to GameOverDelay_Loop until the counter is zero. | ||
A92C | RET | Return. | ||
Set up altering the "" message for 2UP.
|
||||
GameOver_2UP_Messaging | A92D | LD A,"2"+$80 | A="2" + 80 (escape character). | |
A92F | JR GameOver_Write | Jump to GameOver_Write. | ||
Handles checking if this is a 1UP or 2UP game.
|
||||
GameOver_Check_Player_1UP | A931 | LD A,($5E65) | If Flag_ActivePlayer is zero, jump to GameOver_1UP_Messaging. | |
A934 | AND A | |||
A935 | JR Z,GameOver_1UP_Messaging | |||
A937 | JR GameOver_2UP_Messaging | Jump to GameOver_2UP_Messaging. | ||
Handles checking if this is a 2UP or 1UP game.
|
||||
GameOver_Check_Player_2UP | A939 | LD A,($5E65) | If Flag_ActivePlayer is not zero, jump to GameOver_2UP. | |
A93C | AND A | |||
A93D | JR NZ,GameOver_2UP | |||
A93F | CALL GameOver_1UP_Messaging | Call GameOver_1UP_Messaging. | ||
A942 | JP NewHighScore | Jump to NewHighScore. | ||
Handle 2UP, and then check if this is a new high score.
|
||||
GameOver_2UP | A945 | CALL GameOver_2UP_Messaging | Call GameOver_2UP_Messaging. | |
A948 | JP NewHighScore | Jump to NewHighScore. | ||
Prev: A8B5 | Up: Map | Next: A94B |