mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Rename finance_mark_loan_settings_as_legitimate() to finance_update_loan_hash()
This commit is contained in:
@@ -462,7 +462,7 @@ static int editor_read_s6(const char *path)
|
||||
|
||||
RCT2_GLOBAL(0x013573DC, uint32) = min(RCT2_GLOBAL(0x013573DC, uint32), 100000);
|
||||
finance_reset_cash_to_initial();
|
||||
finance_mark_loan_settings_as_legitimate();
|
||||
finance_update_loan_hash();
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32) = clamp(
|
||||
MONEY(0,00),
|
||||
|
||||
@@ -776,7 +776,7 @@ int game_load_save(const char *path)
|
||||
window_new_ride_init_vars();
|
||||
RCT2_GLOBAL(0x009DEB7C, uint16) = 0;
|
||||
if (RCT2_GLOBAL(0x0013587C4, uint32) == 0) // this check is not in scenario play
|
||||
finance_mark_loan_settings_as_legitimate();
|
||||
finance_update_loan_hash();
|
||||
|
||||
load_palette();
|
||||
gfx_invalidate_screen();
|
||||
|
||||
@@ -188,7 +188,7 @@ void finance_init() {
|
||||
|
||||
RCT2_GLOBAL(0x013587D8, uint16) = 0x3F;
|
||||
|
||||
finance_mark_loan_settings_as_legitimate();
|
||||
finance_update_loan_hash();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -244,7 +244,7 @@ void finance_update_daily_profit()
|
||||
}
|
||||
|
||||
// This subroutine is used to mark loan changes as 'legitimate', to prevent cheat detection from incorrectly interfering
|
||||
void finance_mark_loan_settings_as_legitimate()
|
||||
void finance_update_loan_hash()
|
||||
{
|
||||
sint32 value = 0x70093A;
|
||||
value -= RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, money32);
|
||||
@@ -314,7 +314,7 @@ void game_command_set_current_loan(int* eax, int* ebx, int* ecx, int* edx, int*
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32) = newLoan;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, money32) = money;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONEY_ENCRYPTED, money32) = ENCRYPT_MONEY(money);
|
||||
finance_mark_loan_settings_as_legitimate();
|
||||
finance_update_loan_hash();
|
||||
|
||||
window_invalidate_by_class(WC_FINANCES);
|
||||
RCT2_GLOBAL(0x009A9804, uint16) |= 1;
|
||||
|
||||
@@ -61,7 +61,7 @@ void finance_reset_history();
|
||||
void finance_init();
|
||||
void finance_update_daily_profit();
|
||||
void finance_shift_expenditure_table();
|
||||
void finance_mark_loan_settings_as_legitimate();
|
||||
void finance_update_loan_hash();
|
||||
void finance_reset_cash_to_initial();
|
||||
|
||||
void finance_set_loan(money32 loan);
|
||||
|
||||
@@ -259,7 +259,7 @@ void rct1_fix_landscape()
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, money32)
|
||||
);
|
||||
finance_reset_cash_to_initial();
|
||||
finance_mark_loan_settings_as_legitimate();
|
||||
finance_update_loan_hash();
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32) = clamp(
|
||||
MONEY(0,00),
|
||||
|
||||
@@ -276,7 +276,7 @@ void scenario_begin()
|
||||
RCT2_GLOBAL(0x013587D0, money32) = RCT2_GLOBAL(0x013573DC, money32) - RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONEY_ENCRYPTED, sint32) = ENCRYPT_MONEY(RCT2_GLOBAL(0x013573DC, sint32));
|
||||
|
||||
finance_mark_loan_settings_as_legitimate(); // (loan related)
|
||||
finance_update_loan_hash();
|
||||
|
||||
strcpy((char*)RCT2_ADDRESS_SCENARIO_DETAILS, s6Info->details);
|
||||
strcpy((char*)RCT2_ADDRESS_SCENARIO_NAME, s6Info->name);
|
||||
@@ -315,7 +315,7 @@ void scenario_begin()
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_TOTAL_ADMISSIONS, uint32) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_INCOME_FROM_ADMISSIONS, uint32) = 0;
|
||||
RCT2_GLOBAL(0x013587D8, uint16) = 63;
|
||||
finance_mark_loan_settings_as_legitimate(); // (loan related, called above already)
|
||||
finance_update_loan_hash();
|
||||
park_reset_history();
|
||||
finance_reset_history();
|
||||
award_reset();
|
||||
|
||||
@@ -485,7 +485,7 @@ static void window_editor_scenario_options_financial_mousedown(int widgetIndex,
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, money32) < MONEY(1000000,00)) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, money32) += MONEY(500,00);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONEY_ENCRYPTED, money32) = ENCRYPT_MONEY(RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, money32));
|
||||
finance_mark_loan_settings_as_legitimate();
|
||||
finance_update_loan_hash();
|
||||
} else {
|
||||
window_error_open(3248, STR_NONE);
|
||||
}
|
||||
@@ -495,7 +495,7 @@ static void window_editor_scenario_options_financial_mousedown(int widgetIndex,
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, money32) > MONEY(0,00)) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, money32) -= MONEY(500,00);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONEY_ENCRYPTED, money32) = ENCRYPT_MONEY(RCT2_GLOBAL(RCT2_ADDRESS_INITIAL_CASH, money32));
|
||||
finance_mark_loan_settings_as_legitimate();
|
||||
finance_update_loan_hash();
|
||||
} else {
|
||||
window_error_open(3249, STR_NONE);
|
||||
}
|
||||
@@ -505,7 +505,7 @@ static void window_editor_scenario_options_financial_mousedown(int widgetIndex,
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32) < MONEY(5000000,00)) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32) += MONEY(1000,00);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAXIMUM_LOAN, money32) = max(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32), RCT2_GLOBAL(RCT2_ADDRESS_MAXIMUM_LOAN, money32));
|
||||
finance_mark_loan_settings_as_legitimate();
|
||||
finance_update_loan_hash();
|
||||
} else {
|
||||
window_error_open(3250, STR_NONE);
|
||||
}
|
||||
@@ -515,7 +515,7 @@ static void window_editor_scenario_options_financial_mousedown(int widgetIndex,
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32) > MONEY(0,00)) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32) -= MONEY(1000,00);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAXIMUM_LOAN, money32) = max(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32), RCT2_GLOBAL(RCT2_ADDRESS_MAXIMUM_LOAN, money32));
|
||||
finance_mark_loan_settings_as_legitimate();
|
||||
finance_update_loan_hash();
|
||||
} else {
|
||||
window_error_open(3251, STR_NONE);
|
||||
}
|
||||
@@ -525,7 +525,7 @@ static void window_editor_scenario_options_financial_mousedown(int widgetIndex,
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_MAXIMUM_LOAN, money32) < MONEY(5000000,00)) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAXIMUM_LOAN, money32) += MONEY(1000,00);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32) = min(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32), RCT2_GLOBAL(RCT2_ADDRESS_MAXIMUM_LOAN, money32));
|
||||
finance_mark_loan_settings_as_legitimate();
|
||||
finance_update_loan_hash();
|
||||
} else {
|
||||
window_error_open(3252, STR_NONE);
|
||||
}
|
||||
@@ -535,7 +535,7 @@ static void window_editor_scenario_options_financial_mousedown(int widgetIndex,
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_MAXIMUM_LOAN, money32) > MONEY(0,00)) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_MAXIMUM_LOAN, money32) -= MONEY(1000,00);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32) = min(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32), RCT2_GLOBAL(RCT2_ADDRESS_MAXIMUM_LOAN, money32));
|
||||
finance_mark_loan_settings_as_legitimate();
|
||||
finance_update_loan_hash();
|
||||
} else {
|
||||
window_error_open(3253, STR_NONE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user