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:
@@ -3331,7 +3331,7 @@ hit(const char *str, /* zap text or missile name */
|
||||
const char *force) /* usually either "." or "!" via exclam() */
|
||||
{
|
||||
boolean verbosely = (mtmp == &g.youmonst
|
||||
|| (flags.verbose
|
||||
|| (Verbose(3, hit)
|
||||
&& (cansee(g.bhitpos.x, g.bhitpos.y)
|
||||
|| canspotmon(mtmp) || engulfing_u(mtmp))));
|
||||
|
||||
@@ -3347,7 +3347,7 @@ miss(const char *str, struct monst *mtmp)
|
||||
{
|
||||
pline("%s %s %s.", The(str), vtense(str, "miss"),
|
||||
((cansee(g.bhitpos.x, g.bhitpos.y) || canspotmon(mtmp))
|
||||
&& flags.verbose) ? mon_nam(mtmp) : "it");
|
||||
&& Verbose(3, miss)) ? mon_nam(mtmp) : "it");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -5640,7 +5640,7 @@ makewish(void)
|
||||
|
||||
promptbuf[0] = '\0';
|
||||
nothing = cg.zeroobj; /* lint suppression; only its address matters */
|
||||
if (flags.verbose)
|
||||
if (Verbose(3, makewish))
|
||||
You("may wish for an object.");
|
||||
retry:
|
||||
Strcpy(promptbuf, "For what do you wish");
|
||||
|
||||
Reference in New Issue
Block a user