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:
@@ -234,12 +234,6 @@ char *argv[];
|
||||
display_gamewindows();
|
||||
|
||||
if ((fd = restore_saved_game()) >= 0) {
|
||||
#ifdef WIZARD
|
||||
/* Since wizard is actually flags.debug, restoring might
|
||||
* overwrite it.
|
||||
*/
|
||||
boolean remember_wiz_mode = wizard;
|
||||
#endif
|
||||
const char *fq_save = fqname(SAVEF, SAVEPREFIX, 1);
|
||||
|
||||
(void) chmod(fq_save,0); /* disallow parallel restores */
|
||||
@@ -254,9 +248,6 @@ char *argv[];
|
||||
mark_synch(); /* flush output */
|
||||
if (dorecover(fd)) {
|
||||
resuming = TRUE; /* not starting new game */
|
||||
#ifdef WIZARD
|
||||
if (!wizard && remember_wiz_mode) wizard = TRUE;
|
||||
#endif
|
||||
wd_message();
|
||||
if (discover || wizard) {
|
||||
if(yn("Do you want to keep the save file?") == 'n')
|
||||
|
||||
Reference in New Issue
Block a user