mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Move .historicalProfit into ParkData struct
This commit is contained in:
@@ -42,8 +42,6 @@ namespace OpenRCT2
|
||||
uint32_t currentTicks{};
|
||||
Date date;
|
||||
|
||||
// The total profit for the entire scenario that precedes the current financial table.
|
||||
money64 historicalProfit;
|
||||
money64 constructionRightsPrice;
|
||||
money64 currentExpenditure;
|
||||
money64 currentProfit;
|
||||
|
||||
@@ -231,7 +231,7 @@ void FinanceInit()
|
||||
gameState.bankLoanInterestRate = 10;
|
||||
gameState.park.Value = 0;
|
||||
gameState.park.companyValue = 0;
|
||||
gameState.historicalProfit = 0;
|
||||
gameState.park.historicalProfit = 0;
|
||||
gameState.scenarioCompletedCompanyValue = kMoney64Undefined;
|
||||
gameState.totalAdmissions = 0;
|
||||
gameState.totalIncomeFromAdmissions = 0;
|
||||
@@ -326,7 +326,7 @@ void FinanceShiftExpenditureTable()
|
||||
std::cbegin(gameState.expenditureTable[kExpenditureTableMonthCount - 1]),
|
||||
std::cend(gameState.expenditureTable[kExpenditureTableMonthCount - 1]), money64{});
|
||||
|
||||
gameState.historicalProfit += sum;
|
||||
gameState.park.historicalProfit += sum;
|
||||
}
|
||||
|
||||
// Shift the table
|
||||
|
||||
@@ -942,7 +942,7 @@ namespace OpenRCT2
|
||||
}
|
||||
}
|
||||
}
|
||||
cs.ReadWrite(gameState.historicalProfit);
|
||||
cs.ReadWrite(gameState.park.historicalProfit);
|
||||
|
||||
// Marketing
|
||||
cs.ReadWriteVector(gameState.marketingCampaigns, [&cs](MarketingCampaign& campaign) {
|
||||
|
||||
@@ -520,7 +520,7 @@ namespace OpenRCT2::RCT2
|
||||
gameState.scenarioCompanyValueRecord = _s6.CompletedCompanyValueRecord;
|
||||
// _s6.LoanHash;
|
||||
// Pad013587CA
|
||||
gameState.historicalProfit = ToMoney64(_s6.HistoricalProfit);
|
||||
gameState.park.historicalProfit = ToMoney64(_s6.HistoricalProfit);
|
||||
// Pad013587D4
|
||||
gameState.scenarioCompletedBy = std::string_view(_s6.ScenarioCompletedName, sizeof(_s6.ScenarioCompletedName));
|
||||
gameState.park.cash = ToMoney64(DECRYPT_MONEY(_s6.Cash));
|
||||
|
||||
@@ -108,7 +108,7 @@ void ScenarioReset(GameState_t& gameState)
|
||||
gameState.park.Rating = Park::CalculateParkRating();
|
||||
gameState.park.Value = Park::CalculateParkValue();
|
||||
gameState.park.companyValue = Park::CalculateCompanyValue();
|
||||
gameState.historicalProfit = gameState.initialCash - gameState.bankLoan;
|
||||
gameState.park.historicalProfit = gameState.initialCash - gameState.bankLoan;
|
||||
gameState.park.cash = gameState.initialCash;
|
||||
|
||||
auto& objManager = GetContext()->GetObjectManager();
|
||||
|
||||
@@ -69,6 +69,9 @@ namespace OpenRCT2::Park
|
||||
money64 cash;
|
||||
money64 cashHistory[kFinanceHistorySize];
|
||||
|
||||
// The total profit for the entire scenario that precedes the current financial table.
|
||||
money64 historicalProfit;
|
||||
|
||||
money64 companyValue;
|
||||
};
|
||||
} // namespace OpenRCT2::Park
|
||||
|
||||
Reference in New Issue
Block a user