mirror of https://github.com/OpenRCT2/OpenRCT2.git
More money64 fixes
This commit is contained in:
parent
8063e965b8
commit
e0c35e3c5c
|
@ -633,7 +633,7 @@ struct rct1_s4
|
|||
money32 weekly_profit_history[RCT12_FINANCE_GRAPH_SIZE];
|
||||
money32 park_value;
|
||||
money32 park_value_history[RCT12_FINANCE_GRAPH_SIZE];
|
||||
uint32_t completed_company_value;
|
||||
money32 completed_company_value;
|
||||
uint32_t num_admissions;
|
||||
money32 admission_total_income;
|
||||
money32 company_value;
|
||||
|
|
|
@ -1360,20 +1360,20 @@ private:
|
|||
gLandPrice = _s4.land_price;
|
||||
gConstructionRightsPrice = _s4.construction_rights_price;
|
||||
|
||||
gCash = _s4.cash;
|
||||
gBankLoan = _s4.loan;
|
||||
gMaxBankLoan = _s4.max_loan;
|
||||
gCash = ToMoney64(_s4.cash);
|
||||
gBankLoan = ToMoney64(_s4.loan);
|
||||
gMaxBankLoan = ToMoney64(_s4.max_loan);
|
||||
// It's more like 1.33%, but we can only use integers. Can be fixed once we have our own save format.
|
||||
gBankLoanInterestRate = 1;
|
||||
gInitialCash = _s4.cash;
|
||||
gInitialCash = ToMoney64(_s4.cash);
|
||||
|
||||
gCompanyValue = _s4.company_value;
|
||||
gCompanyValue = ToMoney64(_s4.company_value);
|
||||
gParkValue = ToMoney64(CorrectRCT1ParkValue(_s4.park_value));
|
||||
gCurrentProfit = _s4.profit;
|
||||
gCurrentProfit = ToMoney64(_s4.profit);
|
||||
|
||||
for (size_t i = 0; i < RCT12_FINANCE_GRAPH_SIZE; i++)
|
||||
{
|
||||
gCashHistory[i] = _s4.cash_history[i];
|
||||
gCashHistory[i] = ToMoney64(_s4.cash_history[i]);
|
||||
gParkValueHistory[i] = ToMoney64(CorrectRCT1ParkValue(_s4.park_value_history[i]));
|
||||
gWeeklyProfitHistory[i] = ToMoney64(_s4.weekly_profit_history[i]);
|
||||
}
|
||||
|
@ -1382,14 +1382,14 @@ private:
|
|||
{
|
||||
for (size_t j = 0; j < RCT12_EXPENDITURE_TYPE_COUNT; j++)
|
||||
{
|
||||
gExpenditureTable[i][j] = _s4.expenditure[i][j];
|
||||
gExpenditureTable[i][j] = ToMoney64(_s4.expenditure[i][j]);
|
||||
}
|
||||
}
|
||||
gCurrentExpenditure = _s4.total_expenditure;
|
||||
gCurrentExpenditure = ToMoney64(_s4.total_expenditure);
|
||||
|
||||
gScenarioCompletedCompanyValue = _s4.completed_company_value;
|
||||
gScenarioCompletedCompanyValue = ToMoney64(_s4.completed_company_value);
|
||||
gTotalAdmissions = _s4.num_admissions;
|
||||
gTotalIncomeFromAdmissions = _s4.admission_total_income;
|
||||
gTotalIncomeFromAdmissions = ToMoney64(_s4.admission_total_income);
|
||||
|
||||
// TODO marketing campaigns not working
|
||||
static_assert(
|
||||
|
|
|
@ -223,8 +223,8 @@ public:
|
|||
ImportTileElements();
|
||||
ImportEntities();
|
||||
|
||||
gInitialCash = _s6.initial_cash;
|
||||
gBankLoan = _s6.current_loan;
|
||||
gInitialCash = ToMoney64(_s6.initial_cash);
|
||||
gBankLoan = ToMoney64(_s6.current_loan);
|
||||
gParkFlags = _s6.park_flags;
|
||||
gParkEntranceFee = _s6.park_entrance_fee;
|
||||
// rct1_park_entrance_x
|
||||
|
@ -247,7 +247,7 @@ public:
|
|||
{
|
||||
for (size_t j = 0; j < RCT12_EXPENDITURE_TYPE_COUNT; j++)
|
||||
{
|
||||
gExpenditureTable[i][j] = _s6.expenditure_table[i][j];
|
||||
gExpenditureTable[i][j] = ToMoney64(_s6.expenditure_table[i][j]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -290,7 +290,7 @@ public:
|
|||
gParkSize = _s6.park_size;
|
||||
_guestGenerationProbability = _s6.guest_generation_probability;
|
||||
gTotalRideValueForMoney = _s6.total_ride_value_for_money;
|
||||
gMaxBankLoan = _s6.maximum_loan;
|
||||
gMaxBankLoan = ToMoney64(_s6.maximum_loan);
|
||||
gGuestInitialCash = _s6.guest_initial_cash;
|
||||
gGuestInitialHunger = _s6.guest_initial_hunger;
|
||||
gGuestInitialThirst = _s6.guest_initial_thirst;
|
||||
|
@ -306,25 +306,25 @@ public:
|
|||
gScenarioObjective.NumGuests = _s6.objective_guests;
|
||||
ImportMarketingCampaigns();
|
||||
|
||||
gCurrentExpenditure = _s6.current_expenditure;
|
||||
gCurrentProfit = _s6.current_profit;
|
||||
gCurrentExpenditure = ToMoney64(_s6.current_expenditure);
|
||||
gCurrentProfit = ToMoney64(_s6.current_profit);
|
||||
gWeeklyProfitAverageDividend = ToMoney64(_s6.weekly_profit_average_dividend);
|
||||
gWeeklyProfitAverageDivisor = _s6.weekly_profit_average_divisor;
|
||||
// pad_0135833A
|
||||
|
||||
gParkValue = _s6.park_value;
|
||||
gParkValue = ToMoney64(_s6.park_value);
|
||||
|
||||
for (size_t i = 0; i < RCT12_FINANCE_GRAPH_SIZE; i++)
|
||||
{
|
||||
gCashHistory[i] = _s6.balance_history[i];
|
||||
gCashHistory[i] = ToMoney64(_s6.balance_history[i]);
|
||||
gWeeklyProfitHistory[i] = ToMoney64(_s6.weekly_profit_history[i]);
|
||||
gParkValueHistory[i] = ToMoney64(_s6.park_value_history[i]);
|
||||
}
|
||||
|
||||
gScenarioCompletedCompanyValue = _s6.completed_company_value;
|
||||
gScenarioCompletedCompanyValue = ToMoney64(_s6.completed_company_value);
|
||||
gTotalAdmissions = _s6.total_admissions;
|
||||
gTotalIncomeFromAdmissions = _s6.income_from_admissions;
|
||||
gCompanyValue = _s6.company_value;
|
||||
gTotalIncomeFromAdmissions = ToMoney64(_s6.income_from_admissions);
|
||||
gCompanyValue = ToMoney64(_s6.company_value);
|
||||
std::memcpy(gPeepWarningThrottle, _s6.peep_warning_throttle, sizeof(_s6.peep_warning_throttle));
|
||||
|
||||
// Awards
|
||||
|
@ -345,10 +345,10 @@ public:
|
|||
gScenarioCompanyValueRecord = _s6.completed_company_value_record;
|
||||
// _s6.loan_hash;
|
||||
// pad_013587CA
|
||||
gHistoricalProfit = _s6.historical_profit;
|
||||
gHistoricalProfit = ToMoney64(_s6.historical_profit);
|
||||
// pad_013587D4
|
||||
gScenarioCompletedBy = std::string_view(_s6.scenario_completed_name, sizeof(_s6.scenario_completed_name));
|
||||
gCash = DECRYPT_MONEY(_s6.cash);
|
||||
gCash = ToMoney64(DECRYPT_MONEY(_s6.cash));
|
||||
// pad_013587FC
|
||||
gParkRatingCasualtyPenalty = _s6.park_rating_casualty_penalty;
|
||||
gMapSize = _s6.map_size;
|
||||
|
|
Loading…
Reference in New Issue