1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 05:23:04 +01:00

Rename DowntimeHistorySize to kDowntimeHistorySize

This commit is contained in:
Harry-Hopkinson
2024-05-27 07:55:56 +00:00
parent c489d6288a
commit f4ce81ac6d
6 changed files with 13 additions and 13 deletions

View File

@@ -30,7 +30,7 @@ namespace OpenRCT2::Limits
constexpr uint8_t kMaxCircuitsPerRide = 20;
constexpr uint8_t kMaxAwards = RCT12::Limits::kMaxAwards;
constexpr uint8_t kNumColourSchemes = RCT12::Limits::kNumColourSchemes;
constexpr uint8_t DowntimeHistorySize = RCT2::Limits::DowntimeHistorySize;
constexpr uint8_t kDowntimeHistorySize = RCT2::Limits::kDowntimeHistorySize;
constexpr uint16_t MaxPeepSpawns = 256;
constexpr uint16_t MaxParkEntrances = 256;
constexpr uint8_t MaxWaitingTime = RCT12::Limits::MaxWaitingTime;

View File

@@ -17,7 +17,7 @@ namespace RCT2::Limits
constexpr uint8_t MaxBanners = 250;
constexpr uint8_t kMaxTrainsPerRide = 32;
constexpr uint8_t kMaxVehicleColours = 32;
constexpr uint8_t DowntimeHistorySize = 8;
constexpr uint8_t kDowntimeHistorySize = 8;
constexpr uint16_t MaxEntities = 10000;
constexpr uint16_t MaxEntitiesRCTCExtended = 15000; // Used in files marked with “classic flag” 0xF
constexpr uint32_t MaxTileElements = 0x30000;

View File

@@ -249,13 +249,13 @@ namespace RCT2
// making breakdowns more and more likely.
uint8_t UnreliabilityFactor; // 0x198
// Range from [0, 100]
uint8_t Downtime; // 0x199
uint8_t InspectionInterval; // 0x19A
uint8_t LastInspection; // 0x19B
uint8_t DowntimeHistory[Limits::DowntimeHistorySize]; // 0x19C
uint32_t NoPrimaryItemsSold; // 0x1A4
uint32_t NoSecondaryItemsSold; // 0x1A8
uint8_t BreakdownSoundModifier; // 0x1AC
uint8_t Downtime; // 0x199
uint8_t InspectionInterval; // 0x19A
uint8_t LastInspection; // 0x19B
uint8_t DowntimeHistory[Limits::kDowntimeHistorySize]; // 0x19C
uint32_t NoPrimaryItemsSold; // 0x1A4
uint32_t NoSecondaryItemsSold; // 0x1A8
uint8_t BreakdownSoundModifier; // 0x1AC
// Used to oscillate the sound when ride breaks down.
// 0 = no change, 255 = max change
uint8_t NotFixedTimeout; // 0x1AD

View File

@@ -1535,7 +1535,7 @@ namespace RCT2
dst->inspection_interval = src->InspectionInterval;
dst->last_inspection = src->LastInspection;
for (uint8_t i = 0; i < Limits::DowntimeHistorySize; i++)
for (uint8_t i = 0; i < Limits::kDowntimeHistorySize; i++)
{
dst->downtime_history[i] = src->DowntimeHistory[i];
}

View File

@@ -1399,14 +1399,14 @@ static void RideBreakdownUpdate(Ride& ride)
{
int32_t totalDowntime = 0;
for (int32_t i = 0; i < OpenRCT2::Limits::DowntimeHistorySize; i++)
for (int32_t i = 0; i < OpenRCT2::Limits::kDowntimeHistorySize; i++)
{
totalDowntime += ride.downtime_history[i];
}
ride.downtime = std::min(totalDowntime / 2, 100);
for (int32_t i = OpenRCT2::Limits::DowntimeHistorySize - 1; i > 0; i--)
for (int32_t i = OpenRCT2::Limits::kDowntimeHistorySize - 1; i > 0; i--)
{
ride.downtime_history[i] = ride.downtime_history[i - 1];
}

View File

@@ -250,7 +250,7 @@ struct Ride
uint8_t downtime{};
uint8_t inspection_interval{};
uint8_t last_inspection{};
uint8_t downtime_history[OpenRCT2::Limits::DowntimeHistorySize]{};
uint8_t downtime_history[OpenRCT2::Limits::kDowntimeHistorySize]{};
uint32_t no_primary_items_sold{};
uint32_t no_secondary_items_sold{};
uint8_t breakdown_sound_modifier{};