Platform- and/or Interface-Specific Fixes
-----------------------------------------
+tty: when loading user's run-time configuration, explicitly negating one of
+ {DEC,IBM,MAC}graphics options after enabling another of them switched
+ to regular ASCII and left the earlier option inaccurately set to "on"
unix: remove use of parentheses in nethack man page usage that confused a
man page conversion tool
winCE: disable processing of double-click messages if the first click
-/* SCCS Id: @(#)drawing.c 3.5 1999/12/02 */
+/* SCCS Id: @(#)drawing.c 3.5 2005/09/23 */
/* Copyright (c) NetHack Development Team 1992. */
/* NetHack may be freely redistributed. See license for details. */
switch_graphics(gr_set_flag)
int gr_set_flag;
{
+ /* We're either toggling back to ASCII, in which case it is
+ appropriate to negate all the other alternatives, or we're in
+ the process of toggling one of those other ones on, in which
+ case it will be set accurately below. */
+ iflags.IBMgraphics = FALSE;
+ iflags.DECgraphics = FALSE;
+#ifdef MAC_GRAPHICS_ENV
+ iflags.MACgraphics = FALSE;
+#endif
+
switch (gr_set_flag) {
default:
case ASCII_GRAPHICS:
* set the codepage to 437.
*/
iflags.IBMgraphics = TRUE;
- iflags.DECgraphics = FALSE;
assign_graphics(ibm_graphics, SIZE(ibm_graphics), MAXPCHARS, 0);
#ifdef PC9800
if (ibmgraphics_mode_callback) (*ibmgraphics_mode_callback)();
* Use the VT100 line drawing character set.
*/
iflags.DECgraphics = TRUE;
- iflags.IBMgraphics = FALSE;
assign_graphics(dec_graphics, SIZE(dec_graphics), MAXPCHARS, 0);
if (decgraphics_mode_callback) (*decgraphics_mode_callback)();
break;
#endif /* TERMLIB */
#ifdef MAC_GRAPHICS_ENV
case MAC_GRAPHICS:
+ iflags.MACgraphics = TRUE;
assign_graphics(mac_graphics, SIZE(mac_graphics), MAXPCHARS, 0);
break;
#endif
-/* SCCS Id: @(#)options.c 3.5 2005/05/14 */
+/* SCCS Id: @(#)options.c 3.5 2005/09/23 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
* options list
*/
for (i = 0; boolopt[i].name; i++) {
+ boolean was_set;
+
if (match_optname(opts, boolopt[i].name, 3, FALSE)) {
/* options that don't exist */
if (!boolopt[i].addr) {
return;
}
+ was_set = *(boolopt[i].addr);
*(boolopt[i].addr) = !negated;
/* 0 means boolean opts */
# endif
need_redraw = TRUE;
# ifdef TERMLIB
- if ((boolopt[i].addr) == &iflags.DECgraphics)
- switch_graphics(iflags.DECgraphics ?
+ if ((boolopt[i].addr) == &iflags.DECgraphics) {
+ if (iflags.DECgraphics != was_set)
+ switch_graphics(iflags.DECgraphics ?
DEC_GRAPHICS : ASCII_GRAPHICS);
+ }
# endif
# ifdef ASCIIGRAPH
- if ((boolopt[i].addr) == &iflags.IBMgraphics)
- switch_graphics(iflags.IBMgraphics ?
+ if ((boolopt[i].addr) == &iflags.IBMgraphics) {
+ if (iflags.IBMgraphics != was_set)
+ switch_graphics(!negated ?
IBM_GRAPHICS : ASCII_GRAPHICS);
+ }
# endif
# ifdef MAC_GRAPHICS_ENV
- if ((boolopt[i].addr) == &iflags.MACgraphics)
- switch_graphics(iflags.MACgraphics ?
+ if ((boolopt[i].addr) == &iflags.MACgraphics) {
+ if (iflags.MACgraphics != was_set)
+ switch_graphics(iflags.MACgraphics ?
MAC_GRAPHICS : ASCII_GRAPHICS);
+ }
# endif
# ifdef REINCARNATION
if (!initial && Is_rogue_level(&u.uz))