Part of #21421: incorporate feedback from #21760

This commit is contained in:
Claudio Tiecher 2024-04-09 15:13:13 +02:00
parent 8e73eb1d07
commit 2f3af08d08
6 changed files with 11 additions and 7 deletions

View File

@ -52,7 +52,7 @@ namespace OpenRCT2
ClimateState ClimateNext;
uint16_t ClimateUpdateTimer;
money64 Cash;
money64 CashHistory[FINANCE_GRAPH_SIZE];
money64 CashHistory[kFinanceGraphSize];
money64 InitialCash;
money64 GuestInitialCash;
uint8_t GuestInitialHappiness;
@ -68,7 +68,7 @@ namespace OpenRCT2
money64 TotalIncomeFromAdmissions;
money64 TotalRideValueForMoney;
uint16_t WeeklyProfitAverageDivisor;
money64 WeeklyProfitHistory[FINANCE_GRAPH_SIZE];
money64 WeeklyProfitHistory[kFinanceGraphSize];
Objective ScenarioObjective;
uint16_t ScenarioParkRatingWarningDays;
money64 ScenarioCompletedCompanyValue;

View File

@ -186,7 +186,7 @@ void FinancePayRideUpkeep()
void FinanceResetHistory()
{
auto& gameState = GetGameState();
for (uint8_t i = 0; i < FINANCE_GRAPH_SIZE; i++)
for (auto i = 0; i < kFinanceGraphSize; i++)
{
gameState.CashHistory[i] = kMoney64Undefined;
gameState.WeeklyProfitHistory[i] = kMoney64Undefined;

View File

@ -32,7 +32,7 @@ enum class ExpenditureType : int32_t
};
constexpr uint8_t kExpenditureTableMonthCount = 16;
constexpr uint8_t FINANCE_GRAPH_SIZE = 128;
constexpr uint8_t kFinanceGraphSize = 128;
constexpr uint8_t MaxBankLoanInterestRate = 255;

View File

@ -46,9 +46,13 @@ using namespace OpenRCT2;
// It is used for making sure only compatible builds get connected, even within
// single OpenRCT2 version.
<<<<<<< HEAD
constexpr std::string_view kNetworkStreamVersion = "3";
=======
constexpr uint8_t kNetworkStreamVersion = 0;
>>>>>>> e1796213f (Part of #21421: incorporate feedback from #21760)
const std::string kNetworkStreamID = std::string(OPENRCT2_VERSION) + "-" + std::string(kNetworkStreamVersion);
const std::string kNetworkStreamID = std::string(OPENRCT2_VERSION) + "-" + std::to_string(kNetworkStreamVersion);
static Peep* _pickup_peep = nullptr;
static int32_t _pickup_peep_old_x = LOCATION_NULL;

View File

@ -629,7 +629,7 @@ static void ViewportSurfaceDrawTileSideBottom(
neighbourCornerHeight1 = cornerHeight2;
for (uint8_t tunnelIndex = 0; tunnelIndex < kTunnelMaxCount;)
for (auto tunnelIndex = 0; tunnelIndex < kTunnelMaxCount;)
{
if (curHeight >= cornerHeight1 || curHeight >= cornerHeight2)
{

View File

@ -66,7 +66,7 @@ namespace OpenRCT2
std::vector<CoordsXYZD> Entrances;
uint32_t Size;
money64 Value;
money64 ValueHistory[FINANCE_GRAPH_SIZE];
money64 ValueHistory[kFinanceGraphSize];
bool IsOpen() const;
};