]> granicus.if.org Git - nethack/commitdiff
opt out of bgcolor highlighting via bgcolors
authornhmall <nhmall@nethack.org>
Thu, 2 Mar 2023 00:17:47 +0000 (19:17 -0500)
committernhmall <nhmall@nethack.org>
Thu, 2 Mar 2023 00:17:47 +0000 (19:17 -0500)
include/flag.h
include/optlist.h
src/display.c

index 00acc4562aef9280bc00323c224c0074f7bbca2a..b22193566037c612f71243fb2ad46206a790d3d2 100644 (file)
@@ -221,6 +221,7 @@ struct instance_flags {
                             * as output from getdir(): simulated button used
                             * 0 (none) or CLICK_1 (left) or CLICK_2 (right) */
     int getloc_filter;     /* GFILTER_foo */
+    boolean bgcolors;      /* display background colors on a map position */
     boolean getloc_moveskip;
     boolean getloc_travelmode;
     boolean getloc_usemenu;
index ca59e5b2690093482d252a9558107e5a19a7de92..2d124734905c792e1fd9b595fcf46aa54a9426e7 100644 (file)
@@ -172,6 +172,8 @@ static int optfn_##a(int, int, boolean, char *, char *);
     NHOPTC(autounlock, Behavior, 80, opt_out, set_in_game,
                 Yes, Yes, No, Yes, NoAlias,
                 "action to take when encountering locked door or chest")
+    NHOPTB(bgcolors, Behavior, 0, opt_out, set_in_game,
+                On, Yes, No, No, NoAlias, &iflags.bgcolors, Term_Off)
     NHOPTO("bind keys", Advanced, o_bind_keys, BUFSZ, opt_in, set_in_game,
                 No, Yes, No, NoAlias, "edit key binds")
 #if defined(MICRO) && !defined(AMIGA)
index 7537fc57371dccb1a8525e5ee59ab949a3eb57f2..7b91b04e282e7957eba44d9566775d4d282c2961 100644 (file)
@@ -2346,7 +2346,8 @@ get_bkglyph_and_framecolor(coordxy x, coordxy y, int *bkglyph, uint32 *framecolo
         return;
     }
 #endif
-    if (gw.wsettings.map_frame_color != NO_COLOR && mapxy_valid(x, y))
+    if (iflags.bgcolors
+        && gw.wsettings.map_frame_color != NO_COLOR && mapxy_valid(x, y))
         *framecolor = gw.wsettings.map_frame_color;
     else
         *framecolor = NO_COLOR;