From: nhmall Date: Thu, 2 Mar 2023 00:17:47 +0000 (-0500) Subject: opt out of bgcolor highlighting via bgcolors X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d801736d09face354273590cbb96fb158190927d;p=nethack opt out of bgcolor highlighting via bgcolors --- diff --git a/include/flag.h b/include/flag.h index 00acc4562..b22193566 100644 --- a/include/flag.h +++ b/include/flag.h @@ -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; diff --git a/include/optlist.h b/include/optlist.h index ca59e5b26..2d1247349 100644 --- a/include/optlist.h +++ b/include/optlist.h @@ -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) diff --git a/src/display.c b/src/display.c index 7537fc573..7b91b04e2 100644 --- a/src/display.c +++ b/src/display.c @@ -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;