mirror of https://github.com/OpenRCT2/OpenRCT2.git
Move 'should draw path over supports' to tile element
This commit is contained in:
parent
1f6d4caf7c
commit
ad2698df0d
|
@ -488,7 +488,7 @@ static void sub_6A4101(
|
|||
uint32_t drawnEdges = connectedEdges;
|
||||
// If the path is not drawn over the supports, then no corner sprites will be drawn (making double-width paths
|
||||
// look like connected series of intersections).
|
||||
if (!(railingEntry->flags & RAILING_ENTRY_FLAG_DRAW_PATH_OVER_SUPPORTS))
|
||||
if (!tile_element->AsPath()->ShouldDrawPathOverSupports())
|
||||
{
|
||||
drawnEdges &= FOOTPATH_PROPERTIES_EDGES_EDGES_MASK;
|
||||
}
|
||||
|
@ -1062,7 +1062,7 @@ void path_paint_box_support(
|
|||
height + boundingBoxZOffset);
|
||||
|
||||
// TODO: Revert this when path import works correctly.
|
||||
if (!pathElement->IsQueue() && !(railingEntry->flags & RAILING_ENTRY_FLAG_DRAW_PATH_OVER_SUPPORTS))
|
||||
if (!pathElement->IsQueue() && !pathElement->ShouldDrawPathOverSupports())
|
||||
{
|
||||
// don't draw
|
||||
}
|
||||
|
@ -1217,7 +1217,7 @@ void path_paint_pole_support(
|
|||
boundBoxOffset.y, height + boundingBoxZOffset);
|
||||
|
||||
// TODO: Revert this when path import works correctly.
|
||||
if (pathElement->IsQueue() || (railingEntry->flags & RAILING_ENTRY_FLAG_DRAW_PATH_OVER_SUPPORTS))
|
||||
if (pathElement->IsQueue() || pathElement->ShouldDrawPathOverSupports())
|
||||
{
|
||||
sub_98199C(
|
||||
session, imageId | imageFlags, 0, 0, boundBoxSize.x, boundBoxSize.y, 0, height, boundBoxOffset.x,
|
||||
|
|
|
@ -2135,6 +2135,16 @@ void PathElement::SetQueueBannerDirection(uint8_t direction)
|
|||
type |= (direction << 6);
|
||||
}
|
||||
|
||||
bool PathElement::ShouldDrawPathOverSupports()
|
||||
{
|
||||
return (GetRailingEntry()->flags & RAILING_ENTRY_FLAG_DRAW_PATH_OVER_SUPPORTS);
|
||||
}
|
||||
|
||||
void PathElement::SetShouldDrawPathOverSupports(bool on)
|
||||
{
|
||||
log_verbose("Setting 'draw path over supports' to %d", (size_t)on);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006A8B12
|
||||
|
|
|
@ -228,6 +228,9 @@ public:
|
|||
void SetAdditionStatus(uint8_t newStatus);
|
||||
|
||||
uint8_t GetRCT1PathType() const;
|
||||
|
||||
bool ShouldDrawPathOverSupports();
|
||||
void SetShouldDrawPathOverSupports(bool on);
|
||||
};
|
||||
assert_struct_size(PathElement, 8);
|
||||
|
||||
|
|
Loading…
Reference in New Issue