mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-13 00:24:12 +00:00
Fix a bunch of whitespace.
This commit is contained in:
parent
4ccb4a4667
commit
4e87072d93
1 changed files with 49 additions and 49 deletions
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
59 Temple Place - Suite 330
|
59 Temple Place - Suite 330
|
||||||
Boston, MA 02111-1307, USA
|
Boston, MA 02111-1307, USA
|
||||||
|
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
@ -60,9 +60,9 @@
|
||||||
static int
|
static int
|
||||||
CheckStack (cluster_t *cluster, threaddata_t *thread)
|
CheckStack (cluster_t *cluster, threaddata_t *thread)
|
||||||
{
|
{
|
||||||
pstack_t *portal;
|
pstack_t *portal;
|
||||||
|
|
||||||
for (portal = thread->pstack_head.next; portal; portal = portal->next)
|
for (portal = thread->pstack_head.next; portal; portal = portal->next)
|
||||||
if (portal->cluster == cluster) {
|
if (portal->cluster == cluster) {
|
||||||
printf ("CheckStack: cluster recursion\n");
|
printf ("CheckStack: cluster recursion\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -84,20 +84,20 @@ CheckStack (cluster_t *cluster, threaddata_t *thread)
|
||||||
order goes source, pass, target. If the order goes pass, source, target
|
order goes source, pass, target. If the order goes pass, source, target
|
||||||
then flipclip should be set.
|
then flipclip should be set.
|
||||||
*/
|
*/
|
||||||
static winding_t *
|
static winding_t *
|
||||||
ClipToSeparators (winding_t *source, winding_t *pass, winding_t *target,
|
ClipToSeparators (winding_t *source, winding_t *pass, winding_t *target,
|
||||||
qboolean flipclip)
|
qboolean flipclip)
|
||||||
{
|
{
|
||||||
float d;
|
float d;
|
||||||
int i, j, k, l;
|
int i, j, k, l;
|
||||||
int counts[3];
|
int counts[3];
|
||||||
qboolean fliptest;
|
qboolean fliptest;
|
||||||
plane_t plane;
|
plane_t plane;
|
||||||
vec3_t v1, v2;
|
vec3_t v1, v2;
|
||||||
vec_t length;
|
vec_t length;
|
||||||
|
|
||||||
// check all combinations
|
// check all combinations
|
||||||
for (i = 0; i < source->numpoints; i++) {
|
for (i = 0; i < source->numpoints; i++) {
|
||||||
l = (i + 1) % source->numpoints;
|
l = (i + 1) % source->numpoints;
|
||||||
VectorSubtract (source->points[l], source->points[i], v1);
|
VectorSubtract (source->points[l], source->points[i], v1);
|
||||||
|
|
||||||
|
@ -183,8 +183,8 @@ ClipToSeparators (winding_t *source, winding_t *pass, winding_t *target,
|
||||||
return NULL; // target is not visible
|
return NULL; // target is not visible
|
||||||
break; //XXX is this correct? big speedup
|
break; //XXX is this correct? big speedup
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -196,40 +196,40 @@ ClipToSeparators (winding_t *source, winding_t *pass, winding_t *target,
|
||||||
static void
|
static void
|
||||||
RecursiveClusterFlow (int clusternum, threaddata_t *thread, pstack_t *prevstack)
|
RecursiveClusterFlow (int clusternum, threaddata_t *thread, pstack_t *prevstack)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
set_t *might;
|
set_t *might;
|
||||||
const set_t *test, *vis;
|
const set_t *test, *vis;
|
||||||
qboolean more;
|
qboolean more;
|
||||||
cluster_t *cluster;
|
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++;
|
||||||
|
|
||||||
cluster = &clusters[clusternum];
|
cluster = &clusters[clusternum];
|
||||||
if (CheckStack(cluster, thread))
|
if (CheckStack(cluster, thread))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// mark the cluster as visible
|
// mark the cluster as visible
|
||||||
if (!set_is_member (thread->clustervis, clusternum)) {
|
if (!set_is_member (thread->clustervis, clusternum)) {
|
||||||
set_add (thread->clustervis, clusternum);
|
set_add (thread->clustervis, clusternum);
|
||||||
thread->base->numcansee++;
|
thread->base->numcansee++;
|
||||||
}
|
}
|
||||||
|
|
||||||
prevstack->next = &stack;
|
prevstack->next = &stack;
|
||||||
stack.next = NULL;
|
stack.next = NULL;
|
||||||
stack.cluster = cluster;
|
stack.cluster = cluster;
|
||||||
stack.portal = NULL;
|
stack.portal = NULL;
|
||||||
LOCK;
|
LOCK;
|
||||||
stack.mightsee = set_new_size (portalclusters);
|
stack.mightsee = set_new_size (portalclusters);
|
||||||
UNLOCK;
|
UNLOCK;
|
||||||
might = stack.mightsee;
|
might = stack.mightsee;
|
||||||
vis = thread->clustervis;
|
vis = thread->clustervis;
|
||||||
|
|
||||||
// check all portals for flowing into other clusters
|
// check all portals for flowing into other clusters
|
||||||
for (i = 0; i < cluster->numportals; i++) {
|
for (i = 0; i < cluster->numportals; i++) {
|
||||||
portal = cluster->portals[i];
|
portal = cluster->portals[i];
|
||||||
|
|
||||||
if (!set_is_member (prevstack->mightsee, portal->cluster))
|
if (!set_is_member (prevstack->mightsee, portal->cluster))
|
||||||
|
@ -344,35 +344,35 @@ RecursiveClusterFlow (int clusternum, threaddata_t *thread, pstack_t *prevstack)
|
||||||
|
|
||||||
FreeWinding (source);
|
FreeWinding (source);
|
||||||
FreeWinding (target);
|
FreeWinding (target);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOCK;
|
LOCK;
|
||||||
set_delete (stack.mightsee);
|
set_delete (stack.mightsee);
|
||||||
UNLOCK;
|
UNLOCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PortalFlow (portal_t *portal)
|
PortalFlow (portal_t *portal)
|
||||||
{
|
{
|
||||||
threaddata_t data;
|
threaddata_t data;
|
||||||
|
|
||||||
LOCK;
|
LOCK;
|
||||||
if (portal->status != stat_selected)
|
if (portal->status != stat_selected)
|
||||||
Sys_Error ("PortalFlow: reflowed");
|
Sys_Error ("PortalFlow: reflowed");
|
||||||
portal->status = stat_working;
|
portal->status = stat_working;
|
||||||
portal->visbits = set_new_size (portalclusters);
|
portal->visbits = set_new_size (portalclusters);
|
||||||
UNLOCK;
|
UNLOCK;
|
||||||
|
|
||||||
memset (&data, 0, sizeof (data));
|
memset (&data, 0, sizeof (data));
|
||||||
data.clustervis = portal->visbits;
|
data.clustervis = portal->visbits;
|
||||||
data.base = portal;
|
data.base = portal;
|
||||||
|
|
||||||
data.pstack_head.portal = portal;
|
data.pstack_head.portal = portal;
|
||||||
data.pstack_head.source = portal->winding;
|
data.pstack_head.source = portal->winding;
|
||||||
data.pstack_head.portalplane = portal->plane;
|
data.pstack_head.portalplane = portal->plane;
|
||||||
data.pstack_head.mightsee = portal->mightsee;
|
data.pstack_head.mightsee = portal->mightsee;
|
||||||
|
|
||||||
RecursiveClusterFlow (portal->cluster, &data, &data.pstack_head);
|
RecursiveClusterFlow (portal->cluster, &data, &data.pstack_head);
|
||||||
|
|
||||||
portal->status = stat_done;
|
portal->status = stat_done;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue