1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Move RideRatingUpdateStates into namespace

This commit is contained in:
Tulio Leao
2025-08-16 07:00:39 -03:00
parent 36f45b0991
commit df68e84549
3 changed files with 5 additions and 6 deletions

View File

@@ -73,7 +73,7 @@ namespace OpenRCT2
// Ride storage for all the rides in the park, rides with RideId::Null are considered free. // Ride storage for all the rides in the park, rides with RideId::Null are considered free.
std::array<Ride, OpenRCT2::Limits::kMaxRidesInPark> rides{}; std::array<Ride, OpenRCT2::Limits::kMaxRidesInPark> rides{};
size_t ridesEndOfUsedRange{}; size_t ridesEndOfUsedRange{};
RideRatingUpdateStates rideRatingUpdateStates; RideRating::UpdateStates rideRatingUpdateStates;
std::vector<TileElement> tileElements; std::vector<TileElement> tileElements;
std::vector<ScenerySelection> restrictedScenery; std::vector<ScenerySelection> restrictedScenery;

View File

@@ -89,7 +89,7 @@ struct ShelteredEights
}; };
// Amount of updates allowed per updating state on the current tick. // Amount of updates allowed per updating state on the current tick.
// The total amount would be MaxRideRatingSubSteps * kRideRatingMaxUpdateStates which // The total amount would be MaxRideRatingSubSteps * OpenRCT2::RideRating::kMaxUpdateStates which
// would be currently 80, this is the worst case of sub-steps and may break out earlier. // would be currently 80, this is the worst case of sub-steps and may break out earlier.
static constexpr size_t MaxRideRatingUpdateSubSteps = 20; static constexpr size_t MaxRideRatingUpdateSubSteps = 20;

View File

@@ -64,17 +64,16 @@ struct RideRatingUpdateState
uint16_t StationFlags; uint16_t StationFlags;
}; };
static constexpr size_t kRideRatingMaxUpdateStates = 4;
using RideRatingUpdateStates = std::array<RideRatingUpdateState, kRideRatingMaxUpdateStates>;
namespace OpenRCT2::RideRating namespace OpenRCT2::RideRating
{ {
static constexpr size_t kMaxUpdateStates = 4;
using UpdateStates = std::array<RideRatingUpdateState, kMaxUpdateStates>;
void ResetUpdateStates(); void ResetUpdateStates();
void UpdateRide(const Ride& ride); void UpdateRide(const Ride& ride);
void UpdateAll(); void UpdateAll();
} // namespace OpenRCT2::RideRating } // namespace OpenRCT2::RideRating
// Special Track Element Adjustment functions for RTDs // Special Track Element Adjustment functions for RTDs
void SpecialTrackElementRatingsAjustment_Default(const Ride& ride, int32_t& excitement, int32_t& intensity, int32_t& nausea); void SpecialTrackElementRatingsAjustment_Default(const Ride& ride, int32_t& excitement, int32_t& intensity, int32_t& nausea);
void SpecialTrackElementRatingsAjustment_GhostTrain(const Ride& ride, int32_t& excitement, int32_t& intensity, int32_t& nausea); void SpecialTrackElementRatingsAjustment_GhostTrain(const Ride& ride, int32_t& excitement, int32_t& intensity, int32_t& nausea);