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