]> granicus.if.org Git - nethack/commitdiff
hitpointbar bit for prior commit
authornhmall <nhmall@nethack.org>
Thu, 6 Sep 2018 00:47:16 +0000 (20:47 -0400)
committernhmall <nhmall@nethack.org>
Thu, 6 Sep 2018 00:47:16 +0000 (20:47 -0400)
win/tty/wintty.c

index f41225f4b04545d864a24169d83fe954cef7b6f6..6e02149112d76b9cbebb6da67e6f6d3775877831 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 wintty.c        $NHDT-Date: 1536193253 2018/09/06 00:20:53 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.170 $ */
+/* NetHack 3.6 wintty.c        $NHDT-Date: 1526909614 2018/05/21 13:33:34 $  $NHDT-Branch: NetHack-3.6.2 $:$NHDT-Revision: 1.167 $ */
 /* Copyright (c) David Cohrs, 1991                                */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -4244,15 +4244,17 @@ render_status(VOID_ARGS)
                         }
                     }
                     if (iflags.hilite_delta) {
+                        char *s = bar;
                         tty_putstatusfield(nullfield, "[", x++, y);
                         if (hpbar_percent > 0) {
                             if (hpbar_color != NO_COLOR && coloridx != CLR_MAX)
                                 term_start_color(hpbar_color);
                             term_start_attr(ATR_INVERSE);
                         }
-                        tty_putstatusfield(nullfield,
-                                           (hpbar_percent > 0) ? bar : text, x, y);
-                        x += (int) strlen(bar);
+                        if (hpbar_percent == 0)
+                            s = text;
+                        tty_putstatusfield(nullfield, s, x, y);
+                        x += (int) strlen(s);
                         if (hpbar_percent > 0) {
                             term_end_attr(ATR_INVERSE);
                             if (hpbar_color != NO_COLOR && coloridx != CLR_MAX)