1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 23:34:37 +01:00

Rename PathElement::Edges for clarity

PathElement::Edges actualy stores both 'edges' (in the lower 4 bits) and 'corners' in the upper four. Rename the variable to make this dual usage easier to see.
This commit is contained in:
Richard Fine
2020-09-07 13:21:19 -04:00
parent 4e6935f689
commit 4d3ba7a6f0
2 changed files with 9 additions and 9 deletions

View File

@@ -2219,34 +2219,34 @@ void PathElement::SetAdditionStatus(uint8_t newStatus)
uint8_t PathElement::GetEdges() const
{
return Edges & FOOTPATH_PROPERTIES_EDGES_EDGES_MASK;
return EdgesAndCorners & FOOTPATH_PROPERTIES_EDGES_EDGES_MASK;
}
void PathElement::SetEdges(uint8_t newEdges)
{
Edges &= ~FOOTPATH_PROPERTIES_EDGES_EDGES_MASK;
Edges |= (newEdges & FOOTPATH_PROPERTIES_EDGES_EDGES_MASK);
EdgesAndCorners &= ~FOOTPATH_PROPERTIES_EDGES_EDGES_MASK;
EdgesAndCorners |= (newEdges & FOOTPATH_PROPERTIES_EDGES_EDGES_MASK);
}
uint8_t PathElement::GetCorners() const
{
return Edges >> 4;
return EdgesAndCorners >> 4;
}
void PathElement::SetCorners(uint8_t newCorners)
{
Edges &= ~FOOTPATH_PROPERTIES_EDGES_CORNERS_MASK;
Edges |= (newCorners << 4);
EdgesAndCorners &= ~FOOTPATH_PROPERTIES_EDGES_CORNERS_MASK;
EdgesAndCorners |= (newCorners << 4);
}
uint8_t PathElement::GetEdgesAndCorners() const
{
return Edges;
return EdgesAndCorners;
}
void PathElement::SetEdgesAndCorners(uint8_t newEdgesAndCorners)
{
Edges = newEdgesAndCorners;
EdgesAndCorners = newEdgesAndCorners;
}
bool PathElement::IsLevelCrossing(const CoordsXY& coords) const