granular verbose message suppression mechanics

Switch to using a macro invocation Verbos(n, s) in place of the
flags.verbose checks.

Provide the mechanics for individual suppression of any of the
existing messages that were considered verbose.

Mechanics only - this code update does not provide any means of
setting the suppression bits.

iflags.verbose = 0
is still a master suppression of all the verbose messages.

iflags.verbose = 1
turns on the verbose messages only for those whose suppression
bit is 0 (not set).
This commit is contained in:
nhmall
2022-06-09 13:53:20 -04:00
parent fe235b7292
commit be76727265
41 changed files with 312 additions and 137 deletions

View File

@@ -488,7 +488,7 @@ ghost_from_bottle(void)
}
pline("As you open the bottle, an enormous %s emerges!",
Hallucination ? rndmonnam(NULL) : (const char *) "ghost");
if (flags.verbose)
if (Verbose(3, ghost_from_bottle))
You("are frightened to death, and unable to move.");
nomul(-3);
g.multi_reason = "being frightened to death";
@@ -2239,7 +2239,7 @@ dodip(void)
; /* can't dip something into fountain or pool if can't reach */
} else if (IS_FOUNTAIN(here)) {
Snprintf(qbuf, sizeof(qbuf), "%s%s into the fountain?", Dip_,
flags.verbose ? obuf : shortestname);
Verbose(3, dodip1) ? obuf : shortestname);
/* "Dip <the object> into the fountain?" */
if (yn(qbuf) == 'y') {
obj->pickup_prev = 0;
@@ -2251,7 +2251,7 @@ dodip(void)
const char *pooltype = waterbody_name(u.ux, u.uy);
Snprintf(qbuf, sizeof(qbuf), "%s%s into the %s?", Dip_,
flags.verbose ? obuf : shortestname, pooltype);
Verbose(3, dodip2) ? obuf : shortestname, pooltype);
/* "Dip <the object> into the {pool, moat, &c}?" */
if (yn(qbuf) == 'y') {
if (Levitation) {
@@ -2275,7 +2275,7 @@ dodip(void)
/* "What do you want to dip <the object> into? [xyz or ?*] " */
Snprintf(qbuf, sizeof qbuf, "dip %s into",
flags.verbose ? obuf : shortestname);
Verbose(3, dodip3) ? obuf : shortestname);
potion = getobj(qbuf, drink_ok, GETOBJ_NOFLAGS);
if (!potion)
return ECMD_CANCEL;