vis: tidy up definitions of LogLeaf/LogWinding
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
c0d03cba32
commit
9ea5aaa1db
|
|
@ -147,3 +147,7 @@ extern double starttime, endtime, statetime;
|
|||
|
||||
void SaveVisState(void);
|
||||
qboolean LoadVisState(void);
|
||||
|
||||
/* Print winding/leaf info for debugging */
|
||||
void LogWinding(const winding_t *w);
|
||||
void LogLeaf(const leaf_t *leaf);
|
||||
|
|
|
|||
26
vis/vis.c
26
vis/vis.c
|
|
@ -135,28 +135,34 @@ NewWinding(int points)
|
|||
|
||||
|
||||
void
|
||||
pw(winding_t * w)
|
||||
LogWinding(const winding_t *w)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!verbose)
|
||||
return;
|
||||
|
||||
for (i = 0; i < w->numpoints; i++)
|
||||
logprint("(%5.1f, %5.1f, %5.1f)\n",
|
||||
w->points[i][0], w->points[i][1], w->points[i][2]);
|
||||
}
|
||||
|
||||
void
|
||||
prl(leaf_t * l)
|
||||
LogLeaf(const leaf_t *leaf)
|
||||
{
|
||||
const portal_t *portal;
|
||||
const plane_t *plane;
|
||||
int i;
|
||||
portal_t *p;
|
||||
plane_t pl;
|
||||
|
||||
for (i = 0; i < l->numportals; i++) {
|
||||
p = l->portals[i];
|
||||
pl = p->plane;
|
||||
logprint("portal %4i to leaf %4i : %7.1f : (%4.1f, %4.1f, %4.1f)\n",
|
||||
(int)(p - portals), p->leaf, pl.dist,
|
||||
pl.normal[0], pl.normal[1], pl.normal[2]);
|
||||
if (!verbose)
|
||||
return;
|
||||
|
||||
for (i = 0; i < leaf->numportals; i++) {
|
||||
portal = leaf->portals[i];
|
||||
plane = &portal->plane;
|
||||
logprint("portal %4i to leaf %4i : %7.1f : (%4.2f, %4.2f, %4.2f)\n",
|
||||
(int)(portal - portals), portal->leaf, plane->dist,
|
||||
plane->normal[0], plane->normal[1], plane->normal[2]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue