mirror of https://github.com/OpenRCT2/OpenRCT2.git
add global macro: gParkFlags
This commit is contained in:
parent
ddd0f07127
commit
307cb9e08b
24
src/editor.c
24
src/editor.c
|
@ -79,7 +79,7 @@ void editor_load()
|
|||
window_staff_list_init_vars();
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) = SCREEN_FLAGS_SCENARIO_EDITOR;
|
||||
RCT2_GLOBAL(0x0141F570, uint8) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
|
||||
gParkFlags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
|
||||
window_new_ride_init_vars();
|
||||
RCT2_GLOBAL(0x0141F571, uint8) = 4;
|
||||
viewport_init_all();
|
||||
|
@ -114,11 +114,11 @@ void editor_convert_save_to_scenario_callback(int result)
|
|||
|
||||
rct_s6_info *s6Info = (rct_s6_info*)0x0141F570;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_NO_MONEY_SCENARIO;
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY)
|
||||
gParkFlags |= PARK_FLAGS_NO_MONEY_SCENARIO;
|
||||
else
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_NO_MONEY_SCENARIO;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_NO_MONEY;
|
||||
gParkFlags &= ~PARK_FLAGS_NO_MONEY_SCENARIO;
|
||||
gParkFlags |= PARK_FLAGS_NO_MONEY;
|
||||
|
||||
safe_strcpy(s6Info->name, (const char*)RCT2_ADDRESS_SCENARIO_NAME, 64);
|
||||
safe_strcpy(s6Info->details, (const char*)RCT2_ADDRESS_SCENARIO_DETAILS, 256);
|
||||
|
@ -437,18 +437,18 @@ static void editor_clear_map_for_editing()
|
|||
research_populate_list_random();
|
||||
research_remove_non_separate_vehicle_types();
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_NO_MONEY_SCENARIO;
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY)
|
||||
gParkFlags |= PARK_FLAGS_NO_MONEY_SCENARIO;
|
||||
else
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_NO_MONEY_SCENARIO;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_NO_MONEY;
|
||||
gParkFlags &= ~PARK_FLAGS_NO_MONEY_SCENARIO;
|
||||
gParkFlags |= PARK_FLAGS_NO_MONEY;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_FEE, money16) == 0)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_PARK_FREE_ENTRY;
|
||||
gParkFlags |= PARK_FLAGS_PARK_FREE_ENTRY;
|
||||
else
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_PARK_FREE_ENTRY;
|
||||
gParkFlags &= ~PARK_FLAGS_PARK_FREE_ENTRY;
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_18;
|
||||
gParkFlags &= ~PARK_FLAGS_18;
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_CASH, money16) = clamp(
|
||||
MONEY(10,00),
|
||||
|
|
|
@ -500,37 +500,37 @@ static int cc_get(const utf8 **argv, int argc)
|
|||
console_printf("guest_initial_thirst %d%% (%d)", ((255 - RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_THIRST, uint8)) * 100) / 255, RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_THIRST, uint8));
|
||||
}
|
||||
else if (strcmp(argv[0], "guest_prefer_less_intense_rides") == 0) {
|
||||
console_printf("guest_prefer_less_intense_rides %d", (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PREF_LESS_INTENSE_RIDES) != 0);
|
||||
console_printf("guest_prefer_less_intense_rides %d", (gParkFlags & PARK_FLAGS_PREF_LESS_INTENSE_RIDES) != 0);
|
||||
}
|
||||
else if (strcmp(argv[0], "guest_prefer_more_intense_rides") == 0) {
|
||||
console_printf("guest_prefer_more_intense_rides %d", (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PREF_MORE_INTENSE_RIDES) != 0);
|
||||
console_printf("guest_prefer_more_intense_rides %d", (gParkFlags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES) != 0);
|
||||
}
|
||||
else if (strcmp(argv[0], "forbid_marketing_campagns") == 0) {
|
||||
console_printf("forbid_marketing_campagns %d", (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN) != 0);
|
||||
console_printf("forbid_marketing_campagns %d", (gParkFlags & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN) != 0);
|
||||
}
|
||||
else if (strcmp(argv[0], "forbid_landscape_changes") == 0) {
|
||||
console_printf("forbid_landscape_changes %d", (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES) != 0);
|
||||
console_printf("forbid_landscape_changes %d", (gParkFlags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES) != 0);
|
||||
}
|
||||
else if (strcmp(argv[0], "forbid_tree_removal") == 0) {
|
||||
console_printf("forbid_tree_removal %d", (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_TREE_REMOVAL) != 0);
|
||||
console_printf("forbid_tree_removal %d", (gParkFlags & PARK_FLAGS_FORBID_TREE_REMOVAL) != 0);
|
||||
}
|
||||
else if (strcmp(argv[0], "forbid_high_construction") == 0) {
|
||||
console_printf("forbid_high_construction %d", (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_HIGH_CONSTRUCTION) != 0);
|
||||
console_printf("forbid_high_construction %d", (gParkFlags & PARK_FLAGS_FORBID_HIGH_CONSTRUCTION) != 0);
|
||||
}
|
||||
else if (strcmp(argv[0], "pay_for_rides") == 0) {
|
||||
console_printf("pay_for_rides %d", (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY) != 0);
|
||||
console_printf("pay_for_rides %d", (gParkFlags & PARK_FLAGS_PARK_FREE_ENTRY) != 0);
|
||||
}
|
||||
else if (strcmp(argv[0], "no_money") == 0) {
|
||||
console_printf("no_money %d", (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) != 0);
|
||||
console_printf("no_money %d", (gParkFlags & PARK_FLAGS_NO_MONEY) != 0);
|
||||
}
|
||||
else if (strcmp(argv[0], "difficult_park_rating") == 0) {
|
||||
console_printf("difficult_park_rating %d", (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_DIFFICULT_PARK_RATING) != 0);
|
||||
console_printf("difficult_park_rating %d", (gParkFlags & PARK_FLAGS_DIFFICULT_PARK_RATING) != 0);
|
||||
}
|
||||
else if (strcmp(argv[0], "difficult_guest_generation") == 0) {
|
||||
console_printf("difficult_guest_generation %d", (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) != 0);
|
||||
console_printf("difficult_guest_generation %d", (gParkFlags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) != 0);
|
||||
}
|
||||
else if (strcmp(argv[0], "park_open") == 0) {
|
||||
console_printf("park_open %d", (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_OPEN) != 0);
|
||||
console_printf("park_open %d", (gParkFlags & PARK_FLAGS_PARK_OPEN) != 0);
|
||||
}
|
||||
else if (strcmp(argv[0], "land_rights_cost") == 0) {
|
||||
console_printf("land_rights_cost %d.%d0", RCT2_GLOBAL(RCT2_ADDRESS_LAND_COST, money16) / 10, RCT2_GLOBAL(RCT2_ADDRESS_LAND_COST, money16) % 10);
|
||||
|
@ -629,47 +629,47 @@ static int cc_set(const utf8 **argv, int argc)
|
|||
console_execute_silent("get guest_initial_thirst");
|
||||
}
|
||||
else if (strcmp(argv[0], "guest_prefer_less_intense_rides") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {
|
||||
SET_FLAG(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32), PARK_FLAGS_PREF_LESS_INTENSE_RIDES, int_val[0]);
|
||||
SET_FLAG(gParkFlags, PARK_FLAGS_PREF_LESS_INTENSE_RIDES, int_val[0]);
|
||||
console_execute_silent("get guest_prefer_less_intense_rides");
|
||||
}
|
||||
else if (strcmp(argv[0], "guest_prefer_more_intense_rides") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {
|
||||
SET_FLAG(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32), PARK_FLAGS_PREF_MORE_INTENSE_RIDES, int_val[0]);
|
||||
SET_FLAG(gParkFlags, PARK_FLAGS_PREF_MORE_INTENSE_RIDES, int_val[0]);
|
||||
console_execute_silent("get guest_prefer_more_intense_rides");
|
||||
}
|
||||
else if (strcmp(argv[0], "forbid_marketing_campagns") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {
|
||||
SET_FLAG(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32), PARK_FLAGS_FORBID_MARKETING_CAMPAIGN, int_val[0]);
|
||||
SET_FLAG(gParkFlags, PARK_FLAGS_FORBID_MARKETING_CAMPAIGN, int_val[0]);
|
||||
console_execute_silent("get forbid_marketing_campagns");
|
||||
}
|
||||
else if (strcmp(argv[0], "forbid_landscape_changes") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {
|
||||
SET_FLAG(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32), PARK_FLAGS_FORBID_LANDSCAPE_CHANGES, int_val[0]);
|
||||
SET_FLAG(gParkFlags, PARK_FLAGS_FORBID_LANDSCAPE_CHANGES, int_val[0]);
|
||||
console_execute_silent("get forbid_landscape_changes");
|
||||
}
|
||||
else if (strcmp(argv[0], "forbid_tree_removal") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {
|
||||
SET_FLAG(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32), PARK_FLAGS_FORBID_TREE_REMOVAL, int_val[0]);
|
||||
SET_FLAG(gParkFlags, PARK_FLAGS_FORBID_TREE_REMOVAL, int_val[0]);
|
||||
console_execute_silent("get forbid_tree_removal");
|
||||
}
|
||||
else if (strcmp(argv[0], "forbid_high_construction") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {
|
||||
SET_FLAG(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32), PARK_FLAGS_FORBID_HIGH_CONSTRUCTION, int_val[0]);
|
||||
SET_FLAG(gParkFlags, PARK_FLAGS_FORBID_HIGH_CONSTRUCTION, int_val[0]);
|
||||
console_execute_silent("get forbid_high_construction");
|
||||
}
|
||||
else if (strcmp(argv[0], "pay_for_rides") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {
|
||||
SET_FLAG(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32), PARK_FLAGS_PARK_FREE_ENTRY, int_val[0]);
|
||||
SET_FLAG(gParkFlags, PARK_FLAGS_PARK_FREE_ENTRY, int_val[0]);
|
||||
console_execute_silent("get pay_for_rides");
|
||||
}
|
||||
else if (strcmp(argv[0], "no_money") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {
|
||||
SET_FLAG(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32), PARK_FLAGS_NO_MONEY, int_val[0]);
|
||||
SET_FLAG(gParkFlags, PARK_FLAGS_NO_MONEY, int_val[0]);
|
||||
console_execute_silent("get no_money");
|
||||
}
|
||||
else if (strcmp(argv[0], "difficult_park_rating") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {
|
||||
SET_FLAG(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32), PARK_FLAGS_DIFFICULT_PARK_RATING, int_val[0]);
|
||||
SET_FLAG(gParkFlags, PARK_FLAGS_DIFFICULT_PARK_RATING, int_val[0]);
|
||||
console_execute_silent("get difficult_park_rating");
|
||||
}
|
||||
else if (strcmp(argv[0], "difficult_guest_generation") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {
|
||||
SET_FLAG(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32), PARK_FLAGS_DIFFICULT_GUEST_GENERATION, int_val[0]);
|
||||
SET_FLAG(gParkFlags, PARK_FLAGS_DIFFICULT_GUEST_GENERATION, int_val[0]);
|
||||
console_execute_silent("get difficult_guest_generation");
|
||||
}
|
||||
else if (strcmp(argv[0], "park_open") == 0 && invalidArguments(&invalidArgs, int_valid[0])) {
|
||||
SET_FLAG(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32), PARK_FLAGS_PARK_OPEN, int_val[0]);
|
||||
SET_FLAG(gParkFlags, PARK_FLAGS_PARK_OPEN, int_val[0]);
|
||||
console_execute_silent("get park_open");
|
||||
}
|
||||
else if (strcmp(argv[0], "land_rights_cost") == 0 && invalidArguments(&invalidArgs, double_valid[0])) {
|
||||
|
|
|
@ -395,7 +395,7 @@ static void shortcut_build_new_ride()
|
|||
static void shortcut_show_financial_information()
|
||||
{
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)))
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY))
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY))
|
||||
window_finances_open();
|
||||
}
|
||||
|
||||
|
|
|
@ -1487,7 +1487,7 @@ void viewport_park_entrance_paint_setup(uint8 direction, int height, rct_map_ele
|
|||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint32) = 0;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_OPEN){
|
||||
if (gParkFlags & PARK_FLAGS_PARK_OPEN){
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, rct_string_id) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME, rct_string_id);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, rct_string_id) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME_ARGS, rct_string_id);
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ static int award_is_deserved_best_value(int awardType, int activeAwardTypes)
|
|||
return 0;
|
||||
if (activeAwardTypes & (1 << PARK_AWARD_MOST_DISAPPOINTING))
|
||||
return 0;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & (PARK_FLAGS_NO_MONEY | PARK_FLAGS_PARK_FREE_ENTRY))
|
||||
if (gParkFlags & (PARK_FLAGS_NO_MONEY | PARK_FLAGS_PARK_FREE_ENTRY))
|
||||
return 0;
|
||||
if (RCT2_GLOBAL(RCT2_TOTAL_RIDE_VALUE, money16) < MONEY(10, 00))
|
||||
return 0;
|
||||
|
@ -212,7 +212,7 @@ static int award_is_deserved_worse_value(int awardType, int activeAwardTypes)
|
|||
{
|
||||
if (activeAwardTypes & (1 << PARK_AWARD_BEST_VALUE))
|
||||
return 0;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY)
|
||||
return 0;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_FEE, money16) == MONEY(0, 00))
|
||||
return 0;
|
||||
|
@ -611,7 +611,7 @@ void award_update_all()
|
|||
int i, activeAwardTypes, freeAwardEntryIndex;
|
||||
|
||||
// Only add new awards if park is open
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_OPEN) {
|
||||
if (gParkFlags & PARK_FLAGS_PARK_OPEN) {
|
||||
// Set active award types as flags
|
||||
activeAwardTypes = 0;
|
||||
freeAwardEntryIndex = -1;
|
||||
|
|
|
@ -81,7 +81,7 @@ void finance_pay_wages()
|
|||
rct_peep* peep;
|
||||
uint16 spriteIndex;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY)
|
||||
return;
|
||||
|
||||
FOR_ALL_STAFF(spriteIndex, peep)
|
||||
|
@ -96,7 +96,7 @@ void finance_pay_research()
|
|||
{
|
||||
uint8 level;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY)
|
||||
return;
|
||||
|
||||
level = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_RESEARCH_LEVEL, uint8);
|
||||
|
@ -113,7 +113,7 @@ void finance_pay_interest()
|
|||
sint16 current_interest = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_INTEREST_RATE, sint16);
|
||||
money32 tempcost = (current_loan * 5 * current_interest) >> 14; // (5 * interest) / 2^14 is pretty close to
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY)
|
||||
return;
|
||||
|
||||
finance_payment(tempcost, RCT_EXPENDITURE_TYPE_INTEREST);
|
||||
|
@ -134,7 +134,7 @@ void finance_pay_ride_upkeep()
|
|||
ride->reliability = RIDE_INITIAL_RELIABILITY;
|
||||
}
|
||||
|
||||
if (ride->status != RIDE_STATUS_CLOSED && !(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
|
||||
if (ride->status != RIDE_STATUS_CLOSED && !(gParkFlags & PARK_FLAGS_NO_MONEY)) {
|
||||
sint16 upkeep = ride->upkeep_cost;
|
||||
if (upkeep != -1) {
|
||||
ride->total_profit -= upkeep;
|
||||
|
@ -206,7 +206,7 @@ void finance_update_daily_profit()
|
|||
|
||||
money32 current_profit = 0;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY))
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY))
|
||||
{
|
||||
// Staff costs
|
||||
uint16 sprite_index;
|
||||
|
|
|
@ -167,7 +167,7 @@ void game_command_start_campaign(int* eax, int* ebx, int* ecx, int* edx, int* es
|
|||
}
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_MARKETING * 4;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN) {
|
||||
if (gParkFlags & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN) {
|
||||
gGameCommandErrorText = 3048;
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
|
@ -192,12 +192,12 @@ bool marketing_is_campaign_type_applicable(int campaignType)
|
|||
switch (campaignType) {
|
||||
case ADVERTISING_CAMPAIGN_PARK_ENTRY_FREE:
|
||||
case ADVERTISING_CAMPAIGN_PARK_ENTRY_HALF_PRICE:
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY)
|
||||
if (gParkFlags & PARK_FLAGS_PARK_FREE_ENTRY)
|
||||
return false;
|
||||
return true;
|
||||
|
||||
case ADVERTISING_CAMPAIGN_RIDE_FREE:
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY))
|
||||
if (!(gParkFlags & PARK_FLAGS_PARK_FREE_ENTRY))
|
||||
return false;
|
||||
|
||||
// fall-through
|
||||
|
|
|
@ -1129,7 +1129,7 @@ void Network::AdvertiseHeartbeat()
|
|||
json_object_set_new(gameInfo, "month", json_integer(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_YEAR, uint16)));
|
||||
json_object_set_new(gameInfo, "guests", json_integer(RCT2_GLOBAL(RCT2_ADDRESS_GUESTS_IN_PARK, uint16)));
|
||||
json_object_set_new(gameInfo, "parkValue", json_integer(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_PARK_VALUE, money32)));
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) {
|
||||
money32 cash = DECRYPT_MONEY(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONEY_ENCRYPTED, money32));
|
||||
json_object_set_new(gameInfo, "cash", json_integer(cash));
|
||||
}
|
||||
|
|
|
@ -344,7 +344,7 @@ static void sub_68F8CD(rct_peep *peep)
|
|||
}
|
||||
|
||||
if (!(peep->peep_flags & PEEP_FLAGS_LEAVING_PARK)){
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) {
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY) {
|
||||
if (peep->energy >= 70 && peep->happiness >= 60) {
|
||||
return;
|
||||
}
|
||||
|
@ -536,7 +536,7 @@ static void sub_68F41A(rct_peep *peep, int index)
|
|||
}
|
||||
|
||||
// Not sure why the happiness check is like that seems wrong to me
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) &&
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY) &&
|
||||
peep->cash_in_pocket <= MONEY(9, 00) &&
|
||||
peep->happiness >= 105 &&
|
||||
peep->happiness >= 70){
|
||||
|
@ -1798,7 +1798,7 @@ static void peep_update_ride_sub_state_0(rct_peep* peep){
|
|||
if (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)
|
||||
return;
|
||||
|
||||
if (ride->price != 0 && !(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
|
||||
if (ride->price != 0 && !(gParkFlags & PARK_FLAGS_NO_MONEY)) {
|
||||
if (!(peep->item_standard_flags & PEEP_ITEM_VOUCHER) ||
|
||||
!(peep->voucher_type == VOUCHER_TYPE_RIDE_FREE) ||
|
||||
!(peep->voucher_arguments == peep->current_ride)){
|
||||
|
@ -2099,7 +2099,7 @@ static void peep_go_to_ride_exit(rct_peep* peep, rct_ride* ride, sint16 x, sint1
|
|||
* rct2: 0x006920B4
|
||||
*/
|
||||
static void peep_update_ride_sub_state_2_enter_ride(rct_peep* peep, rct_ride* ride){
|
||||
if (ride->price != 0 && !(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)){
|
||||
if (ride->price != 0 && !(gParkFlags & PARK_FLAGS_NO_MONEY)){
|
||||
if ((peep->item_standard_flags & PEEP_ITEM_VOUCHER) &&
|
||||
(peep->voucher_type == VOUCHER_TYPE_RIDE_FREE) &&
|
||||
(peep->voucher_arguments == peep->current_ride)){
|
||||
|
@ -6097,12 +6097,12 @@ rct_peep *peep_generate(int x, int y, int z)
|
|||
|
||||
if (al >= 7) al = 15;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PREF_LESS_INTENSE_RIDES){
|
||||
if (gParkFlags & PARK_FLAGS_PREF_LESS_INTENSE_RIDES){
|
||||
ah = 0;
|
||||
al = 4;
|
||||
}
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PREF_MORE_INTENSE_RIDES){
|
||||
if (gParkFlags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES){
|
||||
ah = 9;
|
||||
al = 15;
|
||||
}
|
||||
|
@ -6110,7 +6110,7 @@ rct_peep *peep_generate(int x, int y, int z)
|
|||
peep->intensity = (al << 4) | ah;
|
||||
|
||||
uint8 nausea_tolerance = scenario_rand() & 0x7;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PREF_MORE_INTENSE_RIDES){
|
||||
if (gParkFlags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES){
|
||||
nausea_tolerance += 4;
|
||||
}
|
||||
|
||||
|
@ -6150,7 +6150,7 @@ rct_peep *peep_generate(int x, int y, int z)
|
|||
cash = 500;
|
||||
}
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY){
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY){
|
||||
cash = 0;
|
||||
}
|
||||
|
||||
|
@ -6193,7 +6193,7 @@ rct_peep *peep_generate(int x, int y, int z)
|
|||
peep->energy = energy;
|
||||
peep->energy_growth_rate = energy;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_SHOW_REAL_GUEST_NAMES){
|
||||
if (gParkFlags & PARK_FLAGS_SHOW_REAL_GUEST_NAMES){
|
||||
peep_give_real_name(peep);
|
||||
}
|
||||
peep_update_name_sort(peep);
|
||||
|
@ -6927,7 +6927,7 @@ static int peep_interact_with_entrance(rct_peep* peep, sint16 x, sint16 y, rct_m
|
|||
|
||||
if (!(peep->peep_flags & PEEP_FLAGS_LEAVING_PARK)){
|
||||
// If the park is open and leaving flag isnt set return to center
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_OPEN)
|
||||
if (gParkFlags & PARK_FLAGS_PARK_OPEN)
|
||||
return peep_return_to_center_of_tile(peep);
|
||||
}
|
||||
|
||||
|
@ -6958,7 +6958,7 @@ static int peep_interact_with_entrance(rct_peep* peep, sint16 x, sint16 y, rct_m
|
|||
if (peep->state != PEEP_STATE_ENTERING_PARK)
|
||||
return peep_return_to_center_of_tile(peep);
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_OPEN)){
|
||||
if (!(gParkFlags & PARK_FLAGS_PARK_OPEN)){
|
||||
peep->state = PEEP_STATE_LEAVING_PARK;
|
||||
peep->var_37 = 1;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GUESTS_HEADING_FOR_PARK, uint16)--;
|
||||
|
@ -7025,7 +7025,7 @@ static int peep_interact_with_entrance(rct_peep* peep, sint16 x, sint16 y, rct_m
|
|||
}
|
||||
|
||||
money16 entranceFee = RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_FEE, money16);
|
||||
if (entranceFee != 0 && !(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)){
|
||||
if (entranceFee != 0 && !(gParkFlags & PARK_FLAGS_NO_MONEY)){
|
||||
if (peep->item_standard_flags & PEEP_ITEM_VOUCHER){
|
||||
if (peep->voucher_type == VOUCHER_TYPE_PARK_ENTRY_HALF_PRICE){
|
||||
entranceFee /= 2;
|
||||
|
@ -8457,7 +8457,7 @@ static int sub_693C9E(rct_peep *peep)
|
|||
*/
|
||||
static void peep_spend_money(rct_peep *peep, money16 *peep_expend_type, money32 amount)
|
||||
{
|
||||
assert(!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY));
|
||||
assert(!(gParkFlags & PARK_FLAGS_NO_MONEY));
|
||||
|
||||
peep->cash_in_pocket = max(0, peep->cash_in_pocket - amount);
|
||||
peep->cash_spent += amount;
|
||||
|
@ -8564,7 +8564,7 @@ static sint8 peep_calculate_ride_satisfaction(rct_peep *peep, rct_ride *ride)
|
|||
// Calculate satisfaction based on the price and value of the ride.
|
||||
uint8 valueSatisfaction = 1;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) {
|
||||
if (ride->value != 0xFFFF) {
|
||||
if (ride->price <= (money16)ride->value) {
|
||||
valueSatisfaction = 2;
|
||||
|
@ -8736,7 +8736,7 @@ static bool peep_should_go_on_ride_again(rct_peep *peep, rct_ride *ride)
|
|||
|
||||
static bool peep_should_preferred_intensity_increase(rct_peep *peep)
|
||||
{
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PREF_LESS_INTENSE_RIDES) return false;
|
||||
if (gParkFlags & PARK_FLAGS_PREF_LESS_INTENSE_RIDES) return false;
|
||||
if (peep->happiness < 200) return false;
|
||||
|
||||
return (scenario_rand() & 0xFF) >= peep->intensity;
|
||||
|
@ -8939,7 +8939,7 @@ loc_69B119:
|
|||
value -= price;
|
||||
value = max(8, value);
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) {
|
||||
if (value >= (money32)(scenario_rand() & 0x07)) {
|
||||
// "This x is a really good value"
|
||||
uint8 thought_item = (shopItem >= 32 ? (PEEP_THOUGHT_TYPE_PHOTO2 + (shopItem - 32)) : (PEEP_THOUGHT_TYPE_BALLOON + shopItem));
|
||||
|
@ -9051,7 +9051,7 @@ loc_69B221:
|
|||
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_FOODDRINK_STOCK * 4;
|
||||
}
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY))
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY))
|
||||
finance_payment(get_shop_item_cost(shopItem), (RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) / 4));
|
||||
|
||||
// Sets the expenditure type to *_FOODDRINK_SALES or *_SHOP_SALES appropriately.
|
||||
|
@ -9060,7 +9060,7 @@ loc_69B221:
|
|||
peep->item_standard_flags &= ~PEEP_ITEM_VOUCHER;
|
||||
peep->window_invalidate_flags |= PEEP_INVALIDATE_PEEP_INVENTORY;
|
||||
}
|
||||
else if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
|
||||
else if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) {
|
||||
peep_spend_money(peep, expend_type, price);
|
||||
}
|
||||
ride->total_profit += (price - get_shop_item_cost(shopItem));
|
||||
|
@ -9078,7 +9078,7 @@ loc_69B221:
|
|||
*/
|
||||
static bool peep_should_use_cash_machine(rct_peep *peep, int rideIndex)
|
||||
{
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) return false;
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY) return false;
|
||||
if (peep->peep_flags & PEEP_FLAGS_LEAVING_PARK) return false;
|
||||
if (peep->cash_in_pocket > MONEY(20,00)) return false;
|
||||
if (115 + (scenario_rand() % 128) > peep->happiness) return false;
|
||||
|
@ -9774,7 +9774,7 @@ static bool peep_should_go_on_ride(rct_peep *peep, int rideIndex, int entranceNu
|
|||
uint32 value = ride->value;
|
||||
|
||||
// If the value of the ride hasn't yet been calculated, peeps will be willing to pay any amount for the ride.
|
||||
if (value != 0xFFFF && !peep_has_voucher_for_free_ride(peep, rideIndex) && !(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
|
||||
if (value != 0xFFFF && !peep_has_voucher_for_free_ride(peep, rideIndex) && !(gParkFlags & PARK_FLAGS_NO_MONEY)) {
|
||||
|
||||
// The amount peeps are willing to pay is decreased by 75% if they had to pay to enter the park.
|
||||
if (peep->peep_flags & PEEP_FLAGS_HAS_PAID_FOR_PARK_ENTRY)
|
||||
|
@ -9795,7 +9795,7 @@ static bool peep_should_go_on_ride(rct_peep *peep, int rideIndex, int entranceNu
|
|||
|
||||
// A ride is good value if the price is 50% or less of the ride value and the peep didn't pay to enter the park.
|
||||
if (ride->price <= (money16)(value / 2) && peepAtRide) {
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) {
|
||||
if (!(peep->peep_flags & PEEP_FLAGS_HAS_PAID_FOR_PARK_ENTRY)) {
|
||||
peep_insert_new_thought(peep, PEEP_THOUGHT_TYPE_GOOD_VALUE, rideIndex);
|
||||
}
|
||||
|
@ -10390,7 +10390,7 @@ void peep_update_names(bool realNames)
|
|||
bool restart;
|
||||
|
||||
if (realNames) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
|
||||
gParkFlags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
|
||||
do {
|
||||
restart = false;
|
||||
FOR_ALL_GUESTS(spriteIndex, peep) {
|
||||
|
@ -10403,7 +10403,7 @@ void peep_update_names(bool realNames)
|
|||
} while (restart);
|
||||
gfx_invalidate_screen();
|
||||
} else {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
|
||||
gParkFlags &= ~PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
|
||||
do {
|
||||
restart = false;
|
||||
FOR_ALL_GUESTS(spriteIndex, peep) {
|
||||
|
|
|
@ -107,7 +107,7 @@ void S4Importer::Initialise()
|
|||
window_guest_list_init_vars_b();
|
||||
window_staff_list_init_vars();
|
||||
RCT2_GLOBAL(0x0141F570, uint8) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
|
||||
gParkFlags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
|
||||
window_new_ride_init_vars();
|
||||
RCT2_GLOBAL(0x0141F571, uint8) = 4;
|
||||
news_item_init_queue();
|
||||
|
@ -968,8 +968,8 @@ void S4Importer::ImportParkFlags()
|
|||
RCT2_GLOBAL(RCT2_ADDRESS_SECURITY_COLOUR, uint8) = RCT1::GetColour(_s4.security_guard_colour);
|
||||
|
||||
// Flags
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) = _s4.park_flags;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_ANTI_CHEAT_DEPRECATED;
|
||||
gParkFlags = _s4.park_flags;
|
||||
gParkFlags &= ~PARK_FLAGS_ANTI_CHEAT_DEPRECATED;
|
||||
if (!(_s4.park_flags & PARK_FLAGS_PARK_FREE_ENTRY))
|
||||
{
|
||||
gCheatsUnlockAllPrices = true;
|
||||
|
|
|
@ -5993,12 +5993,12 @@ foundRideEntry:
|
|||
|
||||
ride->price = 0;
|
||||
ride->price_secondary = 0;
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) {
|
||||
ride->price = RideData4[ride->type].price;
|
||||
ride->price_secondary = RideData4[ride->type].price_secondary;
|
||||
|
||||
if (rideEntry->shop_item == 255) {
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY)) {
|
||||
if (!(gParkFlags & PARK_FLAGS_PARK_FREE_ENTRY)) {
|
||||
ride->price = 0;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -2042,8 +2042,8 @@ int sub_6D2189(int* cost, uint8* ride_id){
|
|||
|
||||
RCT2_GLOBAL(0x009D8150, uint8) |= 1;
|
||||
uint8 backup_rotation = _currentTrackPieceDirection;
|
||||
uint32 backup_park_flags = RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_FORBID_HIGH_CONSTRUCTION;
|
||||
uint32 backup_park_flags = gParkFlags;
|
||||
gParkFlags &= ~PARK_FLAGS_FORBID_HIGH_CONSTRUCTION;
|
||||
int map_size = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE, uint16) << 4;
|
||||
|
||||
_currentTrackPieceDirection = 0;
|
||||
|
@ -2061,7 +2061,7 @@ int sub_6D2189(int* cost, uint8* ride_id){
|
|||
RCT2_GLOBAL(0xF44151, uint8) |= 1;
|
||||
}
|
||||
edi = sub_6D01B3(bl, *ride_id, map_size, map_size, z);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) = backup_park_flags;
|
||||
gParkFlags = backup_park_flags;
|
||||
|
||||
if (edi != MONEY32_UNDEFINED){
|
||||
|
||||
|
@ -3470,7 +3470,7 @@ money32 place_maze_design(uint8 flags, uint8 rideIndex, uint16 mazeEntry, sint16
|
|||
|
||||
// Calculate price
|
||||
money32 price = 0;
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) {
|
||||
price = RideTrackCosts[ride->type].track_price * RCT2_GLOBAL(0x0099DBC8, money32);
|
||||
price = (price >> 17) * 10;
|
||||
}
|
||||
|
@ -4878,7 +4878,7 @@ static money32 track_place(int rideIndex, int type, int originX, int originY, in
|
|||
price >>= 16;
|
||||
price = cost + ((price / 2) * 10);
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) {
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY) {
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
|
@ -5172,7 +5172,7 @@ money32 track_remove(uint8 type, uint8 sequence, sint16 originX, sint16 originY,
|
|||
network_set_player_last_action_coord(network_get_player_index(game_command_playerid), coord);
|
||||
}
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY)
|
||||
return 0;
|
||||
else
|
||||
return price;
|
||||
|
@ -5294,7 +5294,7 @@ money32 set_maze_track(uint16 x, uint8 flags, uint8 direction, uint16 y, uint8 r
|
|||
RCT2_GLOBAL(0x00F4413E, money32) = price / 2 * 10;
|
||||
|
||||
if (!(flags & GAME_COMMAND_FLAG_APPLY)) {
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) {
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -5330,7 +5330,7 @@ money32 set_maze_track(uint16 x, uint8 flags, uint8 direction, uint16 y, uint8 r
|
|||
}
|
||||
|
||||
if (!(flags & GAME_COMMAND_FLAG_APPLY)) {
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) {
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -5411,7 +5411,7 @@ money32 set_maze_track(uint16 x, uint8 flags, uint8 direction, uint16 y, uint8 r
|
|||
get_ride(rideIndex)->maze_tiles--;
|
||||
}
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) {
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -268,9 +268,9 @@ void scenario_begin()
|
|||
RCT2_GLOBAL(RCT2_ADDRESS_SCENARIO_SRAND_1, sint32) ^= platform_get_ticks();
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_UPDATE_TICKS, sint16) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, sint32) &= 0xFFFFF7FF;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, sint32) & PARK_FLAGS_NO_MONEY_SCENARIO)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, sint32) |= PARK_FLAGS_NO_MONEY;
|
||||
gParkFlags &= ~PARK_FLAGS_NO_MONEY;
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO)
|
||||
gParkFlags |= PARK_FLAGS_NO_MONEY;
|
||||
sub_684AC3();
|
||||
scenery_set_default_placement_configuration();
|
||||
news_item_init_queue();
|
||||
|
@ -361,12 +361,12 @@ void scenario_begin()
|
|||
RCT2_GLOBAL(0x00135882E, uint16) = 0;
|
||||
|
||||
// Open park with free entry when there is no money
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_PARK_OPEN;
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY) {
|
||||
gParkFlags |= PARK_FLAGS_PARK_OPEN;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_FEE, uint16) = 0;
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_18;
|
||||
gParkFlags |= PARK_FLAGS_18;
|
||||
|
||||
load_palette();
|
||||
|
||||
|
@ -429,7 +429,7 @@ void scenario_success()
|
|||
scenario->highscore->timestamp = platform_get_datetime_now_utc();
|
||||
|
||||
// Allow name entry
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT;
|
||||
gParkFlags |= PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT;
|
||||
RCT2_GLOBAL(0x013587C0, money32) = companyValue;
|
||||
scenario_scores_save();
|
||||
}
|
||||
|
@ -453,7 +453,7 @@ void scenario_success_submit_name(const char *name)
|
|||
}
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT;
|
||||
gParkFlags &= ~PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -466,7 +466,7 @@ void scenario_entrance_fee_too_high_check()
|
|||
uint16 totalRideValue = RCT2_GLOBAL(RCT2_TOTAL_RIDE_VALUE, uint16);
|
||||
uint16 park_entrance_fee = RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_FEE, uint16);
|
||||
int max_fee = totalRideValue + (totalRideValue / 2);
|
||||
uint32 game_flags = RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32), packed_xy;
|
||||
uint32 game_flags = gParkFlags, packed_xy;
|
||||
|
||||
if ((game_flags & PARK_FLAGS_PARK_OPEN) && !(game_flags & PARK_FLAGS_NO_MONEY) && park_entrance_fee > max_fee) {
|
||||
for (int i = 0; RCT2_ADDRESS(RCT2_ADDRESS_PARK_ENTRANCE_X, sint16)[i] != SPRITE_LOCATION_NULL; i++) {
|
||||
|
@ -525,7 +525,7 @@ static void scenario_day_update()
|
|||
break;
|
||||
}
|
||||
|
||||
uint16 unk = (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) ? 40 : 7;
|
||||
uint16 unk = (gParkFlags & PARK_FLAGS_NO_MONEY) ? 40 : 7;
|
||||
RCT2_GLOBAL(0x00135882E, uint16) = RCT2_GLOBAL(0x00135882E, uint16) > unk ? RCT2_GLOBAL(0x00135882E, uint16) - unk : 0;
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_BTM_TOOLBAR_DIRTY_FLAGS, uint32) |= BTM_TB_DIRTY_FLAG_DATE;
|
||||
|
@ -776,7 +776,7 @@ int scenario_prepare_for_save()
|
|||
scenario_prepare_rides_for_save();
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_TYPE, uint8) == OBJECTIVE_GUESTS_AND_RATING)
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_PARK_OPEN;
|
||||
gParkFlags |= PARK_FLAGS_PARK_OPEN;
|
||||
|
||||
// Fix #2385: saved scenarios did not initialise temperatures to selected climate
|
||||
climate_reset(RCT2_GLOBAL(RCT2_ADDRESS_CLIMATE, uint8));
|
||||
|
@ -1341,7 +1341,7 @@ static void scenario_objective_check_guests_and_rating()
|
|||
}
|
||||
} else if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_RATING_WARNING_DAYS, uint16) == 29) {
|
||||
news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_HAS_BEEN_CLOSED_DOWN, 0);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_PARK_OPEN;
|
||||
gParkFlags &= ~PARK_FLAGS_PARK_OPEN;
|
||||
scenario_failure();
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_GUEST_INITIAL_HAPPINESS, uint8) = 50;
|
||||
}
|
||||
|
|
|
@ -771,7 +771,7 @@ static void window_cheats_invalidate(rct_window *w)
|
|||
widget_set_checkbox_value(w, WIDX_DISABLE_LITTERING, gCheatsDisableLittering);
|
||||
break;
|
||||
case WINDOW_CHEATS_PAGE_MISC:
|
||||
w->widgets[WIDX_OPEN_CLOSE_PARK].image = RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_OPEN ?
|
||||
w->widgets[WIDX_OPEN_CLOSE_PARK].image = gParkFlags & PARK_FLAGS_PARK_OPEN ?
|
||||
STR_CHEAT_CLOSE_PARK : STR_CHEAT_OPEN_PARK;
|
||||
widget_set_checkbox_value(w, WIDX_UNLOCK_ALL_PRICES, gCheatsUnlockAllPrices);
|
||||
widget_set_checkbox_value(w, WIDX_FORCE_PARK_RATING, get_forced_park_rating() >= 0);
|
||||
|
|
|
@ -345,7 +345,7 @@ static void window_editor_bottom_toolbar_mouseup(rct_window *w, int widgetIndex)
|
|||
{
|
||||
if (widgetIndex == WIDX_PREVIOUS_STEP_BUTTON) {
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER) ||
|
||||
(RCT2_GLOBAL(0x13573C8, uint16) == 0x2710 && !(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_18))) {
|
||||
(RCT2_GLOBAL(0x13573C8, uint16) == 0x2710 && !(gParkFlags & PARK_FLAGS_18))) {
|
||||
previous_button_mouseup_events[g_editor_step]();
|
||||
}
|
||||
} else if (widgetIndex == WIDX_NEXT_STEP_BUTTON) {
|
||||
|
@ -391,7 +391,7 @@ void window_editor_bottom_toolbar_invalidate(rct_window *w)
|
|||
} else if (g_editor_step == EDITOR_STEP_ROLLERCOASTER_DESIGNER) {
|
||||
hide_next_step_button();
|
||||
} else if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TRACK_DESIGNER)) {
|
||||
if (RCT2_GLOBAL(0x13573C8, uint16) != 0x2710 || RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_18) {
|
||||
if (RCT2_GLOBAL(0x13573C8, uint16) != 0x2710 || gParkFlags & PARK_FLAGS_18) {
|
||||
hide_previous_step_button();
|
||||
}
|
||||
}
|
||||
|
@ -416,7 +416,7 @@ void window_editor_bottom_toolbar_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
else if (RCT2_GLOBAL(0x13573C8, uint16) != 0x2710) {
|
||||
drawNextButton = true;
|
||||
}
|
||||
else if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_18) {
|
||||
else if (gParkFlags & PARK_FLAGS_18) {
|
||||
drawNextButton = true;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -432,7 +432,7 @@ static void window_editor_objective_options_show_objective_dropdown(rct_window *
|
|||
uint32 parkFlags;
|
||||
|
||||
dropdownWidget = &w->widgets[WIDX_OBJECTIVE];
|
||||
parkFlags = RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32);
|
||||
parkFlags = gParkFlags;
|
||||
numItems = 0;
|
||||
|
||||
if (!(parkFlags & PARK_FLAGS_NO_MONEY_SCENARIO)) {
|
||||
|
@ -743,7 +743,7 @@ static void window_editor_objective_options_main_update(rct_window *w)
|
|||
window_event_invalidate_call(w);
|
||||
widget_invalidate(w, WIDX_TAB_1);
|
||||
|
||||
parkFlags = RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32);
|
||||
parkFlags = gParkFlags;
|
||||
objectiveType = RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_TYPE, uint8);
|
||||
|
||||
// Reset objective if invalid
|
||||
|
|
|
@ -445,9 +445,9 @@ static void window_editor_scenario_options_financial_mouseup(rct_window *w, int
|
|||
break;
|
||||
case WIDX_NO_MONEY:
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) ^= PARK_FLAGS_NO_MONEY_SCENARIO;
|
||||
gParkFlags ^= PARK_FLAGS_NO_MONEY_SCENARIO;
|
||||
} else {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) ^= PARK_FLAGS_NO_MONEY;
|
||||
gParkFlags ^= PARK_FLAGS_NO_MONEY;
|
||||
// Invalidate all windows that have anything to do with finance
|
||||
window_invalidate_by_class(WC_RIDE);
|
||||
window_invalidate_by_class(WC_PEEP);
|
||||
|
@ -459,7 +459,7 @@ static void window_editor_scenario_options_financial_mouseup(rct_window *w, int
|
|||
window_invalidate(w);
|
||||
break;
|
||||
case WIDX_FORBID_MARKETING:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) ^= PARK_FLAGS_FORBID_MARKETING_CAMPAIGN;
|
||||
gParkFlags ^= PARK_FLAGS_FORBID_MARKETING_CAMPAIGN;
|
||||
window_invalidate(w);
|
||||
break;
|
||||
}
|
||||
|
@ -603,8 +603,8 @@ static void window_editor_scenario_options_financial_invalidate(rct_window *w)
|
|||
|
||||
window_editor_scenario_options_set_pressed_tab(w);
|
||||
|
||||
if (((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY_SCENARIO)) ||
|
||||
(!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY))) {
|
||||
if (((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO)) ||
|
||||
(!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY))) {
|
||||
w->pressed_widgets |= (1 << WIDX_NO_MONEY);
|
||||
for (i = WIDX_INITIAL_CASH; i <= WIDX_FORBID_MARKETING; i++)
|
||||
w->widgets[i].type = WWT_EMPTY;
|
||||
|
@ -625,7 +625,7 @@ static void window_editor_scenario_options_financial_invalidate(rct_window *w)
|
|||
w->widgets[WIDX_FORBID_MARKETING].type = WWT_CHECKBOX;
|
||||
}
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN)
|
||||
if (gParkFlags & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN)
|
||||
w->pressed_widgets |= (1 << WIDX_FORBID_MARKETING);
|
||||
else
|
||||
w->pressed_widgets &= ~(1 << WIDX_FORBID_MARKETING);
|
||||
|
@ -710,11 +710,11 @@ static void window_editor_scenario_options_guests_mouseup(rct_window *w, int wid
|
|||
window_editor_scenario_options_set_page(w, widgetIndex - WIDX_TAB_1);
|
||||
break;
|
||||
case WIDX_GUEST_PREFER_LESS_INTENSE_RIDES:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) ^= PARK_FLAGS_PREF_LESS_INTENSE_RIDES;
|
||||
gParkFlags ^= PARK_FLAGS_PREF_LESS_INTENSE_RIDES;
|
||||
window_invalidate(w);
|
||||
break;
|
||||
case WIDX_GUEST_PREFER_MORE_INTENSE_RIDES:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) ^= PARK_FLAGS_PREF_MORE_INTENSE_RIDES;
|
||||
gParkFlags ^= PARK_FLAGS_PREF_MORE_INTENSE_RIDES;
|
||||
window_invalidate(w);
|
||||
break;
|
||||
}
|
||||
|
@ -832,8 +832,8 @@ static void window_editor_scenario_options_guests_invalidate(rct_window *w)
|
|||
|
||||
window_editor_scenario_options_set_pressed_tab(w);
|
||||
|
||||
if (((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY_SCENARIO)) ||
|
||||
(!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY))) {
|
||||
if (((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO)) ||
|
||||
(!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY))) {
|
||||
w->widgets[WIDX_CASH_PER_GUEST].type = WWT_EMPTY;
|
||||
w->widgets[WIDX_CASH_PER_GUEST_INCREASE].type = WWT_EMPTY;
|
||||
w->widgets[WIDX_CASH_PER_GUEST_DECREASE].type = WWT_EMPTY;
|
||||
|
@ -844,13 +844,13 @@ static void window_editor_scenario_options_guests_invalidate(rct_window *w)
|
|||
}
|
||||
|
||||
// Guests prefer less intense rides checkbox
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PREF_LESS_INTENSE_RIDES)
|
||||
if (gParkFlags & PARK_FLAGS_PREF_LESS_INTENSE_RIDES)
|
||||
w->pressed_widgets |= (1 << WIDX_GUEST_PREFER_LESS_INTENSE_RIDES);
|
||||
else
|
||||
w->pressed_widgets &= ~(1 << WIDX_GUEST_PREFER_LESS_INTENSE_RIDES);
|
||||
|
||||
// Guests prefer more intense rides checkbox
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PREF_MORE_INTENSE_RIDES)
|
||||
if (gParkFlags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES)
|
||||
w->pressed_widgets |= (1 << WIDX_GUEST_PREFER_MORE_INTENSE_RIDES);
|
||||
else
|
||||
w->pressed_widgets &= ~(1 << WIDX_GUEST_PREFER_MORE_INTENSE_RIDES);
|
||||
|
@ -939,23 +939,23 @@ static void window_editor_scenario_options_park_mouseup(rct_window *w, int widge
|
|||
window_editor_scenario_options_set_page(w, widgetIndex - WIDX_TAB_1);
|
||||
break;
|
||||
case WIDX_FORBID_TREE_REMOVAL:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) ^= PARK_FLAGS_FORBID_TREE_REMOVAL;
|
||||
gParkFlags ^= PARK_FLAGS_FORBID_TREE_REMOVAL;
|
||||
window_invalidate(w);
|
||||
break;
|
||||
case WIDX_FORBID_LANDSCAPE_CHANGES:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) ^= PARK_FLAGS_FORBID_LANDSCAPE_CHANGES;
|
||||
gParkFlags ^= PARK_FLAGS_FORBID_LANDSCAPE_CHANGES;
|
||||
window_invalidate(w);
|
||||
break;
|
||||
case WIDX_FORBID_HIGH_CONSTRUCTION:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) ^= PARK_FLAGS_FORBID_HIGH_CONSTRUCTION;
|
||||
gParkFlags ^= PARK_FLAGS_FORBID_HIGH_CONSTRUCTION;
|
||||
window_invalidate(w);
|
||||
break;
|
||||
case WIDX_HARD_PARK_RATING:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) ^= PARK_FLAGS_DIFFICULT_PARK_RATING;
|
||||
gParkFlags ^= PARK_FLAGS_DIFFICULT_PARK_RATING;
|
||||
window_invalidate(w);
|
||||
break;
|
||||
case WIDX_HARD_GUEST_GENERATION:
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) ^= PARK_FLAGS_DIFFICULT_GUEST_GENERATION;
|
||||
gParkFlags ^= PARK_FLAGS_DIFFICULT_GUEST_GENERATION;
|
||||
window_invalidate(w);
|
||||
break;
|
||||
}
|
||||
|
@ -1045,7 +1045,7 @@ static void window_editor_scenario_options_park_mousedown(int widgetIndex, rct_w
|
|||
dropdownWidget->right - dropdownWidget->left - 3
|
||||
);
|
||||
|
||||
dropdown_set_checked((RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY ? 0 : 1), true);
|
||||
dropdown_set_checked((gParkFlags & PARK_FLAGS_PARK_FREE_ENTRY ? 0 : 1), true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1059,25 +1059,25 @@ static void window_editor_scenario_options_park_dropdown(rct_window *w, int widg
|
|||
if (widgetIndex == WIDX_PAY_FOR_PARK_OR_RIDES_DROPDOWN && dropdownIndex != -1) {
|
||||
if(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) {
|
||||
if (dropdownIndex == 0) {
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY)) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_PARK_FREE_ENTRY;
|
||||
if (!(gParkFlags & PARK_FLAGS_PARK_FREE_ENTRY)) {
|
||||
gParkFlags |= PARK_FLAGS_PARK_FREE_ENTRY;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_FEE, money16) = MONEY(0, 00);
|
||||
}
|
||||
} else {
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_PARK_FREE_ENTRY;
|
||||
if (gParkFlags & PARK_FLAGS_PARK_FREE_ENTRY) {
|
||||
gParkFlags &= ~PARK_FLAGS_PARK_FREE_ENTRY;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_FEE, money16) = MONEY(10, 00);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (dropdownIndex == 0) {
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY)) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_PARK_FREE_ENTRY;
|
||||
if (!(gParkFlags & PARK_FLAGS_PARK_FREE_ENTRY)) {
|
||||
gParkFlags |= PARK_FLAGS_PARK_FREE_ENTRY;
|
||||
}
|
||||
} else {
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_PARK_FREE_ENTRY;
|
||||
if (gParkFlags & PARK_FLAGS_PARK_FREE_ENTRY) {
|
||||
gParkFlags &= ~PARK_FLAGS_PARK_FREE_ENTRY;
|
||||
}
|
||||
}
|
||||
window_invalidate_by_class(WC_PARK_INFORMATION);
|
||||
|
@ -1118,8 +1118,8 @@ static void window_editor_scenario_options_park_invalidate(rct_window *w)
|
|||
|
||||
window_editor_scenario_options_set_pressed_tab(w);
|
||||
|
||||
if (((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY_SCENARIO)) ||
|
||||
(!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY))) {
|
||||
if (((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO)) ||
|
||||
(!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && (gParkFlags & PARK_FLAGS_NO_MONEY))) {
|
||||
for (i = WIDX_LAND_COST; i <= WIDX_ENTRY_PRICE_DECREASE; i++)
|
||||
w->widgets[i].type = WWT_EMPTY;
|
||||
} else {
|
||||
|
@ -1132,7 +1132,7 @@ static void window_editor_scenario_options_park_invalidate(rct_window *w)
|
|||
w->widgets[WIDX_PAY_FOR_PARK_OR_RIDES].type = WWT_DROPDOWN;
|
||||
w->widgets[WIDX_PAY_FOR_PARK_OR_RIDES_DROPDOWN].type = WWT_DROPDOWN_BUTTON;
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY) {
|
||||
if (gParkFlags & PARK_FLAGS_PARK_FREE_ENTRY) {
|
||||
w->widgets[WIDX_ENTRY_PRICE].type = WWT_EMPTY;
|
||||
w->widgets[WIDX_ENTRY_PRICE_INCREASE].type = WWT_EMPTY;
|
||||
w->widgets[WIDX_ENTRY_PRICE_DECREASE].type = WWT_EMPTY;
|
||||
|
@ -1151,15 +1151,15 @@ static void window_editor_scenario_options_park_invalidate(rct_window *w)
|
|||
pressedWidgets &= ~(1 << WIDX_HARD_PARK_RATING);
|
||||
pressedWidgets &= ~(1 << WIDX_HARD_GUEST_GENERATION);
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_TREE_REMOVAL)
|
||||
if (gParkFlags & PARK_FLAGS_FORBID_TREE_REMOVAL)
|
||||
pressedWidgets |= (1 << WIDX_FORBID_TREE_REMOVAL);
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES)
|
||||
if (gParkFlags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES)
|
||||
pressedWidgets |= (1 << WIDX_FORBID_LANDSCAPE_CHANGES);
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_HIGH_CONSTRUCTION)
|
||||
if (gParkFlags & PARK_FLAGS_FORBID_HIGH_CONSTRUCTION)
|
||||
pressedWidgets |= (1 << WIDX_FORBID_HIGH_CONSTRUCTION);
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_DIFFICULT_PARK_RATING)
|
||||
if (gParkFlags & PARK_FLAGS_DIFFICULT_PARK_RATING)
|
||||
pressedWidgets |= (1 << WIDX_HARD_PARK_RATING);
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_DIFFICULT_GUEST_GENERATION)
|
||||
if (gParkFlags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION)
|
||||
pressedWidgets |= (1 << WIDX_HARD_GUEST_GENERATION);
|
||||
|
||||
w->pressed_widgets = pressedWidgets;
|
||||
|
@ -1215,7 +1215,7 @@ static void window_editor_scenario_options_park_paint(rct_window *w, rct_drawpix
|
|||
gfx_draw_string_left(dpi, 3279, NULL, 0, x, y);
|
||||
|
||||
// Pay for park or rides value
|
||||
stringId = RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY ? 3279 : 3280;
|
||||
stringId = gParkFlags & PARK_FLAGS_PARK_FREE_ENTRY ? 3279 : 3280;
|
||||
gfx_draw_string_left(dpi, 1193, &stringId, 0, x, y);
|
||||
}
|
||||
|
||||
|
|
|
@ -579,7 +579,7 @@ static void window_footpath_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
x = w->x + (window_footpath_widgets[WIDX_CONSTRUCT].left + window_footpath_widgets[WIDX_CONSTRUCT].right) / 2;
|
||||
y = w->y + window_footpath_widgets[WIDX_CONSTRUCT].bottom - 12;
|
||||
if (_window_footpath_cost != MONEY32_UNDEFINED)
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY))
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY))
|
||||
gfx_draw_string_centred(dpi, STR_COST_LABEL, x, y, 0, &_window_footpath_cost);
|
||||
}
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ static void window_game_bottom_toolbar_mouseup(rct_window *w, int widgetIndex)
|
|||
switch (widgetIndex) {
|
||||
case WIDX_LEFT_OUTSET:
|
||||
case WIDX_MONEY:
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY))
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY))
|
||||
window_finances_open();
|
||||
break;
|
||||
case WIDX_GUESTS:
|
||||
|
@ -303,7 +303,7 @@ static void window_game_bottom_toolbar_invalidate(rct_window *w)
|
|||
}
|
||||
|
||||
// Hide money if there is no money
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) {
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY) {
|
||||
window_game_bottom_toolbar_widgets[WIDX_MONEY].type = WWT_EMPTY;
|
||||
window_game_bottom_toolbar_widgets[WIDX_GUESTS].top = 1;
|
||||
window_game_bottom_toolbar_widgets[WIDX_GUESTS].bottom = 17;
|
||||
|
@ -379,7 +379,7 @@ static void window_game_bottom_toolbar_draw_left_panel(rct_drawpixelinfo *dpi, r
|
|||
y = window_game_bottom_toolbar_widgets[WIDX_LEFT_OUTSET].top + w->y + 4;
|
||||
|
||||
// Draw money
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, int) = DECRYPT_MONEY(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONEY_ENCRYPTED, sint32));
|
||||
gfx_draw_string_centred(
|
||||
dpi,
|
||||
|
|
|
@ -548,7 +548,7 @@ void window_guest_disable_widgets(rct_window* w){
|
|||
if (!(w->disabled_widgets & (1 << WIDX_PICKUP)))
|
||||
window_invalidate(w);
|
||||
}
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY){
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY){
|
||||
disabled_widgets |= (1 << WIDX_TAB_4); //Disable finance tab if no money
|
||||
}
|
||||
w->disabled_widgets = disabled_widgets;
|
||||
|
|
|
@ -408,7 +408,7 @@ static void window_land_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
if (RCT2_GLOBAL(RCT2_ADDRESS_SELECTED_TERRAIN_EDGE, uint8) != 255)
|
||||
price += numTiles * 100;
|
||||
|
||||
if (price != 0 && !(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
|
||||
if (price != 0 && !(gParkFlags & PARK_FLAGS_NO_MONEY)) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, sint32) = price;
|
||||
gfx_draw_string_centred(dpi, 986, x, y, 0, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS);
|
||||
}
|
||||
|
|
|
@ -796,8 +796,8 @@ static void window_loadsave_select(rct_window *w, const char *path)
|
|||
case (LOADSAVETYPE_SAVE | LOADSAVETYPE_SCENARIO) :
|
||||
{
|
||||
rct_s6_info *s6Info = (rct_s6_info*)0x0141F570;
|
||||
int parkFlagsBackup = RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_18;
|
||||
int parkFlagsBackup = gParkFlags;
|
||||
gParkFlags &= ~PARK_FLAGS_18;
|
||||
s6Info->editor_step = 255;
|
||||
rw = SDL_RWFromFile(path, "wb+");
|
||||
int success = 0;
|
||||
|
@ -806,7 +806,7 @@ static void window_loadsave_select(rct_window *w, const char *path)
|
|||
success = scenario_save(rw, gConfigGeneral.save_plugin_data ? 3 : 2);
|
||||
SDL_RWclose(rw);
|
||||
}
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) = parkFlagsBackup;
|
||||
gParkFlags = parkFlagsBackup;
|
||||
|
||||
if (success) {
|
||||
window_close_by_class(WC_LOADSAVE);
|
||||
|
|
|
@ -540,7 +540,7 @@ static void window_new_ride_refresh_widget_sizing(rct_window *w)
|
|||
window_new_ride_widgets[WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP].type = WWT_GROUPBOX;
|
||||
window_new_ride_widgets[WIDX_LAST_DEVELOPMENT_GROUP].type = WWT_GROUPBOX;
|
||||
window_new_ride_widgets[WIDX_LAST_DEVELOPMENT_BUTTON].type = WWT_FLATBTN;
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY))
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY))
|
||||
window_new_ride_widgets[WIDX_RESEARCH_FUNDING_BUTTON].type = WWT_FLATBTN;
|
||||
|
||||
width = 300;
|
||||
|
@ -907,7 +907,7 @@ static void window_new_ride_paint_ride_information(rct_window *w, rct_drawpixeli
|
|||
}
|
||||
|
||||
// Price
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) {
|
||||
// Get price of ride
|
||||
int unk2 = RCT2_GLOBAL(0x0097CC68 + (item.type * 2), uint8);
|
||||
money32 price = RideTrackCosts[item.type].track_price;
|
||||
|
|
|
@ -734,7 +734,7 @@ static void window_options_mouseup(rct_window *w, int widgetIndex)
|
|||
break;
|
||||
case WIDX_REAL_NAME_CHECKBOX:
|
||||
peep_update_names(
|
||||
!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_SHOW_REAL_GUEST_NAMES)
|
||||
!(gParkFlags & PARK_FLAGS_SHOW_REAL_GUEST_NAMES)
|
||||
);
|
||||
break;
|
||||
case WIDX_SAVE_PLUGIN_DATA_CHECKBOX:
|
||||
|
@ -1503,7 +1503,7 @@ static void window_options_invalidate(rct_window *w)
|
|||
|
||||
case WINDOW_OPTIONS_PAGE_MISC:
|
||||
// unknown park flag can disable real name checkbox
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_LOCK_REAL_NAMES_OPTION)
|
||||
if (gParkFlags & PARK_FLAGS_LOCK_REAL_NAMES_OPTION)
|
||||
w->disabled_widgets |= (1ULL << WIDX_REAL_NAME_CHECKBOX);
|
||||
|
||||
// save plugin data checkbox: visible or not
|
||||
|
@ -1512,7 +1512,7 @@ static void window_options_invalidate(rct_window *w)
|
|||
else
|
||||
window_options_misc_widgets[WIDX_SAVE_PLUGIN_DATA_CHECKBOX].type = WWT_CHECKBOX;
|
||||
|
||||
widget_set_checkbox_value(w, WIDX_REAL_NAME_CHECKBOX, RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_SHOW_REAL_GUEST_NAMES);
|
||||
widget_set_checkbox_value(w, WIDX_REAL_NAME_CHECKBOX, gParkFlags & PARK_FLAGS_SHOW_REAL_GUEST_NAMES);
|
||||
widget_set_checkbox_value(w, WIDX_SAVE_PLUGIN_DATA_CHECKBOX, gConfigGeneral.save_plugin_data);
|
||||
widget_set_checkbox_value(w, WIDX_TEST_UNFINISHED_TRACKS, gConfigGeneral.test_unfinished_tracks);
|
||||
widget_set_checkbox_value(w, WIDX_AUTO_STAFF_PLACEMENT, gConfigGeneral.auto_staff_placement);
|
||||
|
|
|
@ -571,7 +571,7 @@ rct_window *window_park_open()
|
|||
static void window_park_set_disabled_tabs(rct_window *w)
|
||||
{
|
||||
// Disable price tab if money is disabled
|
||||
w->disabled_widgets = (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) ? (1 << WIDX_TAB_4) : 0;
|
||||
w->disabled_widgets = (gParkFlags & PARK_FLAGS_NO_MONEY) ? (1 << WIDX_TAB_4) : 0;
|
||||
}
|
||||
|
||||
static void window_park_prepare_window_title_text()
|
||||
|
@ -958,13 +958,13 @@ static void window_park_entrance_invalidate(rct_window *w)
|
|||
// Only allow closing of park for guest / rating objective
|
||||
// Only allow closing of park when there is money
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_TYPE, uint8) == OBJECTIVE_GUESTS_AND_RATING ||
|
||||
(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY))
|
||||
(gParkFlags & PARK_FLAGS_NO_MONEY))
|
||||
w->disabled_widgets |= (1 << WIDX_OPEN_OR_CLOSE) | (1 << WIDX_CLOSE_LIGHT) | (1 << WIDX_OPEN_LIGHT);
|
||||
else
|
||||
w->disabled_widgets &= ~((1 << WIDX_OPEN_OR_CLOSE) | (1 << WIDX_CLOSE_LIGHT) | (1 << WIDX_OPEN_LIGHT));
|
||||
|
||||
// Only allow purchase of land when there is money
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY)
|
||||
window_park_entrance_widgets[WIDX_BUY_LAND_RIGHTS].type = WWT_EMPTY;
|
||||
else
|
||||
window_park_entrance_widgets[WIDX_BUY_LAND_RIGHTS].type = WWT_FLATBTN;
|
||||
|
@ -1458,7 +1458,7 @@ static void window_park_price_invalidate(rct_window *w)
|
|||
window_park_prepare_window_title_text();
|
||||
|
||||
// If the entry price is locked at free, disable the widget, unless the unlock_all_prices cheat is active.
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY)
|
||||
if ((gParkFlags & PARK_FLAGS_PARK_FREE_ENTRY)
|
||||
&& (!gCheatsUnlockAllPrices)) {
|
||||
window_park_price_widgets[WIDX_PRICE].type = WWT_12;
|
||||
window_park_price_widgets[WIDX_INCREASE_PRICE].type = WWT_EMPTY;
|
||||
|
@ -1724,7 +1724,7 @@ static void window_park_objective_invalidate(rct_window *w)
|
|||
window_park_prepare_window_title_text();
|
||||
|
||||
//
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT)
|
||||
if (gParkFlags & PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT)
|
||||
window_park_objective_widgets[WIDX_ENTER_NAME].type = WWT_DROPDOWN_BUTTON;
|
||||
else
|
||||
window_park_objective_widgets[WIDX_ENTER_NAME].type = WWT_EMPTY;
|
||||
|
|
|
@ -508,7 +508,7 @@ static void window_research_funding_invalidate(rct_window *w)
|
|||
|
||||
window_research_set_pressed_tab(w);
|
||||
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) ||
|
||||
if ((gParkFlags & PARK_FLAGS_NO_MONEY) ||
|
||||
(RCT2_GLOBAL(RCT2_ADDRESS_RESEARH_PROGRESS_STAGE, uint8) == RESEARCH_STAGE_FINISHED_ALL)) {
|
||||
//window_research_funding_widgets[WIDX_FUNDING_GROUP].type = WWT_EMPTY;
|
||||
window_research_funding_widgets[WIDX_RESEARCH_FUNDING].type = WWT_EMPTY;
|
||||
|
@ -560,7 +560,7 @@ static void window_research_funding_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
|
||||
void window_research_funding_page_paint(rct_window *w, rct_drawpixelinfo *dpi, int baseWidgetIndex)
|
||||
{
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY)
|
||||
return;
|
||||
|
||||
int currentResearchLevel = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_RESEARCH_LEVEL, uint8);
|
||||
|
|
|
@ -1160,7 +1160,7 @@ void window_ride_disable_tabs(rct_window *w)
|
|||
|
||||
if (ride_type == RIDE_TYPE_CASH_MACHINE ||
|
||||
ride_type == RIDE_TYPE_FIRST_AID ||
|
||||
(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) != 0)
|
||||
(gParkFlags & PARK_FLAGS_NO_MONEY) != 0)
|
||||
disabled_tabs |= (1 << WIDX_TAB_9); // 0x1000
|
||||
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint32) & SCREEN_FLAGS_TRACK_DESIGNER) != 0)
|
||||
|
@ -5563,7 +5563,7 @@ static void window_ride_income_increase_primary_price(rct_window *w)
|
|||
ride = get_ride(w->number);
|
||||
ride_type = get_ride_entry(ride->subtype);
|
||||
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY) == 0) {
|
||||
if ((gParkFlags & PARK_FLAGS_PARK_FREE_ENTRY) == 0) {
|
||||
if (ride->type != RIDE_TYPE_TOILETS && ride_type->shop_item == 0xFF) {
|
||||
if (!gCheatsUnlockAllPrices)
|
||||
return;
|
||||
|
@ -5588,7 +5588,7 @@ static void window_ride_income_decrease_primary_price(rct_window *w)
|
|||
ride = get_ride(w->number);
|
||||
ride_type = get_ride_entry(ride->subtype);
|
||||
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY) == 0) {
|
||||
if ((gParkFlags & PARK_FLAGS_PARK_FREE_ENTRY) == 0) {
|
||||
if (ride->type != RIDE_TYPE_TOILETS && ride_type->shop_item == 0xFF) {
|
||||
if (!gCheatsUnlockAllPrices)
|
||||
return;
|
||||
|
@ -5752,7 +5752,7 @@ static void window_ride_income_invalidate(rct_window *w)
|
|||
w->disabled_widgets &= ~(1 << WIDX_PRIMARY_PRICE);
|
||||
|
||||
//If the park doesn't have free entry, lock the admission price, unless the cheat to unlock all prices is activated.
|
||||
if ((!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_FREE_ENTRY) && rideEntry->shop_item == 255 && ride->type != RIDE_TYPE_TOILETS)
|
||||
if ((!(gParkFlags & PARK_FLAGS_PARK_FREE_ENTRY) && rideEntry->shop_item == 255 && ride->type != RIDE_TYPE_TOILETS)
|
||||
&& (!gCheatsUnlockAllPrices))
|
||||
{
|
||||
w->disabled_widgets |= (1 << WIDX_PRIMARY_PRICE);
|
||||
|
|
|
@ -2171,7 +2171,7 @@ static void window_ride_construction_paint(rct_window *w, rct_drawpixelinfo *dpi
|
|||
y += 11;
|
||||
if (
|
||||
_currentTrackPrice != MONEY32_UNDEFINED &&
|
||||
!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)
|
||||
!(gParkFlags & PARK_FLAGS_NO_MONEY)
|
||||
) {
|
||||
gfx_draw_string_centred(dpi, 1408, x, y, 0, (void*)&_currentTrackPrice);
|
||||
}
|
||||
|
|
|
@ -297,7 +297,7 @@ static void window_ride_list_mousedown(int widgetIndex, rct_window*w, rct_widget
|
|||
int numItems = 0;
|
||||
int selectedIndex = -1;
|
||||
for (int type = INFORMATION_TYPE_STATUS; type <= lastType; type++) {
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
|
||||
if ((gParkFlags & PARK_FLAGS_NO_MONEY)) {
|
||||
if (ride_info_type_money_mapping[type]) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1039,7 +1039,7 @@ void window_scenery_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = price;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) {
|
||||
// -14
|
||||
gfx_draw_string_right(dpi, STR_COST_LABEL, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0,
|
||||
w->x + w->width - 0x1A, w->y + w->height - 13);
|
||||
|
|
|
@ -1052,7 +1052,7 @@ void window_staff_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
int x = w->x + window_staff_stats_widgets[WIDX_RESIZE].left + 4;
|
||||
int y = w->y + window_staff_stats_widgets[WIDX_RESIZE].top + 4;
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)){
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY)){
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS,uint32) = RCT2_ADDRESS(0x992A00,uint16)[peep->staff_type];
|
||||
gfx_draw_string_left(dpi, 2349, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0,x, y);
|
||||
|
|
|
@ -589,7 +589,7 @@ void window_staff_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
gfx_draw_sprite(&sprite_dpi, i, 0x0F, 0x17, 0);
|
||||
}
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = RCT2_ADDRESS(0x00992A00, uint16)[selectedTab];
|
||||
gfx_draw_string_left(dpi, 1858, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, w->x + w->width - 155, w->y + 0x20);
|
||||
}
|
||||
|
|
|
@ -692,7 +692,7 @@ static void window_top_toolbar_invalidate(rct_window *w)
|
|||
window_top_toolbar_widgets[WIDX_VIEW_MENU].type = WWT_EMPTY;
|
||||
}
|
||||
} else {
|
||||
if ((RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) || !gConfigInterface.toolbar_show_finances)
|
||||
if ((gParkFlags & PARK_FLAGS_NO_MONEY) || !gConfigInterface.toolbar_show_finances)
|
||||
window_top_toolbar_widgets[WIDX_FINANCES].type = WWT_EMPTY;
|
||||
|
||||
if (!gConfigInterface.toolbar_show_research)
|
||||
|
|
|
@ -617,6 +617,6 @@ static void window_track_place_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
|
||||
// Price
|
||||
if (_window_track_place_last_cost != MONEY32_UNDEFINED)
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY))
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY))
|
||||
gfx_draw_string_centred(dpi, STR_COST_LABEL, w->x + 88, w->y + 94, 0, &_window_track_place_last_cost);
|
||||
}
|
||||
|
|
|
@ -205,7 +205,7 @@ static money32 footpath_element_insert(int type, int x, int y, int z, int slope,
|
|||
|
||||
loc_6A6620(flags, x, y, mapElement);
|
||||
}
|
||||
return RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY ? 0 : RCT2_GLOBAL(0x00F3EFD9, money32);
|
||||
return gParkFlags & PARK_FLAGS_NO_MONEY ? 0 : RCT2_GLOBAL(0x00F3EFD9, money32);
|
||||
}
|
||||
|
||||
static money32 footpath_element_update(int x, int y, rct_map_element *mapElement, int type, int flags, uint8 pathItemType)
|
||||
|
@ -221,7 +221,7 @@ static money32 footpath_element_update(int x, int y, rct_map_element *mapElement
|
|||
if (flags & GAME_COMMAND_FLAG_4)
|
||||
return MONEY32_UNDEFINED;
|
||||
|
||||
return RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY ? 0 : RCT2_GLOBAL(0x00F3EFD9, money32);
|
||||
return gParkFlags & PARK_FLAGS_NO_MONEY ? 0 : RCT2_GLOBAL(0x00F3EFD9, money32);
|
||||
}
|
||||
|
||||
if (pathItemType != 0) {
|
||||
|
@ -268,7 +268,7 @@ static money32 footpath_element_update(int x, int y, rct_map_element *mapElement
|
|||
}
|
||||
|
||||
if (!(flags & GAME_COMMAND_FLAG_APPLY))
|
||||
return RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY ? 0 : RCT2_GLOBAL(0x00F3EFD9, money32);
|
||||
return gParkFlags & PARK_FLAGS_NO_MONEY ? 0 : RCT2_GLOBAL(0x00F3EFD9, money32);
|
||||
|
||||
if (
|
||||
(pathItemType != 0 && !(flags & GAME_COMMAND_FLAG_GHOST)) ||
|
||||
|
@ -286,7 +286,7 @@ static money32 footpath_element_update(int x, int y, rct_map_element *mapElement
|
|||
mapElement->properties.path.addition_status = 255;
|
||||
}
|
||||
map_invalidate_tile_full(x, y);
|
||||
return RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY ? 0 : RCT2_GLOBAL(0x00F3EFD9, money32);
|
||||
return gParkFlags & PARK_FLAGS_NO_MONEY ? 0 : RCT2_GLOBAL(0x00F3EFD9, money32);
|
||||
}
|
||||
|
||||
if (flags & GAME_COMMAND_FLAG_4)
|
||||
|
@ -306,7 +306,7 @@ static money32 footpath_element_update(int x, int y, rct_map_element *mapElement
|
|||
loc_6A6620(flags, x, y, mapElement);
|
||||
}
|
||||
|
||||
return RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY ? 0 : RCT2_GLOBAL(0x00F3EFD9, money32);
|
||||
return gParkFlags & PARK_FLAGS_NO_MONEY ? 0 : RCT2_GLOBAL(0x00F3EFD9, money32);
|
||||
}
|
||||
|
||||
static money32 footpath_place_real(int type, int x, int y, int z, int slope, int flags, uint8 pathItemType)
|
||||
|
@ -426,7 +426,7 @@ money32 footpath_remove_real(int x, int y, int z, int flags)
|
|||
sub_6A759F();
|
||||
}
|
||||
|
||||
return (flags & (1 << 5)) || (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) ? 0 : -MONEY(10,00);
|
||||
return (flags & (1 << 5)) || (gParkFlags & PARK_FLAGS_NO_MONEY) ? 0 : -MONEY(10,00);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -535,7 +535,7 @@ static money32 footpath_place_from_track(int type, int x, int y, int z, int slop
|
|||
|
||||
map_invalidate_tile_full(x, y);
|
||||
}
|
||||
return RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY ? 0 : RCT2_GLOBAL(0x00F3EFD9, money32);
|
||||
return gParkFlags & PARK_FLAGS_NO_MONEY ? 0 : RCT2_GLOBAL(0x00F3EFD9, money32);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -733,7 +733,7 @@ void game_command_remove_scenery(int* eax, int* ebx, int* ecx, int* edx, int* es
|
|||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !(flags & GAME_COMMAND_FLAG_GHOST) && !gCheatsSandboxMode) {
|
||||
// Check if allowed to remove item
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_TREE_REMOVAL) {
|
||||
if (gParkFlags & PARK_FLAGS_FORBID_TREE_REMOVAL) {
|
||||
if (entry->small_scenery.height > 64) {
|
||||
gGameCommandErrorText = STR_FORBIDDEN_BY_THE_LOCAL_AUTHORITY;
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
|
@ -782,7 +782,7 @@ void game_command_remove_scenery(int* eax, int* ebx, int* ecx, int* edx, int* es
|
|||
map_invalidate_tile_full(x, y);
|
||||
map_element_remove(map_element);
|
||||
}
|
||||
*ebx = (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY ? 0 : cost);
|
||||
*ebx = (gParkFlags & PARK_FLAGS_NO_MONEY ? 0 : cost);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -929,7 +929,7 @@ void game_command_remove_large_scenery(int* eax, int* ebx, int* ecx, int* edx, i
|
|||
}
|
||||
|
||||
*ebx = scenery_entry->large_scenery.removal_price * 10;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY ||
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY ||
|
||||
calculate_cost == false){
|
||||
*ebx = 0;
|
||||
}
|
||||
|
@ -991,7 +991,7 @@ void game_command_remove_banner(int* eax, int* ebx, int* ecx, int* edx, int* esi
|
|||
|
||||
*ebx = (scenery_entry->banner.price * -3) / 4;
|
||||
|
||||
if(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY){
|
||||
if(gParkFlags & PARK_FLAGS_NO_MONEY){
|
||||
*ebx = 0;
|
||||
}
|
||||
}
|
||||
|
@ -1457,12 +1457,12 @@ money32 map_change_surface_style(int x0, int y0, int x1, int y1, uint8 surfaceSt
|
|||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) != 0 && !gCheatsBuildInPauseMode) {
|
||||
cost += RCT2_GLOBAL(0x009E32B4, uint32);
|
||||
return (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) ? 0 : cost;
|
||||
return (gParkFlags & PARK_FLAGS_NO_MONEY) ? 0 : cost;
|
||||
}
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES) {
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && gParkFlags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES) {
|
||||
cost += RCT2_GLOBAL(0x009E32B4, uint32);
|
||||
return (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) ? 0 : cost;
|
||||
return (gParkFlags & PARK_FLAGS_NO_MONEY) ? 0 : cost;
|
||||
}
|
||||
|
||||
for (int x = x0; x <= x1; x += 32) {
|
||||
|
@ -1544,7 +1544,7 @@ money32 map_change_surface_style(int x0, int y0, int x1, int y1, uint8 surfaceSt
|
|||
|
||||
cost *= 100;
|
||||
cost += RCT2_GLOBAL(0x009E32B4, uint32);
|
||||
return (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY) ? 0 : cost;
|
||||
return (gParkFlags & PARK_FLAGS_NO_MONEY) ? 0 : cost;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1606,7 +1606,7 @@ static money32 map_set_land_height(int flags, int x, int y, int height, int styl
|
|||
}
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode) {
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES) {
|
||||
if (gParkFlags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES) {
|
||||
gGameCommandErrorText = STR_FORBIDDEN_BY_THE_LOCAL_AUTHORITY;
|
||||
return MONEY32_UNDEFINED;
|
||||
}
|
||||
|
@ -1661,7 +1661,7 @@ static money32 map_set_land_height(int flags, int x, int y, int height, int styl
|
|||
if (height + 4 < mapElement->base_height)
|
||||
continue;
|
||||
rct_scenery_entry *sceneryEntry = g_smallSceneryEntries[mapElement->properties.scenery.type]; //sceneryEntry = eax
|
||||
if (sceneryEntry->small_scenery.height > 64 && RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_TREE_REMOVAL)
|
||||
if (sceneryEntry->small_scenery.height > 64 && gParkFlags & PARK_FLAGS_FORBID_TREE_REMOVAL)
|
||||
{
|
||||
map_obstruction_set_error_text(mapElement);
|
||||
return MONEY32_UNDEFINED;
|
||||
|
@ -1782,7 +1782,7 @@ static money32 map_set_land_height(int flags, int x, int y, int height, int styl
|
|||
surfaceElement->properties.surface.terrain &= MAP_ELEMENT_SURFACE_TERRAIN_MASK;
|
||||
map_invalidate_tile_full(x, y);
|
||||
}
|
||||
if(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)
|
||||
if(gParkFlags & PARK_FLAGS_NO_MONEY)
|
||||
return 0;
|
||||
return RCT2_GLOBAL(0x9E2E18, money32);
|
||||
}
|
||||
|
@ -2574,7 +2574,7 @@ void game_command_set_water_height(int* eax, int* ebx, int* ecx, int* edx, int*
|
|||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
}
|
||||
if(!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES){
|
||||
if(!(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR) && !gCheatsSandboxMode && gParkFlags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES){
|
||||
gGameCommandErrorText = STR_FORBIDDEN_BY_THE_LOCAL_AUTHORITY;
|
||||
*ebx = MONEY32_UNDEFINED;
|
||||
return;
|
||||
|
@ -2637,7 +2637,7 @@ void game_command_set_water_height(int* eax, int* ebx, int* ecx, int* edx, int*
|
|||
map_invalidate_tile_full(x, y);
|
||||
}
|
||||
*ebx = 250;
|
||||
if(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY){
|
||||
if(gParkFlags & PARK_FLAGS_NO_MONEY){
|
||||
*ebx = 0;
|
||||
}
|
||||
}else{
|
||||
|
@ -2812,7 +2812,7 @@ void game_command_place_banner(int* eax, int* ebx, int* ecx, int* edx, int* esi,
|
|||
}
|
||||
rct_scenery_entry *scenery_entry = (rct_scenery_entry*)object_entry_groups[OBJECT_TYPE_BANNERS].chunks[type];
|
||||
*ebx = scenery_entry->banner.price;
|
||||
if(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY){
|
||||
if(gParkFlags & PARK_FLAGS_NO_MONEY){
|
||||
*ebx = 0;
|
||||
}
|
||||
}
|
||||
|
@ -2830,12 +2830,12 @@ int map_place_scenery_clear_func(rct_map_element** map_element, int x, int y, ui
|
|||
|
||||
rct_scenery_entry* scenery = g_smallSceneryEntries[(*map_element)->properties.scenery.type];
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_TREE_REMOVAL) {
|
||||
if (gParkFlags & PARK_FLAGS_FORBID_TREE_REMOVAL) {
|
||||
if (scenery->small_scenery.height > 64)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY))
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY))
|
||||
*price += scenery->small_scenery.removal_price * 10;
|
||||
|
||||
if (flags & GAME_COMMAND_FLAG_GHOST)
|
||||
|
@ -2862,12 +2862,12 @@ int map_place_non_scenery_clear_func(rct_map_element** map_element, int x, int y
|
|||
|
||||
rct_scenery_entry* scenery = g_smallSceneryEntries[(*map_element)->properties.scenery.type];
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_TREE_REMOVAL) {
|
||||
if (gParkFlags & PARK_FLAGS_FORBID_TREE_REMOVAL) {
|
||||
if (scenery->small_scenery.height > 64)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY))
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY))
|
||||
*price += scenery->small_scenery.removal_price * 10;
|
||||
|
||||
if (flags & GAME_COMMAND_FLAG_GHOST)
|
||||
|
@ -3055,7 +3055,7 @@ void game_command_place_scenery(int* eax, int* ebx, int* ecx, int* edx, int* esi
|
|||
}
|
||||
}
|
||||
*ebx = (scenery_entry->small_scenery.price * 10) + RCT2_GLOBAL(0x00F64F26, money32);
|
||||
if(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY){
|
||||
if(gParkFlags & PARK_FLAGS_NO_MONEY){
|
||||
*ebx = 0;
|
||||
}
|
||||
return;
|
||||
|
@ -3502,7 +3502,7 @@ void game_command_place_fence(int* eax, int* ebx, int* ecx, int* edx, int* esi,
|
|||
map_invalidate_tile_zoom1(position.x, position.y, map_element->base_height * 8, map_element->base_height * 8 + 72);
|
||||
}
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY){
|
||||
if (gParkFlags & PARK_FLAGS_NO_MONEY){
|
||||
*ebx = 0;
|
||||
}
|
||||
else{
|
||||
|
@ -3752,7 +3752,7 @@ void game_command_place_large_scenery(int* eax, int* ebx, int* ecx, int* edx, in
|
|||
_currentTrackSelectionFlags |= 8;
|
||||
|
||||
*ebx = (scenery_entry->large_scenery.price * 10) + RCT2_GLOBAL(0x00F4389A, money32);
|
||||
if(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY){
|
||||
if(gParkFlags & PARK_FLAGS_NO_MONEY){
|
||||
*ebx = 0;
|
||||
}
|
||||
}
|
||||
|
@ -4104,7 +4104,7 @@ int map_can_construct_with_clear_at(int x, int y, int zLow, int zHigh, CLEAR_FUN
|
|||
}
|
||||
}
|
||||
loc_68B9B7:
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_FORBID_HIGH_CONSTRUCTION) {
|
||||
if (gParkFlags & PARK_FLAGS_FORBID_HIGH_CONSTRUCTION) {
|
||||
int al = zHigh - map_element->base_height;
|
||||
if (al >= 0) {
|
||||
if (al > 18) {
|
||||
|
|
|
@ -59,7 +59,7 @@ int _guestGenerationProbability;
|
|||
|
||||
int park_is_open()
|
||||
{
|
||||
return (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_OPEN) != 0;
|
||||
return (gParkFlags & PARK_FLAGS_PARK_OPEN) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -112,7 +112,7 @@ void park_init()
|
|||
RCT2_GLOBAL(RCT2_ADDRESS_LAND_COST, uint16) = MONEY(90, 00);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CONSTRUCTION_RIGHTS_COST, uint16) = MONEY(40,00);
|
||||
RCT2_GLOBAL(0x01358774, uint16) = 0;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) = PARK_FLAGS_NO_MONEY | PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
|
||||
gParkFlags = PARK_FLAGS_NO_MONEY | PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
|
||||
park_reset_history();
|
||||
finance_reset_history();
|
||||
award_reset();
|
||||
|
@ -173,7 +173,7 @@ int calculate_park_rating()
|
|||
int result;
|
||||
|
||||
result = 1150;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_DIFFICULT_PARK_RATING)
|
||||
if (gParkFlags & PARK_FLAGS_DIFFICULT_PARK_RATING)
|
||||
result = 1050;
|
||||
|
||||
// Guests
|
||||
|
@ -379,7 +379,7 @@ static int park_calculate_guest_generation_probability()
|
|||
}
|
||||
|
||||
// If difficult guest generation, extra guests are available for good rides
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) {
|
||||
if (gParkFlags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) {
|
||||
suggestedMaxGuests = min(suggestedMaxGuests, 1000);
|
||||
FOR_ALL_RIDES(i, ride) {
|
||||
if (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)
|
||||
|
@ -416,7 +416,7 @@ static int park_calculate_guest_generation_probability()
|
|||
probability /= 4;
|
||||
|
||||
// Even lower for difficult guest generation
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_DIFFICULT_GUEST_GENERATION)
|
||||
if (gParkFlags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION)
|
||||
probability /= 4;
|
||||
}
|
||||
|
||||
|
@ -425,7 +425,7 @@ static int park_calculate_guest_generation_probability()
|
|||
probability /= 4;
|
||||
|
||||
// Check if money is enabled
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
|
||||
if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) {
|
||||
// Penalty for overpriced entrance fee relative to total ride value
|
||||
money16 entranceFee = RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_FEE, money16);
|
||||
if (entranceFee > totalRideValue) {
|
||||
|
@ -508,7 +508,7 @@ static void park_generate_new_guests()
|
|||
{
|
||||
// Generate a new guest for some probability
|
||||
if ((int)(scenario_rand() & 0xFFFF) < _guestGenerationProbability) {
|
||||
int difficultGeneration = (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) != 0;
|
||||
int difficultGeneration = (gParkFlags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) != 0;
|
||||
if (!difficultGeneration || _suggestedGuestMaximum + 150 >= RCT2_GLOBAL(RCT2_ADDRESS_GUESTS_IN_PARK, uint16))
|
||||
park_generate_new_guest();
|
||||
}
|
||||
|
@ -669,14 +669,14 @@ void game_command_set_park_open(int* eax, int* ebx, int* ecx, int* edx, int* esi
|
|||
RCT2_GLOBAL(RCT2_ADDRESS_NEXT_EXPENDITURE_TYPE, uint8) = RCT_EXPENDITURE_TYPE_PARK_ENTRANCE_TICKETS * 4;
|
||||
switch (dh) {
|
||||
case 0:
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_OPEN) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_PARK_OPEN;
|
||||
if (gParkFlags & PARK_FLAGS_PARK_OPEN) {
|
||||
gParkFlags &= ~PARK_FLAGS_PARK_OPEN;
|
||||
window_invalidate_by_class(WC_PARK_INFORMATION);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_PARK_OPEN)) {
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) |= PARK_FLAGS_PARK_OPEN;
|
||||
if (!(gParkFlags & PARK_FLAGS_PARK_OPEN)) {
|
||||
gParkFlags |= PARK_FLAGS_PARK_OPEN;
|
||||
window_invalidate_by_class(WC_PARK_INFORMATION);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -47,6 +47,8 @@ enum {
|
|||
PARK_FLAGS_SIX_FLAGS_DEPRECATED = (1 << 19) // Not used anymore
|
||||
};
|
||||
|
||||
#define gParkFlags RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32)
|
||||
|
||||
extern uint8 *gParkRatingHistory;
|
||||
extern uint8 *gGuestsInParkHistory;
|
||||
extern int _guestGenerationProbability;
|
||||
|
|
Loading…
Reference in New Issue