From 527342d80d7626456b653bb9becc95fb574422fa Mon Sep 17 00:00:00 2001 From: Ragnvald Maartmann-Moe IV Date: Sun, 8 Feb 2004 02:53:58 +0000 Subject: [PATCH] Whitespace, codingstyle, pouncing shalraths. --- tools/qfvis/source/base-vis.c | 8 ++++---- tools/qfvis/source/flow.c | 12 ++++++------ tools/qfvis/source/qfvis.c | 22 +++++++++------------- tools/qfvis/source/soundphs.c | 10 +++++----- 4 files changed, 24 insertions(+), 28 deletions(-) diff --git a/tools/qfvis/source/base-vis.c b/tools/qfvis/source/base-vis.c index 38a855cd1..ce423f614 100644 --- a/tools/qfvis/source/base-vis.c +++ b/tools/qfvis/source/base-vis.c @@ -71,8 +71,8 @@ static void SimpleFlood (portal_t *srcportal, int clusternum) { int i; - cluster_t *cluster; - portal_t *portal; + cluster_t *cluster; + portal_t *portal; if (srcportal->mightsee[clusternum >> 3] & (1 << (clusternum & 7))) return; @@ -94,8 +94,8 @@ BasePortalVis (void) { int i, j, k; float d; - portal_t *tp, *portal; - winding_t *winding; + portal_t *tp, *portal; + winding_t *winding; for (i = 0, portal = portals; i < numportals * 2; i++, portal++) { portal->mightsee = calloc (1, bitbytes); diff --git a/tools/qfvis/source/flow.c b/tools/qfvis/source/flow.c index f55f9c429..0afdce503 100644 --- a/tools/qfvis/source/flow.c +++ b/tools/qfvis/source/flow.c @@ -200,13 +200,13 @@ static void RecursiveClusterFlow (int clusternum, threaddata_t *thread, pstack_t *prevstack) { int i, j; - cluster_t *cluster; - long *test, *might, *vis; + long *test, *might, *vis; qboolean more; + cluster_t *cluster; pstack_t stack; - portal_t *portal; + portal_t *portal; plane_t backplane; - winding_t *source, *target; + winding_t *source, *target; c_chains++; @@ -266,8 +266,8 @@ RecursiveClusterFlow (int clusternum, threaddata_t *thread, pstack_t *prevstack) stack.portal = portal; stack.next = NULL; - target = ClipWinding(portal->winding, &thread->pstack_head.portalplane, - false); + target = ClipWinding (portal->winding, + &thread->pstack_head.portalplane, false); if (!target) continue; diff --git a/tools/qfvis/source/qfvis.c b/tools/qfvis/source/qfvis.c index 74d234639..7f999ad44 100644 --- a/tools/qfvis/source/qfvis.c +++ b/tools/qfvis/source/qfvis.c @@ -52,8 +52,8 @@ static __attribute__ ((unused)) const char rcsid[] = # include #endif -#include "QF/cmd.h" #include "QF/bspfile.h" +#include "QF/cmd.h" #include "QF/dstring.h" #include "QF/mathlib.h" #include "QF/qtypes.h" @@ -160,10 +160,9 @@ winding_t * ClipWinding (winding_t *in, plane_t *split, qboolean keepon) { int maxpts, i, j; - int sides[MAX_POINTS_ON_WINDING]; - int counts[3]; - vec_t dists[MAX_POINTS_ON_WINDING]; + int counts[3], sides[MAX_POINTS_ON_WINDING]; vec_t dot; + vec_t dists[MAX_POINTS_ON_WINDING]; vec_t *p1, *p2; vec3_t mid; winding_t *neww; @@ -254,9 +253,8 @@ ClipWinding (winding_t *in, plane_t *split, qboolean keepon) static portal_t * GetNextPortal (void) { - int j; + int min, j; portal_t *p, *tp; - int min; LOCK; @@ -307,9 +305,7 @@ LeafThread (void *thread) static int CompressRow (byte *vis, byte *dest) { - int j; - int rep; - int visrow; + int rep, visrow, j; byte *dest_p; dest_p = dest; @@ -357,8 +353,8 @@ ClusterFlowExpand (byte *src, byte *dest) void ClusterFlow (int clusternum) { - byte *outbuffer; byte compressed[MAX_MAP_LEAFS / 8]; + byte *outbuffer; int numvis, i, j; cluster_t *cluster; portal_t *portal; @@ -495,8 +491,8 @@ FindPassages (winding_t *source, winding_t *pass) { double length; float d; - int counts[3]; int i, j, k, l; + int counts[3]; plane_t plane; qboolean fliptest; sep_t *sep, *list; @@ -654,14 +650,14 @@ LoadPortals (char *name) { const char *line; char *err; - QFile *f; - int clusternums[2]; int numpoints, i, j, k; int read_leafs = 0; + int clusternums[2]; cluster_t *cluster; plane_t plane; portal_t *portal; winding_t *winding; + QFile *f; if (!strcmp (name, "-")) f = Qdopen (0, "rt"); // create a QFile of stdin diff --git a/tools/qfvis/source/soundphs.c b/tools/qfvis/source/soundphs.c index 9ca076af6..85421cdb0 100644 --- a/tools/qfvis/source/soundphs.c +++ b/tools/qfvis/source/soundphs.c @@ -70,8 +70,8 @@ static __attribute__ ((unused)) const char rcsid[] = static void SurfaceBBox (dface_t *s, vec3_t mins, vec3_t maxs) { - int vi, e, i, j; - float *v; + int vi, e, i, j; + float *v; mins[0] = mins[1] = 999999; maxs[0] = maxs[1] = -99999; @@ -97,11 +97,11 @@ void CalcAmbientSounds (void) { byte *vis; - dface_t *surf; - dleaf_t *leaf, *hit; + int ambient_type, ofs, i, j, k, l; float maxd, vol, d; float dists[NUM_AMBIENTS]; - int ambient_type, ofs, i, j, k, l; + dface_t *surf; + dleaf_t *leaf, *hit; vec3_t mins, maxs; texinfo_t *info; miptex_t *miptex;