Skip to content

Commit

Permalink
Cleanup|Map Renderer: Minor rename refactorings for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Aug 14, 2013
1 parent a7255ed commit 230d63d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions doomsday/client/src/render/rend_main.cpp
Expand Up @@ -2157,15 +2157,15 @@ static void writeLeafPlanes()
}
}

static void markFrontFacingWallSections(HEdge *hedge)
static void markFrontFacingWalls(HEdge *hedge)
{
if(!hedge || !hedge->mapElement()) return;
Line::Side::Segment *seg = hedge->mapElement()->as<Line::Side::Segment>();
// Which way is the line segment facing?
seg->setFrontFacing(viewFacingDot(hedge->origin(), hedge->twin().origin()) >= 0);
}

static void markFrontFacingHEdges()
static void markLeafFrontFacingWalls()
{
BspLeaf *bspLeaf = currentBspLeaf;
DENG_ASSERT(!isNullLeaf(bspLeaf));
Expand All @@ -2174,19 +2174,19 @@ static void markFrontFacingHEdges()
HEdge *hedge = base;
do
{
markFrontFacingWallSections(hedge);
markFrontFacingWalls(hedge);
} while((hedge = &hedge->next()) != base);

foreach(Mesh *mesh, bspLeaf->extraMeshes())
foreach(HEdge *hedge, mesh->hedges())
{
markFrontFacingWallSections(hedge);
markFrontFacingWalls(hedge);
}

foreach(Polyobj *po, bspLeaf->polyobjs())
foreach(HEdge *hedge, po->mesh().hedges())
{
markFrontFacingWallSections(hedge);
markFrontFacingWalls(hedge);
}
}

Expand Down Expand Up @@ -2269,7 +2269,7 @@ static void occludeLeaf(bool frontFacing)
}

/// If not front facing this is no-op.
static void clipFrontFacingWallSections(HEdge *hedge)
static void clipFrontFacingWalls(HEdge *hedge)
{
if(!hedge || !hedge->mapElement())
return;
Expand All @@ -2284,7 +2284,7 @@ static void clipFrontFacingWallSections(HEdge *hedge)
}
}

static void clipFrontFacingSegments()
static void clipLeafFrontFacingWalls()
{
BspLeaf *bspLeaf = currentBspLeaf;
DENG_ASSERT(!isNullLeaf(bspLeaf));
Expand All @@ -2293,19 +2293,19 @@ static void clipFrontFacingSegments()
HEdge *hedge = base;
do
{
clipFrontFacingWallSections(hedge);
clipFrontFacingWalls(hedge);
} while((hedge = &hedge->next()) != base);

foreach(Mesh *mesh, bspLeaf->extraMeshes())
foreach(HEdge *hedge, mesh->hedges())
{
clipFrontFacingWallSections(hedge);
clipFrontFacingWalls(hedge);
}

foreach(Polyobj *po, bspLeaf->polyobjs())
foreach(HEdge *hedge, po->mesh().hedges())
{
clipFrontFacingWallSections(hedge);
clipFrontFacingWalls(hedge);
}
}

Expand All @@ -2320,7 +2320,7 @@ static void drawCurrentLeaf()
// Mark the sector visible for this frame.
leaf->sector()._frameFlags |= SIF_VISIBLE;

markFrontFacingHEdges();
markLeafFrontFacingWalls();
R_InitForBspLeaf(*leaf);
Rend_RadioBspLeafEdges(*leaf);

Expand All @@ -2334,7 +2334,7 @@ static void drawCurrentLeaf()
LO_ClipInBspLeaf(leaf->indexInMap());
occludeLeaf(true /* front facing */);

clipFrontFacingSegments();
clipLeafFrontFacingWalls();

if(leaf->hasPolyobj())
{
Expand Down

0 comments on commit 230d63d

Please sign in to comment.