From 5108c3c976e9432d8e0b47595e59b5094631048e Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 26 Aug 2002 15:05:23 +0000 Subject: [PATCH] more (believable:) whitespace --- tools/qfvis/source/flow.c | 22 +++++++++++++--------- tools/qfvis/source/options.c | 2 +- tools/qfvis/source/qfvis.c | 20 ++++++++++++++------ tools/qfvis/source/soundphs.c | 7 +++++-- 4 files changed, 33 insertions(+), 18 deletions(-) diff --git a/tools/qfvis/source/flow.c b/tools/qfvis/source/flow.c index 401f40168..37098e14a 100644 --- a/tools/qfvis/source/flow.c +++ b/tools/qfvis/source/flow.c @@ -84,14 +84,14 @@ CheckStack (leaf_t *leaf, threaddata_t *thread) Source, pass, and target are an ordering of portals. - Generates seperating planes candidates by taking two points from source and + Generates seperating planes candidates by taking two points from source and one point from pass, and clips target by them. If target is totally clipped away, that portal can not be seen through. Normal clip keeps target on the same side as pass, which is correct if the - order goes source, pass, target. If the order goes pass, source, target then - flipclip should be set. + order goes source, pass, target. If the order goes pass, source, target + then flipclip should be set. */ winding_t * ClipToSeperators (winding_t *source, winding_t *pass, winding_t *target, @@ -279,11 +279,13 @@ RecursiveLeafFlow (int leafnum, threaddata_t *thread, pstack_t *prevstack) stack.portal = p; stack.next = NULL; - target = ClipWinding(p->winding, &thread->pstack_head.portalplane, false); + target = ClipWinding(p->winding, &thread->pstack_head.portalplane, + false); if (!target) continue; - if (!prevstack->pass) { // the second leaf can only be blocked if coplanar + if (!prevstack->pass) { + // the second leaf can only be blocked if coplanar stack.source = prevstack->source; stack.pass = target; @@ -381,8 +383,8 @@ PortalFlow (portal_t *p) } /* - This is a rough first-order aproximation that is used to trivially reject some - of the final calculations. + This is a rough first-order aproximation that is used to trivially reject + some of the final calculations. */ void SimpleFlood (portal_t *srcportal, int leafnum) @@ -429,7 +431,8 @@ BasePortalVis (void) winding = tp->winding; for (k = 0; k < winding->numpoints; k++) { - d = DotProduct (winding->points[k], p->plane.normal) - p->plane.dist; + d = DotProduct (winding->points[k], + p->plane.normal) - p->plane.dist; if (d > ON_EPSILON) break; } @@ -438,7 +441,8 @@ BasePortalVis (void) winding = p->winding; for (k = 0; k < winding->numpoints; k++) { - d = DotProduct (winding->points[k], tp->plane.normal) - tp->plane.dist; + d = DotProduct (winding->points[k], + tp->plane.normal) - tp->plane.dist; if (d < -ON_EPSILON) break; } diff --git a/tools/qfvis/source/options.c b/tools/qfvis/source/options.c index c2eadd22a..de6eab567 100644 --- a/tools/qfvis/source/options.c +++ b/tools/qfvis/source/options.c @@ -5,7 +5,7 @@ Copyright (C) 2002 Colin Thompson -This program is free software; you can redistribute it and/or + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. diff --git a/tools/qfvis/source/qfvis.c b/tools/qfvis/source/qfvis.c index a71747f32..ff37b2bfe 100644 --- a/tools/qfvis/source/qfvis.c +++ b/tools/qfvis/source/qfvis.c @@ -225,8 +225,11 @@ CopyWinding (winding_t *winding) /* ClipWinding - Clips the winding to the plane, returning the new winding on the positive side + Clips the winding to the plane, returning the new winding on the positive + side + Frees the input winding. + If keepon is true, an exactly on-plane winding will be saved, otherwise it will be clipped away. */ @@ -509,7 +512,8 @@ CalcPortalVis (void) if (pthread_attr_setstacksize (&attrib, 0x100000) == -1) fprintf (stderr, "pthread_attr_setstacksize failed"); for (i = 0; i < numthreads; i++) { - if (pthread_create (&work_threads[i], attrib, LeafThread, (pthread_addr_t) i) == -1) + if (pthread_create (&work_threads[i], attrib, LeafThread, + (pthread_addr_t) i) == -1) fprintf (stderr, "pthread_create failed"); } @@ -526,7 +530,8 @@ CalcPortalVis (void) #endif if (options.verbosity >= 0) { - printf ("portalcheck: %i portaltest: %i portalpass: %i\n", c_portalcheck, c_portaltest, c_portalpass); + printf ("portalcheck: %i portaltest: %i portalpass: %i\n", + c_portalcheck, c_portaltest, c_portalpass); printf ("c_vistest: %i c_mighttest: %i\n", c_vistest, c_mighttest); } @@ -779,11 +784,13 @@ LoadPortals (char *name) vismap_end = vismap + MAX_MAP_VISIBILITY; for (i = 0, portal = portals; i < numportals; i++) { - if (fscanf (f, "%i %i %i ", &numpoints, &leafnums[0], &leafnums[1]) != 3) + if (fscanf (f, "%i %i %i ", &numpoints, &leafnums[0], + &leafnums[1]) != 3) fprintf (stderr, "LoadPortals: reading portal %i", i); if (numpoints > MAX_POINTS_ON_WINDING) fprintf (stderr, "LoadPortals: portal %i has too many points", i); - if ((unsigned) leafnums[0] > portalleafs || (unsigned) leafnums[1] > portalleafs) + if ((unsigned) leafnums[0] > portalleafs + || (unsigned) leafnums[1] > portalleafs) fprintf (stderr, "LoadPortals: reading portal %i", i); winding = portal->winding = NewWinding (numpoints); @@ -870,7 +877,8 @@ main (int argc, char **argv) visdatasize = vismap_p - dvisdata; if (options.verbosity >= 0) - printf ("visdatasize:%i compressed from %i\n", visdatasize, originalvismapsize); + printf ("visdatasize:%i compressed from %i\n", visdatasize, + originalvismapsize); CalcAmbientSounds (); diff --git a/tools/qfvis/source/soundphs.c b/tools/qfvis/source/soundphs.c index 53f03f387..51ece505b 100644 --- a/tools/qfvis/source/soundphs.c +++ b/tools/qfvis/source/soundphs.c @@ -59,8 +59,11 @@ static const char rcsid[] = #include "vis.h" /* - Some textures (sky, water, slime, lava) are considered ambient sound emiters. - Find an aproximate distance to the nearest emiter of each class for each leaf. + Some textures (sky, water, slime, lava) are considered ambient sound + emiters. + + Find an aproximate distance to the nearest emiter of each class for each + leaf. */ void