Prev: F23E Up: Map Next: F263
F246: Action: Quit
Action_Quit F246 CALL Parser_ValidateNoDirectObject Call Parser_ValidateNoDirectObject.
The "QUIT" command can only be called on its own.
F249 RET C Return if there's any token set in UserInput_Token_2.
Print "Want to save the game? Y/N.".
F24A LD HL,$BEB5 HL=Messaging_WantToSaveTheGame.
F24D CALL PrintStringAndNewline Call PrintStringAndNewline.
WantToSave_Loop F250 CALL GetUserInput Call GetUserInput.
The player just wants to quit.
F253 CP $4E Jump to QuitGame if the keypress is "N".
F255 JR Z,QuitGame
F257 CP $59 Jump back to WantToSave_Loop if the keypress is anything other than "Y".
F259 JR NZ,WantToSave_Loop
The player does want to save before quitting...
F25B CALL SaveGame Call SaveGame.
Jump to asking if the player "wants another game?"
QuitGame F25E LD HL,$EDDD Switch WantAnotherGameInput onto the stack so the next return action is asking if the player would "Want another game? Y/N.".
F261 EX (SP),HL
F262 RET Return.
Prev: F23E Up: Map Next: F263