mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 07:43:01 +01:00
Move RideRatingResetUpdateStates into namespace
This commit is contained in:
@@ -654,7 +654,7 @@ namespace OpenRCT2
|
||||
if (os.GetMode() == OrcaStream::Mode::READING)
|
||||
{
|
||||
// Since we read only one state ensure the rest is reset.
|
||||
RideRatingResetUpdateStates();
|
||||
OpenRCT2::RideRating::ResetUpdateStates();
|
||||
}
|
||||
auto& rideRatingUpdateState = rideRatings[0];
|
||||
ReadWriteRideRatingCalculationData(cs, rideRatingUpdateState);
|
||||
|
||||
@@ -1064,7 +1064,7 @@ namespace OpenRCT2::RCT2
|
||||
{
|
||||
const auto& src = _s6.RideRatingsCalcData;
|
||||
// S6 has only one state, ensure we reset all states before reading the first one.
|
||||
RideRatingResetUpdateStates();
|
||||
OpenRCT2::RideRating::ResetUpdateStates();
|
||||
auto& rideRatingStates = getGameState().rideRatingUpdateStates;
|
||||
auto& dst = rideRatingStates[0];
|
||||
dst = {};
|
||||
|
||||
@@ -160,7 +160,7 @@ static void RideRatingsApplyRequirementStations(RatingTuple& ratings, const Ride
|
||||
static void RideRatingsApplyRequirementSplashdown(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier);
|
||||
static void RideRatingsApplyPenaltyLateralGs(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier);
|
||||
|
||||
void RideRatingResetUpdateStates()
|
||||
void OpenRCT2::RideRating::ResetUpdateStates()
|
||||
{
|
||||
RideRatingUpdateState nullState{};
|
||||
nullState.State = RIDE_RATINGS_STATE_FIND_NEXT_RIDE;
|
||||
|
||||
@@ -64,7 +64,10 @@ struct RideRatingUpdateState
|
||||
static constexpr size_t kRideRatingMaxUpdateStates = 4;
|
||||
using RideRatingUpdateStates = std::array<RideRatingUpdateState, kRideRatingMaxUpdateStates>;
|
||||
|
||||
void RideRatingResetUpdateStates();
|
||||
namespace OpenRCT2::RideRating
|
||||
{
|
||||
void ResetUpdateStates();
|
||||
}
|
||||
|
||||
void RideRatingsUpdateRide(const Ride& ride);
|
||||
void RideRatingsUpdateAll();
|
||||
|
||||
Reference in New Issue
Block a user