more wizard/explore mode control (trunk only)
Wizard mode or explore mode can be forced on (via -D or -X on the command line, or now via OPTIONS=playmode:debug|explore) when restoring a saved game; explore mode handling was confined to restgamestate(), but wizard mode handling was replicated in every main(). Treat `wizard' the same as `discover'. Also, prevent a new game started when restore fails from using the old game's option settings if partial restore attempt got far enough to load the flags struct. And update bemain.c and macmain.c to catch up with the others modified by the playmode patch.
This commit is contained in:
@@ -429,12 +429,6 @@ char *argv[];
|
||||
#endif
|
||||
|
||||
if ((fd = restore_saved_game()) >= 0) {
|
||||
#ifdef WIZARD
|
||||
/* Since wizard is actually flags.debug, restoring might
|
||||
* overwrite it.
|
||||
*/
|
||||
boolean remember_wiz_mode = wizard;
|
||||
#endif
|
||||
#ifndef NO_SIGNAL
|
||||
(void) signal(SIGINT, (SIG_RET_TYPE) done1);
|
||||
#endif
|
||||
@@ -449,12 +443,8 @@ char *argv[];
|
||||
|
||||
if (dorecover(fd)) {
|
||||
resuming = TRUE; /* not starting new game */
|
||||
#ifdef WIZARD
|
||||
if (!wizard && remember_wiz_mode) wizard = TRUE;
|
||||
#endif
|
||||
if (discover)
|
||||
You("are in non-scoring discovery mode.");
|
||||
|
||||
if (discover || wizard) {
|
||||
if(yn("Do you want to keep the save file?") == 'n')
|
||||
(void) delete_savefile();
|
||||
|
||||
Reference in New Issue
Block a user