diff --git a/doomsday/client/include/map/hedge.h b/doomsday/client/include/map/hedge.h index ef1bd711c8..43e530ef27 100644 --- a/doomsday/client/include/map/hedge.h +++ b/doomsday/client/include/map/hedge.h @@ -47,7 +47,7 @@ class SectionEdge de::WallDivs wallDivs; public: - SectionEdge(HEdge &hedge, int section, int right); + SectionEdge(HEdge &hedge, int edge, int section); void prepare(coord_t bottom, coord_t top); @@ -75,8 +75,8 @@ class SectionEdge void addPlaneIntercepts(coord_t bottom, coord_t top); HEdge *_hedge; + int _edge; int _section; - int _right; int _interceptCount; de::WallDivs::Intercept *_firstIntercept; diff --git a/doomsday/client/src/map/hedge.cpp b/doomsday/client/src/map/hedge.cpp index 8dc4e7a87d..1022749a88 100644 --- a/doomsday/client/src/map/hedge.cpp +++ b/doomsday/client/src/map/hedge.cpp @@ -326,10 +326,10 @@ WallDivs::Intercepts const &WallDivs::intercepts() const return _intercepts; } -SectionEdge::SectionEdge(HEdge &hedge, int section, int right) +SectionEdge::SectionEdge(HEdge &hedge, int edge, int section) : _hedge(&hedge), + _edge(edge), _section(section), - _right(right), _interceptCount(0), _firstIntercept(0), _lastIntercept(0) @@ -369,12 +369,12 @@ int SectionEdge::section() const Vector2d const &SectionEdge::origin() const { - return _hedge->vertex(_right).origin(); + return _hedge->vertex(_edge).origin(); } coord_t SectionEdge::offset() const { - return _hedge->lineOffset() + (_right? _hedge->length() : 0); + return _hedge->lineOffset() + (_edge? _hedge->length() : 0); } void SectionEdge::addPlaneIntercepts(coord_t bottom, coord_t top) @@ -389,17 +389,17 @@ void SectionEdge::addPlaneIntercepts(coord_t bottom, coord_t top) return; // Only sections at line side edges can/should be split. - if(!((_hedge == side.leftHEdge() && !_right) || - (_hedge == side.rightHEdge() && _right))) + if(!((_hedge == side.leftHEdge() && _edge == HEdge::From) || + (_hedge == side.rightHEdge() && _edge == HEdge::To))) return; if(bottom >= top) return; // Obviously no division. Sector const *frontSec = side.sectorPtr(); - LineOwner::Direction direction(_right? LineOwner::Previous : LineOwner::Next); + LineOwner::Direction direction(_edge? LineOwner::Previous : LineOwner::Next); // Retrieve the start owner node. - LineOwner *base = R_GetVtxLineOwner(&side.line().vertex(_right), &side.line()); + LineOwner *base = R_GetVtxLineOwner(&side.line().vertex(_edge), &side.line()); LineOwner *own = base; bool stopScan = false; do diff --git a/doomsday/client/src/render/rend_main.cpp b/doomsday/client/src/render/rend_main.cpp index 5562ed83d8..e84b454511 100644 --- a/doomsday/client/src/render/rend_main.cpp +++ b/doomsday/client/src/render/rend_main.cpp @@ -2001,8 +2001,8 @@ static bool writeWallSections2(HEdge &hedge, int sections) if(!(sections & Line::Side::MiddleFlag)) return false; int const section = Line::Side::Middle; - SectionEdge leftEdge(hedge, section, false /* left edge */); - SectionEdge rightEdge(hedge, section, true /* right edge */); + SectionEdge leftEdge(hedge, HEdge::From, section); + SectionEdge rightEdge(hedge, HEdge::To, section); Vector2f materialOrigin; bool opaque = false; @@ -2055,8 +2055,8 @@ static bool writeWallSections2Twosided(HEdge &hedge, int sections) if(sections & Line::Side::MiddleFlag) { int const section = Line::Side::Middle; - SectionEdge leftEdge(hedge, section, false /* left edge */); - SectionEdge rightEdge(hedge, section, true /* right edge */); + SectionEdge leftEdge(hedge, HEdge::From, section); + SectionEdge rightEdge(hedge, HEdge::To, section); Vector2f materialOrigin; if(prepareWallSectionEdges(leftEdge, rightEdge, materialOrigin)) @@ -2101,8 +2101,8 @@ static bool writeWallSections2Twosided(HEdge &hedge, int sections) if(sections & Line::Side::TopFlag) { int const section = Line::Side::Top; - SectionEdge leftEdge(hedge, section, false /* left edge */); - SectionEdge rightEdge(hedge, section, true /* right edge */); + SectionEdge leftEdge(hedge, HEdge::From, section); + SectionEdge rightEdge(hedge, HEdge::To, section); Vector2f materialOrigin; if(prepareWallSectionEdges(leftEdge, rightEdge, materialOrigin)) @@ -2116,8 +2116,8 @@ static bool writeWallSections2Twosided(HEdge &hedge, int sections) if(sections & Line::Side::BottomFlag) { int const section = Line::Side::Bottom; - SectionEdge leftEdge(hedge, section, false /* left edge */); - SectionEdge rightEdge(hedge, section, true /* right edge */); + SectionEdge leftEdge(hedge, HEdge::From, section); + SectionEdge rightEdge(hedge, HEdge::To, section); Vector2f materialOrigin; if(prepareWallSectionEdges(leftEdge, rightEdge, materialOrigin))