From: PatR Date: Wed, 6 Apr 2022 18:18:51 +0000 (-0700) Subject: X11 build fix X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b7d9bed8c50bb7ddbc999d378328d7902a0afe85;p=nethack X11 build fix The X11 interface wouldn't build if STATUS_HILITES was disabled. Failure was due to post-3.6.x changes. --- diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 91ed1e987..6cd6edb91 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1,4 +1,4 @@ -NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.851 $ $NHDT-Date: 1648428942 2022/03/28 00:55:42 $ +NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.864 $ $NHDT-Date: 1649269126 2022/04/06 18:18:46 $ General Fixes and Modified Features ----------------------------------- @@ -1168,6 +1168,7 @@ Windows: nhl_loadlua() was missing the RDBMODE argument on the [dlb_]fopen(), fseek(), ftell() and fread() Windows: when VIRTUAL_TERMINAL_SEQUENCES was not defined, the preprocessing would fail on consoletty.c +X11: fix build failure if STATUS_HILITES is disabled X11: was still initializing map to 'stone' instead of 'unexplored' after they became separate glyphs X11: for text map without color, add support for black&white ice; draw it in diff --git a/win/X11/winstat.c b/win/X11/winstat.c index ed7669bda..6baf30ff3 100644 --- a/win/X11/winstat.c +++ b/win/X11/winstat.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 winstat.c $NHDT-Date: 1646171629 2022/03/01 21:53:49 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.36 $ */ +/* NetHack 3.7 winstat.c $NHDT-Date: 1649269127 2022/04/06 18:18:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.37 $ */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ @@ -1986,12 +1986,17 @@ check_turn_events(void) { int i; struct X_status_value *sv; + int hilight_time = 1; +#ifdef STATUS_HILITES + if (iflags.hilite_delta) + hilight_time = (int) iflags.hilite_delta; +#endif for (sv = shown_stats, i = 0; i < NUM_STATS; i++, sv++) { if (!sv->set) continue; - if (sv->turn_count++ >= iflags.hilite_delta) { + if (sv->turn_count++ >= hilight_time) { /* unhighlights by toggling a highlighted item back off again, unless forced inverted by a status_hilite rule */ if (!sv->inverted_hilite) {