Whitespace, codingstyle, pouncing shalraths.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2004-02-08 02:53:58 +00:00
parent c4402e07bd
commit 527342d80d
4 changed files with 24 additions and 28 deletions

View file

@ -71,8 +71,8 @@ static void
SimpleFlood (portal_t *srcportal, int clusternum) SimpleFlood (portal_t *srcportal, int clusternum)
{ {
int i; int i;
cluster_t *cluster; cluster_t *cluster;
portal_t *portal; portal_t *portal;
if (srcportal->mightsee[clusternum >> 3] & (1 << (clusternum & 7))) if (srcportal->mightsee[clusternum >> 3] & (1 << (clusternum & 7)))
return; return;
@ -94,8 +94,8 @@ BasePortalVis (void)
{ {
int i, j, k; int i, j, k;
float d; float d;
portal_t *tp, *portal; portal_t *tp, *portal;
winding_t *winding; winding_t *winding;
for (i = 0, portal = portals; i < numportals * 2; i++, portal++) { for (i = 0, portal = portals; i < numportals * 2; i++, portal++) {
portal->mightsee = calloc (1, bitbytes); portal->mightsee = calloc (1, bitbytes);

View file

@ -200,13 +200,13 @@ static void
RecursiveClusterFlow (int clusternum, threaddata_t *thread, pstack_t *prevstack) RecursiveClusterFlow (int clusternum, threaddata_t *thread, pstack_t *prevstack)
{ {
int i, j; int i, j;
cluster_t *cluster; long *test, *might, *vis;
long *test, *might, *vis;
qboolean more; qboolean more;
cluster_t *cluster;
pstack_t stack; pstack_t stack;
portal_t *portal; portal_t *portal;
plane_t backplane; plane_t backplane;
winding_t *source, *target; winding_t *source, *target;
c_chains++; c_chains++;
@ -266,8 +266,8 @@ RecursiveClusterFlow (int clusternum, threaddata_t *thread, pstack_t *prevstack)
stack.portal = portal; stack.portal = portal;
stack.next = NULL; stack.next = NULL;
target = ClipWinding(portal->winding, &thread->pstack_head.portalplane, target = ClipWinding (portal->winding,
false); &thread->pstack_head.portalplane, false);
if (!target) if (!target)
continue; continue;

View file

@ -52,8 +52,8 @@ static __attribute__ ((unused)) const char rcsid[] =
# include <pthread.h> # include <pthread.h>
#endif #endif
#include "QF/cmd.h"
#include "QF/bspfile.h" #include "QF/bspfile.h"
#include "QF/cmd.h"
#include "QF/dstring.h" #include "QF/dstring.h"
#include "QF/mathlib.h" #include "QF/mathlib.h"
#include "QF/qtypes.h" #include "QF/qtypes.h"
@ -160,10 +160,9 @@ winding_t *
ClipWinding (winding_t *in, plane_t *split, qboolean keepon) ClipWinding (winding_t *in, plane_t *split, qboolean keepon)
{ {
int maxpts, i, j; int maxpts, i, j;
int sides[MAX_POINTS_ON_WINDING]; int counts[3], sides[MAX_POINTS_ON_WINDING];
int counts[3];
vec_t dists[MAX_POINTS_ON_WINDING];
vec_t dot; vec_t dot;
vec_t dists[MAX_POINTS_ON_WINDING];
vec_t *p1, *p2; vec_t *p1, *p2;
vec3_t mid; vec3_t mid;
winding_t *neww; winding_t *neww;
@ -254,9 +253,8 @@ ClipWinding (winding_t *in, plane_t *split, qboolean keepon)
static portal_t * static portal_t *
GetNextPortal (void) GetNextPortal (void)
{ {
int j; int min, j;
portal_t *p, *tp; portal_t *p, *tp;
int min;
LOCK; LOCK;
@ -307,9 +305,7 @@ LeafThread (void *thread)
static int static int
CompressRow (byte *vis, byte *dest) CompressRow (byte *vis, byte *dest)
{ {
int j; int rep, visrow, j;
int rep;
int visrow;
byte *dest_p; byte *dest_p;
dest_p = dest; dest_p = dest;
@ -357,8 +353,8 @@ ClusterFlowExpand (byte *src, byte *dest)
void void
ClusterFlow (int clusternum) ClusterFlow (int clusternum)
{ {
byte *outbuffer;
byte compressed[MAX_MAP_LEAFS / 8]; byte compressed[MAX_MAP_LEAFS / 8];
byte *outbuffer;
int numvis, i, j; int numvis, i, j;
cluster_t *cluster; cluster_t *cluster;
portal_t *portal; portal_t *portal;
@ -495,8 +491,8 @@ FindPassages (winding_t *source, winding_t *pass)
{ {
double length; double length;
float d; float d;
int counts[3];
int i, j, k, l; int i, j, k, l;
int counts[3];
plane_t plane; plane_t plane;
qboolean fliptest; qboolean fliptest;
sep_t *sep, *list; sep_t *sep, *list;
@ -654,14 +650,14 @@ LoadPortals (char *name)
{ {
const char *line; const char *line;
char *err; char *err;
QFile *f;
int clusternums[2];
int numpoints, i, j, k; int numpoints, i, j, k;
int read_leafs = 0; int read_leafs = 0;
int clusternums[2];
cluster_t *cluster; cluster_t *cluster;
plane_t plane; plane_t plane;
portal_t *portal; portal_t *portal;
winding_t *winding; winding_t *winding;
QFile *f;
if (!strcmp (name, "-")) if (!strcmp (name, "-"))
f = Qdopen (0, "rt"); // create a QFile of stdin f = Qdopen (0, "rt"); // create a QFile of stdin

View file

@ -70,8 +70,8 @@ static __attribute__ ((unused)) const char rcsid[] =
static void static void
SurfaceBBox (dface_t *s, vec3_t mins, vec3_t maxs) SurfaceBBox (dface_t *s, vec3_t mins, vec3_t maxs)
{ {
int vi, e, i, j; int vi, e, i, j;
float *v; float *v;
mins[0] = mins[1] = 999999; mins[0] = mins[1] = 999999;
maxs[0] = maxs[1] = -99999; maxs[0] = maxs[1] = -99999;
@ -97,11 +97,11 @@ void
CalcAmbientSounds (void) CalcAmbientSounds (void)
{ {
byte *vis; byte *vis;
dface_t *surf; int ambient_type, ofs, i, j, k, l;
dleaf_t *leaf, *hit;
float maxd, vol, d; float maxd, vol, d;
float dists[NUM_AMBIENTS]; float dists[NUM_AMBIENTS];
int ambient_type, ofs, i, j, k, l; dface_t *surf;
dleaf_t *leaf, *hit;
vec3_t mins, maxs; vec3_t mins, maxs;
texinfo_t *info; texinfo_t *info;
miptex_t *miptex; miptex_t *miptex;