diff --git a/include/hack.h b/include/hack.h index a90e388ca..5a1281bc3 100644 --- a/include/hack.h +++ b/include/hack.h @@ -871,174 +871,6 @@ struct autopickup_exception { struct autopickup_exception *next; }; -#if !defined(NO_VERBOSE_GRANULARITY) -#define VB_ELEMENTS 5 -/* - * Maintenance Notes: - * - if one of the function's involved has a name change, - * and the Verbose() macro use instance is updated to match, - * it will have to be reflected below. If the use instance - * isn't updated to reflect the function name change, - * it will continue to work using the old name if it matches - * one of the entries below. - */ - -enum verbosity_values { - vb0interrupt_multi = 0x00000001, - vb0use_stethoscope = 0x00000002, - vb0Mb_hit = 0x00000004, - vb0adjattrib = 0x00000008, - vb0ballfall = 0x00000010, - vb0use_crystal_ball1 = 0x00000020, - vb0use_crystal_ball2 = 0x00000040, - vb0digactualhole1 = 0x00000080, - vb0digactualhole2 = 0x00000100, - vb0mdig_tunnel1 = 0x00000200, - vb0mdig_tunnel2 = 0x00000400, - vb0boulder_hits_pool1 = 0x00000800, - vb0boulder_hits_pool2 = 0x00001000, - vb0drop1 = 0x00002000, - vb0drop2 = 0x00004000, - vb0drop3 = 0x00008000, - vb0go_to_level1 = 0x00010000, - vb0go_to_level2 = 0x00020000, - vb0go_to_level3 = 0x00040000, - vb0rot_corpse = 0x00080000, - vb0getpos1 = 0x00100000, - vb0getpos2 = 0x00200000, - vb0off_msg = 0x00400000, - vb0on_msg = 0x00800000, - vb0Blindf_on = 0x01000000, - vb0dog_eat = 0x02000000, - vb0dog_invent = 0x04000000, - vb0dokick = 0x08000000, - vb0toss_up = 0x10000000, - vb0consume_tin1 = 0x20000000, - vb0consume_tin2 = 0x40000000, - - vb1doengrave1 = 0x00000001, - vb1doengrave2 = 0x00000002, - vb1doengrave3 = 0x00000004, - vb1explode = 0x00000008, - vb1moverock = 0x00000010, - vb1still_chewing = 0x00000020, - vb1trapmove1 = 0x00000040, - vb1trapmove2 = 0x00000080, - vb1trapmove3 = 0x00000100, - vb1trapmove4 = 0x00000200, - vb1trapmove5 = 0x00000400, - vb1getobj1 = 0x00000800, - vb1getobj2 = 0x00001000, - vb1doprgold = 0x00002000, - vb1doorlock1 = 0x00004000, - vb1doorlock2 = 0x00008000, - vb1monpoly1 = 0x00010000, - vb1monpoly2 = 0x00020000, - vb1mswingsm = 0x00040000, - vb1missmu = 0x00080000, - vb1mswings = 0x00100000, - vb1wildmiss = 0x00200000, - vb1gulpmu = 0x00400000, - vb1explmu = 0x00800000, - vb1meatmetal1 = 0x01000000, - vb1meatmetal2 = 0x02000000, - vb1meatmetal3 = 0x04000000, - vb1meatmetal4 = 0x08000000, - vb1relobj = 0x10000000, - vb1ready_weapon = 0x20000000, - vb1wield_tool = 0x40000000, - - vb2meatobj1 = 0x00000001, - vb2meatobj2 = 0x00000002, - vb2meatobj3 = 0x00000004, - vb2meatobj4 = 0x00000008, - vb2meatcorpse1 = 0x00000010, - vb2meatcorpse2 = 0x00000020, - vb2mpickgold = 0x00000040, - vb2mpickstuff = 0x00000080, - vb2setmangry = 0x00000100, - vb2mb_trapped = 0x00000200, - vb2m_move1 = 0x00000400, - vb2m_move2 = 0x00000800, - vb2m_move3 = 0x00001000, - vb2m_move4 = 0x00002000, - vb2m_move5 = 0x00004000, - vb2thitu1 = 0x00008000, - vb2thitu2 = 0x00010000, - vb2m_throw = 0x00020000, - vb2handler_menustyle = 0x00040000, - vb2handler_autounlock = 0x00080000, - vb2handler_msg_window = 0x00100000, - vb2handler_whatis_coord1 = 0x00200000, - vb2handler_whatis_coord2 = 0x00400000, - vb2dolook = 0x00800000, - vb2describe_decor1 = 0x01000000, - vb2describe_decor2 = 0x02000000, - vb2loot_mon = 0x04000000, - vb2dotip = 0x08000000, - vb2polymon = 0x10000000, - vb2teleds = 0x20000000, - vb2level_tele = 0x40000000, - - vb3ghost_from_bottle = 0x00000001, - vb3dodip1 = 0x00000002, - vb3dodip2 = 0x00000004, - vb3dodip3 = 0x00000008, - vb3intemple = 0x00000010, - vb3doread1 = 0x00000020, - vb3doread2 = 0x00000040, - vb3doread3 = 0x00000080, - vb3doread4 = 0x00000100, - vb3doread5 = 0x00000200, - vb3doread6 = 0x00000400, - vb3doread7 = 0x00000800, - vb3drop_boulder_on_player= 0x00001000, - vb3do_genocide = 0x00002000, - vb3call_kops1 = 0x00004000, - vb3call_kops2 = 0x00008000, - vb3call_kops3 = 0x00010000, - vb3erode_obj1 = 0x00020000, - vb3erode_obj2 = 0x00040000, - vb3erode_obj3 = 0x00080000, - vb3trapeffect_rocktrap = 0x00100000, - vb3climb_pit = 0x00200000, - vb3drown = 0x00400000, - vb3mon_adjust_speed = 0x00800000, - vb3hit = 0x01000000, - vb3miss = 0x02000000, - vb3makewish = 0x04000000, - /* 4 available bits*/ - - vb4do_attack = 0x00000001, - vb4known_hitum = 0x00000002, - vb4hmon_hitmon1 = 0x00000004, - vb4hmon_hitmon2 = 0x00000008, - vb4mhitm_ad_tlpt = 0x00000010, - vb4mhitm_ad_wrap1 = 0x00000020, - vb4mhitm_ad_wrap2 = 0x00000040, - vb4mhitm_ad_dgst = 0x00000080, - vb4damageum = 0x00000100, - vb4missum = 0x00000200, - vb4hmonas1 = 0x00000400, - vb4hmonas2 = 0x00000800, - vb4hmonas3 = 0x00001000, - vb4hmonas4 = 0x00002000, - vb4passive = 0x00004000, - vb4flash_hits_mon = 0x00008000, - /* 11 available bits */ - - vb_elements = VB_ELEMENTS -}; -#undef VB_ELEMENTS -extern long verbosity_suppressions[vb_elements]; /* in decl.c */ - -#define Verbose(n,s) (flags.verbose && ((n) < vb_elements) \ - && !(verbosity_suppressions[(n)] & vb##n##s)) -#else /* NO_VERBOSE_GRANULARITY */ -#define Verbose(n,s) (flags.verbose) -#endif /* !NO_VERBOSE_GRANULARITY */ - - /* at most one of `door' and `box' should be non-null at any given time */ struct xlock_s { struct rm *door; @@ -1573,7 +1405,9 @@ typedef uint32_t mmflags_nht; /* makemon MM_ flags */ #if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_TARGET) #include "nhlua.h" #endif + #include "extern.h" #include "decl.h" + #endif /* HACK_H */ diff --git a/src/dokick.c b/src/dokick.c index 28678b919..8fc658576 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -912,7 +912,7 @@ kick_door(coordxy x, coordxy y, int avrg_attrib) boolean shopdoor = *in_rooms(x, y, SHOPBASE) ? TRUE : FALSE; /* break the door */ if (gm.maploc->doormask & D_TRAPPED) { - if (Verbose(0, dokick)) + if (flags.verbose) You("kick the door."); exercise(A_STR, FALSE); gm.maploc->doormask = D_NODOOR; diff --git a/src/invent.c b/src/invent.c index d0375ee27..74856616b 100644 --- a/src/invent.c +++ b/src/invent.c @@ -2569,10 +2569,19 @@ obj_to_let(struct obj *obj) void prinv(const char *prefix, struct obj *obj, long quan) { + boolean total_of = (quan && (quan < obj->quan)); + char totalbuf[QBUFSZ]; + if (!prefix) prefix = ""; - pline("%s%s%s", prefix, *prefix ? " " : "", - xprname(obj, (char *) 0, obj_to_let(obj), TRUE, 0L, quan)); + + totalbuf[0] = '\0'; + if (total_of) + Snprintf(totalbuf, sizeof totalbuf, + " (%ld in total).", obj->quan); + pline("%s%s%s%s", prefix, *prefix ? " " : "", + xprname(obj, (char *) 0, obj_to_let(obj), !total_of, 0L, quan), + flags.verbose ? totalbuf : ""); } DISABLE_WARNING_FORMAT_NONLITERAL diff --git a/src/options.c b/src/options.c index 2d0a86a48..079a53328 100644 --- a/src/options.c +++ b/src/options.c @@ -448,7 +448,7 @@ parseoptions( boolean tfrom_file) { char *op; - boolean negated, got_match = FALSE; + boolean negated, got_match = FALSE, pfx_match = FALSE; #if 0 boolean has_val = FALSE; #endif @@ -505,7 +505,7 @@ parseoptions( if (allopt[i].pfx) { if (str_start_is(opts, allopt[i].name, TRUE)) { matchidx = i; - got_match = TRUE; + got_match = pfx_match = TRUE; } } #if 0 /* this prevents "boolopt:True" &c */ diff --git a/src/polyself.c b/src/polyself.c index 902fec1b5..8d17f1932 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -974,7 +974,7 @@ polymon(int mntmp) /* the explanation of '#monster' used to be shown sooner, but there are possible fatalities above and it isn't useful unless hero survives */ - if (Verbose(2, polymon)) { + if (flags.verbose) { static const char use_thec[] = "Use the command #%s to %s."; static const char monsterc[] = "monster"; struct permonst *uptr = gy.youmonst.data;