vis: create two separate verbosity levels

Add -vv option to hide extra verbose messages behing. Move a couple of
debug messages to the extra verbose level.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
Kevin Shanahan 2012-12-26 10:21:12 +10:30
parent 662a745202
commit af9da631fd
2 changed files with 10 additions and 7 deletions

View File

@ -441,7 +441,7 @@ BasePortalVis(void)
// Quick test - completely at the back?
d = DotProduct(tw->origin, p->plane.normal) - p->plane.dist;
if (d < -tw->radius)
continue;
continue;
for (k = 0; k < tw->numpoints; k++) {
d = DotProduct(tw->points[k], p->plane.normal) - p->plane.dist;
@ -454,7 +454,7 @@ BasePortalVis(void)
// Quick test - completely on front?
d = DotProduct(w->origin, tp->plane.normal) - tp->plane.dist;
if (d > w->radius)
continue;
continue;
for (k = 0; k < w->numpoints; k++) {
d = DotProduct(w->points[k], tp->plane.normal)

View File

@ -41,7 +41,7 @@ int leaflongs;
qboolean fastvis;
qboolean verbose;
static int verbose = 0;
int testlevel = 2;
#if 0
@ -504,7 +504,7 @@ LeafThread(void *unused)
PortalCompleted(p);
if (verbose) {
if (verbose > 1) {
printf("\r");
logprint("portal:%4i mightsee:%4i cansee:%4i\n",
(int)(p - portals), p->nummightsee, p->numcansee);
@ -597,7 +597,7 @@ LeafFlow(int leafnum)
//
// compress the bit string
//
if (verbose)
if (verbose > 1)
logprint("leaf %4i : %4i visible\n", leafnum, numvis);
totalvis += numvis;
@ -1106,7 +1106,10 @@ main(int argc, char **argv)
i++;
} else if (!strcmp(argv[i], "-v")) {
logprint("verbose = true\n");
verbose = true;
verbose = 1;
} else if (!strcmp(argv[i], "-vv")) {
logprint("verbose = extra\n");
verbose = 2;
} else if (argv[i][0] == '-')
Error("Unknown option \"%s\"", argv[i]);
else
@ -1116,7 +1119,7 @@ main(int argc, char **argv)
if (i == argc && credits)
return 0;
else if (i != argc - 1)
Error("usage: vis [-threads #] [-level 0-4] [-fast] [-v] "
Error("usage: vis [-threads #] [-level 0-4] [-fast] [-v|-vv] "
"[-credits] bspfile");
start = I_FloatTime();