![]() |
Routines |
| Prev: 61065 | Up: Map | Next: 61102 |
|
Ask whether to abandon the game and, if so, offer to save it.
|
||||
| Action_Quit | 61073 | CALL Parser_ValidateNoDirectObject | Call Parser_ValidateNoDirectObject. | |
|
The "QUIT" command can only be called on its own.
|
||||
| 61076 | RET C | Return if there's any token set in UserInput_SecondToken. | ||
|
Print "Want to save the game? Y/N.".
|
||||
| 61077 | LD HL,48261 | HL=Messaging_WantToSaveTheGameYN. | ||
| 61080 | CALL PrintStringAndNewline | Call PrintStringAndNewline. | ||
| WantToSave_Loop | 61083 | CALL GetUserInput | Call GetUserInput. | |
|
The player just wants to quit.
|
||||
| 61086 | CP 78 | Jump to QuitGame if the keypress is "N". |
||
| 61088 | JR Z,QuitGame | |||
| 61090 | CP 89 | Jump back to WantToSave_Loop if the keypress is anything other than "Y". |
||
| 61092 | JR NZ,WantToSave_Loop | |||
|
The player does want to save before quitting...
|
||||
| 61094 | CALL SaveGame | Call SaveGame. | ||
|
Jump to asking if the player "wants another game?"
|
||||
| QuitGame | 61097 | LD HL,60201 | Switch WantAnotherGameInput onto the stack so the next return action is asking if the player would "Want another game? Y/N.". | |
| 61100 | EX (SP),HL | |||
| 61101 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 61065 | Up: Map | Next: 61102 |