1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 00:04:43 +01:00

Remove TrackDrawerDescriptor::SupportsTrackGroup()

This commit is contained in:
Gymnasiast
2024-08-11 15:18:41 +02:00
parent 803f683f58
commit a436801d64
4 changed files with 2 additions and 8 deletions

View File

@@ -3411,7 +3411,7 @@ static_assert(std::size(RatingNames) == 6);
const auto& rtd = ride->GetRideTypeDescriptor();
bool hasAlternativeType = rtd.HasFlag(RIDE_TYPE_FLAG_HAS_ALTERNATIVE_TRACK_TYPE);
if (rtd.TrackPaintFunctions.Regular.SupportsTrackGroup(TrackGroup::liftHill)
|| (hasAlternativeType && rtd.InvertedTrackPaintFunctions.SupportsTrackGroup(TrackGroup::liftHill)))
|| (hasAlternativeType && rtd.InvertedTrackPaintFunctions.Regular.SupportsTrackGroup(TrackGroup::liftHill)))
{
widgets[WIDX_LIFT_HILL_SPEED_LABEL].type = WindowWidgetType::Label;
widgets[WIDX_LIFT_HILL_SPEED].type = WindowWidgetType::Spinner;

View File

@@ -1695,7 +1695,7 @@ static Widget _rideConstructionWidgets[] = {
widgets[WIDX_SLOPE_DOWN_STEEP].tooltip = STR_RIDE_CONSTRUCTION_STEEP_SLOPE_DOWN_TIP;
widgets[WIDX_SLOPE_UP_STEEP].image = ImageId(SPR_RIDE_CONSTRUCTION_SLOPE_UP_STEEP);
widgets[WIDX_SLOPE_UP_STEEP].tooltip = STR_RIDE_CONSTRUCTION_STEEP_SLOPE_UP_TIP;
if (trackDrawerDescriptor.SupportsTrackGroup(TrackGroup::reverseFreefall))
if (trackDrawerDescriptor.Regular.SupportsTrackGroup(TrackGroup::reverseFreefall))
{
widgets[WIDX_LEVEL].type = WindowWidgetType::FlatBtn;
widgets[WIDX_SLOPE_UP].type = WindowWidgetType::FlatBtn;

View File

@@ -433,11 +433,6 @@ bool TrackDrawerDescriptor::HasCoveredPieces() const
return Covered.EnabledTrackPieces.count() > 0;
}
bool TrackDrawerDescriptor::SupportsTrackGroup(const TrackGroup trackGroup) const
{
return Regular.SupportsTrackGroup(trackGroup);
}
TrackDrawerDescriptor getTrackDrawerDescriptor(const RideTypeDescriptor& rtd, bool isInverted)
{
return isInverted ? rtd.InvertedTrackPaintFunctions : rtd.TrackPaintFunctions;

View File

@@ -322,7 +322,6 @@ struct TrackDrawerDescriptor
}
bool HasCoveredPieces() const;
bool SupportsTrackGroup(const TrackGroup trackGroup) const;
};
struct RideTypeDescriptor