]> granicus.if.org Git - nethack/commitdiff
gold highlight bit
authorPatR <rankin@nethack.org>
Sat, 8 Dec 2018 00:37:24 +0000 (16:37 -0800)
committerPatR <rankin@nethack.org>
Sat, 8 Dec 2018 00:37:24 +0000 (16:37 -0800)
Keep type/value straight:  'update_all' is boolean, not ordinary int.

src/botl.c

index e0008d2b5bf05873cdfe55cad941fcf2ae6e14c5..2fa84afe0716b83fee28158596daebdc4ea74a92 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 botl.c  $NHDT-Date: 1544171789 2018/12/07 08:36:29 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.128 $ */
+/* NetHack 3.6 botl.c  $NHDT-Date: 1544229439 2018/12/08 00:37:19 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.129 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Michael Allison, 2006. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -733,15 +733,14 @@ boolean *valsetlist;
      *  25   = the gold amount
      *
      * Setting 'chg = 2' is enough to render the field properly, but
-     * not to honor an initial highlight, so force 'update_all = 1'.
+     * not to honor an initial highlight, so force 'update_all = TRUE'.
      */
-    if (fld == BL_GOLD) {
-        if (context.rndencode != oldrndencode
-            || showsyms[COIN_CLASS + SYM_OFF_O] != oldgoldsym) {
-            update_all = 1; /* chg = 2; */
-            oldrndencode = context.rndencode;
-            oldgoldsym = showsyms[COIN_CLASS + SYM_OFF_O];
-        }
+    if (fld == BL_GOLD
+        && (context.rndencode != oldrndencode
+            || showsyms[COIN_CLASS + SYM_OFF_O] != oldgoldsym)) {
+        update_all = TRUE; /* chg = 2; */
+        oldrndencode = context.rndencode;
+        oldgoldsym = showsyms[COIN_CLASS + SYM_OFF_O];
     }
 
     reset = FALSE;