From: nethack.rankin Date: Mon, 19 Sep 2011 03:08:39 +0000 (+0000) Subject: fix W343-7 - strange topten output on Windows X-Git-Tag: MOVE2GIT~178 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=171721addabc1cae58d966b5ea230cabb0269e15;p=nethack fix W343-7 - strange topten output on Windows Using the two Windows binaries, starting a game with the tty interface (nethack.exe) and saving, then restoring and finishing with the win32 interface (nethackW.exe) would display the topten output as a series of popup windows displaying one line at a time. The win32 binary forces the toptenwin option to 1, but when restoring a saved game that would get overridden by data from the save file and could end up 0. This change keeps the toptenwin option out of save files, like color and other display-oriented features that might not be applicable when restoring on something with different capabilities. Separate binaries for alternate interfaces aren't quite the same situation, but close enough. The toptenwin option can still be toggled interactively with 'O', but the new value will disappear if you save rather than finish. Setting it once via config file or environment variable is the preferred way to go if you want to override the default behavior. Both trunk and branch get iflags.toptenwin added. For the trunk, flags.toptenwin is simply deleted and patchlevel.h's EDITLEVEL is bumped. For the branch, flags.toptenwin is renamed and becomes unused, while EDITLEVEL is left alone. Leaving a dummy field in the old toptenwin slot of struct flags preserves save file compatability with 3.4.3. --- diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 523166685..9161a69d5 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -440,6 +440,9 @@ smartphone: do not translate input when command helper is hidden (fixes smartphone: new keypad layouts smartphone: wizard mode command layout smartphone: option to feed arbitrary text as a command to nethack core +Windows: starting a game with nethack.exe (tty) and saving, then restoring + and finishing with nethackW.exe (win32) would display the high scores + output in a series of popup windows, one for each line of text Windows, probably MSDOS and OS/2: attempting to use very first false rumor for cookie fortune or random engraving could produce garbled text when rumors.tru had CR+LF line ends instead of Unix-style LF lines diff --git a/include/flag.h b/include/flag.h index 29af0ae1a..25e2bac84 100644 --- a/include/flag.h +++ b/include/flag.h @@ -50,7 +50,6 @@ struct flag { boolean standout; /* use standout for --More-- */ boolean time; /* display elapsed 'time' */ boolean tombstone; /* print tombstone */ - boolean toptenwin; /* ending list in window instead of stdout */ boolean verbose; /* max battle info */ int end_top, end_around; /* describe desired score list */ unsigned moonphase; @@ -194,6 +193,7 @@ struct instance_flags { * on some non-move commands */ boolean renameallowed; /* can change hero name during role selection */ boolean renameinprogress; /* we are changing hero name */ + boolean toptenwin; /* ending list in window instead of stdout */ boolean zerocomp; /* write zero-compressed save files */ boolean rlecomp; /* run-length comp of levels when writing savefile */ uchar num_pad_mode; diff --git a/include/patchlevel.h b/include/patchlevel.h index dc3ddb294..609e808be 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -13,7 +13,7 @@ * Incrementing EDITLEVEL can be used to force invalidation of old bones * and save files. */ -#define EDITLEVEL 47 +#define EDITLEVEL 48 #define COPYRIGHT_BANNER_A \ "NetHack, Copyright 1985-2011"