Prev: ADA1 Up: Map Next: AE2C
AE0D: Game Over
Used by the routine at GameStart.
Prints the game-over message, the score, and asks whether to play again. "N" returns to BASIC; "Y" restarts at GameEntryPoint.
Print "You are dead.".
GameOver AE0D LD HL,$0010 HL=Messaging_YouAreDead.
AE10 CALL PrintCompressedStringAndNewline Call PrintCompressedStringAndNewline to print that compressed string and a newline.
This entry point is used by the routine at GameStart.
Print the percentage of the game the player achieved.
GameOver_Score AE13 CALL Print_Scoring Call Print_Scoring to print the score.
This entry point is used by the routine at GameStart.
Print "Want another game? Y/N".
WantAnotherGameInput AE16 LD HL,$0011 HL=Messaging_WantAnotherGame.
AE19 CALL PrintCompressedStringAndNewline Call PrintCompressedStringAndNewline to print that compressed string and a newline.
WantAnotherGameInput_Loop AE1C CALL GetUserInput Call GetUserInput to read the answer key.
The player is done with the game, so reset back to BASIC.
AE1F CP $4E Jump to 0000 if the keypress is "N".
AE21 JP Z,$0000
The player wants another go.
AE24 CP $59 Jump to GameEntryPoint if the keypress is "Y".
AE26 JP Z,GameEntryPoint
Just loop round for any other input.
AE29 JP WantAnotherGameInput_Loop Jump to WantAnotherGameInput_Loop.
Prev: ADA1 Up: Map Next: AE2C