Prev: F8A1 Up: Map Next: F8C9
F8A9: Action: Quit
Action_Quit F8A9 CALL Parser_ValidateNoDirectObject Call Parser_ValidateNoDirectObject.
The "QUIT" command can only be called on its own.
F8AC RET C Return if there's any token set in UserInput_Token_2.
Inform the player of their score.
F8AD CALL Print_Scoring Call Print_Scoring.
Print "Want to save the game? Y/N.".
F8B0 LD HL,$A9A1 HL=Messaging_WantToSaveTheGame.
F8B3 CALL PrintStringAndNewline Call PrintStringAndNewline.
WantToSave_Loop F8B6 CALL GetUserInput Call GetUserInput.
The player just wants to quit.
F8B9 CP $4E Jump to QuitGame if the keypress is "N".
F8BB JR Z,QuitGame
F8BD CP $59 Jump back to WantToSave_Loop if the keypress is anything other than "Y".
F8BF JR NZ,WantToSave_Loop
The player does want to save before quitting...
F8C1 CALL SaveGame Call SaveGame.
Jump to asking if the player "wants another game?"
QuitGame F8C4 LD HL,$E9BB Switch WantAnotherGameInput onto the stack so the next return action is asking if the player would "Want another game? Y/N.".
F8C7 EX (SP),HL
F8C8 RET Return.
Prev: F8A1 Up: Map Next: F8C9