diff --git a/src/openrct2/management/Finance.cpp b/src/openrct2/management/Finance.cpp index 19fd0fca12..0c512f7858 100644 --- a/src/openrct2/management/Finance.cpp +++ b/src/openrct2/management/Finance.cpp @@ -307,26 +307,6 @@ void FinanceUpdateDailyProfit() windowMgr->InvalidateByClass(WindowClass::Finances); } -money64 FinanceGetInitialCash() -{ - return getGameState().scenarioOptions.initialCash; -} - -money64 FinanceGetCurrentLoan() -{ - return getGameState().park.bankLoan; -} - -money64 FinanceGetMaximumLoan() -{ - return getGameState().park.maxBankLoan; -} - -money64 FinanceGetCurrentCash() -{ - return getGameState().park.cash; -} - /** * Shift the expenditure table history one month to the left * If the table is full, accumulate the sum of the oldest month first diff --git a/src/openrct2/management/Finance.h b/src/openrct2/management/Finance.h index 85321238c8..da3b683c56 100644 --- a/src/openrct2/management/Finance.h +++ b/src/openrct2/management/Finance.h @@ -51,9 +51,4 @@ void FinanceUpdateDailyProfit(); void FinanceShiftExpenditureTable(); void FinanceResetCashToInitial(); -money64 FinanceGetInitialCash(); -money64 FinanceGetCurrentLoan(); -money64 FinanceGetMaximumLoan(); -money64 FinanceGetCurrentCash(); - money64 FinanceGetLastMonthShopProfit(); diff --git a/src/openrct2/world/Park.cpp b/src/openrct2/world/Park.cpp index 03e5759276..846b893152 100644 --- a/src/openrct2/world/Park.cpp +++ b/src/openrct2/world/Park.cpp @@ -533,7 +533,7 @@ namespace OpenRCT2::Park auto result = park.value - park.bankLoan; // Clamp addition to prevent overflow - result = AddClamp(result, FinanceGetCurrentCash()); + result = AddClamp(result, park.cash); return result; } @@ -611,7 +611,7 @@ namespace OpenRCT2::Park HistoryPushRecord(park.guestsInParkHistory, park.numGuestsInPark); constexpr auto cashHistorySize = std::extent_v; - HistoryPushRecord(park.cashHistory, FinanceGetCurrentCash() - park.bankLoan); + HistoryPushRecord(park.cashHistory, park.cash - park.bankLoan); // Update weekly profit history auto currentWeeklyProfit = park.weeklyProfitAverageDividend;