fix W343-7 - strange topten output on Windows
Move the toptenwin option from flags to iflags to keep it out of save files, thus preventing odd behavior from win32 (nethackW.exe) when restoring and finishing games started and saved with tty (nethack.exe). [See cvs log entry for flag.h for more complete explanation.]
This commit is contained in:
@@ -1220,7 +1220,7 @@ die:
|
||||
|
||||
/* "So when I die, the first thing I will see in Heaven is a
|
||||
* score list?" */
|
||||
if (flags.toptenwin) {
|
||||
if (iflags.toptenwin) {
|
||||
topten(how);
|
||||
if (have_windows)
|
||||
exit_nhwindows((char *)0);
|
||||
|
||||
@@ -207,7 +207,7 @@ static struct Bool_Opt
|
||||
{"timed_delay", (boolean *)0, FALSE, SET_IN_GAME},
|
||||
#endif
|
||||
{"tombstone",&flags.tombstone, TRUE, SET_IN_GAME},
|
||||
{"toptenwin",&flags.toptenwin, FALSE, SET_IN_GAME},
|
||||
{"toptenwin",&iflags.toptenwin, FALSE, SET_IN_GAME},
|
||||
{"travel", &flags.travelcmd, TRUE, SET_IN_GAME},
|
||||
#ifdef UNICODE_SUPPORT
|
||||
{"unicode", &iflags.unicodedisp, FALSE, SET_IN_GAME},
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/* NetHack 3.5 topten.c $Date$ $Revision$ */
|
||||
/* SCCS Id: @(#)topten.c 3.5 2007/03/05 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -302,7 +301,7 @@ int how;
|
||||
if (program_state.panicking)
|
||||
return;
|
||||
|
||||
if (flags.toptenwin) {
|
||||
if (iflags.toptenwin) {
|
||||
toptenwin = create_nhwindow(NHW_TEXT);
|
||||
}
|
||||
|
||||
@@ -551,10 +550,11 @@ int how;
|
||||
free_ttlist(tt_head);
|
||||
|
||||
showwin:
|
||||
if (flags.toptenwin && !done_stopprint) display_nhwindow(toptenwin, 1);
|
||||
if (iflags.toptenwin && !done_stopprint)
|
||||
display_nhwindow(toptenwin, 1);
|
||||
destroywin:
|
||||
if (!t0_used) dealloc_ttentry(t0);
|
||||
if (flags.toptenwin) {
|
||||
if (iflags.toptenwin) {
|
||||
destroy_nhwindow(toptenwin);
|
||||
toptenwin=WIN_ERR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user