From 68d7f840988960b3f75e935fdfffae67e02620b2 Mon Sep 17 00:00:00 2001 From: zsilencer Date: Wed, 15 Apr 2015 17:30:18 -0600 Subject: [PATCH] rename 0x80000000 to MONEY32_UNDEFINED --- src/game.c | 10 +++++----- src/peep/staff.c | 8 ++++---- src/ride/ride.c | 10 +++++----- src/ride/track.c | 4 ++-- src/scenario.c | 4 ++-- src/windows/clear_scenery.c | 4 ++-- src/windows/finances.c | 6 +++--- src/windows/ride_construction.c | 6 +++--- src/windows/scenery.c | 8 ++++---- src/windows/top_toolbar.c | 18 +++++++++--------- src/world/map.c | 24 ++++++++++++------------ 11 files changed, 51 insertions(+), 51 deletions(-) diff --git a/src/game.c b/src/game.c index a7d0d69c87..2c3073d104 100644 --- a/src/game.c +++ b/src/game.c @@ -358,7 +358,7 @@ static int game_check_affordability(int cost) } RCT2_GLOBAL(0x13CE952, uint32) = cost; RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = 827; - return 0x80000000; + return MONEY32_UNDEFINED; } static uint32 game_do_command_table[58]; @@ -411,13 +411,13 @@ int game_do_command_p(int command, int *eax, int *ebx, int *ecx, int *edx, int * } cost = *ebx; - if (cost != 0x80000000) { + if (cost != MONEY32_UNDEFINED) { // Check funds insufficientFunds = 0; if (RCT2_GLOBAL(0x009A8C28, uint8) == 1 && !(flags & 4) && !(flags & 0x20) && cost != 0) insufficientFunds = game_check_affordability(cost); - if (insufficientFunds != 0x80000000) { + if (insufficientFunds != MONEY32_UNDEFINED) { *ebx = original_ebx; *edx = original_edx; *esi = original_esi; @@ -438,7 +438,7 @@ int game_do_command_p(int command, int *eax, int *ebx, int *ecx, int *edx, int * } *edx = *ebx; - if (*edx != 0x80000000 && *edx < cost) + if (*edx != MONEY32_UNDEFINED && *edx < cost) cost = *edx; // Decrement nest count @@ -470,7 +470,7 @@ int game_do_command_p(int command, int *eax, int *ebx, int *ecx, int *edx, int * if (RCT2_GLOBAL(0x009A8C28, uint8) == 0 && (flags & 1) && RCT2_GLOBAL(0x0141F568, uint8) == RCT2_GLOBAL(0x013CA740, uint8) && !(flags & 8)) window_error_open(RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TITLE, uint16), RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16)); - return 0x80000000; + return MONEY32_UNDEFINED; } void pause_toggle() diff --git a/src/peep/staff.c b/src/peep/staff.c index 25c9eaa181..16fe6f79b2 100644 --- a/src/peep/staff.c +++ b/src/peep/staff.c @@ -70,7 +70,7 @@ void game_command_hire_new_staff_member(int* eax, int* ebx, int* ecx, int* edx, RCT2_GLOBAL(0x009DEA62, uint16) = _dx; if (RCT2_GLOBAL(0x13573C8, uint16) < 0x190) { - *ebx = 0x80000000; + *ebx = MONEY32_UNDEFINED; RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_TOO_MANY_PEOPLE_IN_GAME; return; } @@ -82,7 +82,7 @@ void game_command_hire_new_staff_member(int* eax, int* ebx, int* ecx, int* edx, } if (i == STAFF_MAX_COUNT) { - *ebx = 0x80000000; + *ebx = MONEY32_UNDEFINED; RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_TOO_MANY_STAFF_IN_GAME; return; } @@ -96,7 +96,7 @@ void game_command_hire_new_staff_member(int* eax, int* ebx, int* ecx, int* edx, if (newPeep == NULL) { - *ebx = 0x80000000; + *ebx = MONEY32_UNDEFINED; RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_TOO_MANY_PEOPLE_IN_GAME; return; } @@ -322,7 +322,7 @@ uint16 hire_new_staff_member(uint8 staffType) int result = game_do_command_p(GAME_COMMAND_HIRE_NEW_STAFF_MEMBER, &eax, &ebx, &ecx, &edx, &esi, &edi, &ebp); - if (result == 0x80000000) + if (result == MONEY32_UNDEFINED) return 0xFFFF; return edi; diff --git a/src/ride/ride.c b/src/ride/ride.c index 21059f071b..a5b6147d55 100644 --- a/src/ride/ride.c +++ b/src/ride/ride.c @@ -558,7 +558,7 @@ int ride_create_ride(ride_list_item listItem) esi = GAME_COMMAND_6; game_do_command_p(esi, &eax, &ebx, &ecx, &edx, &esi, &edi, &ebp); - return ebx == 0x80000000 ? -1 : edi; + return ebx == MONEY32_UNDEFINED ? -1 : edi; } /** @@ -2783,13 +2783,13 @@ void game_command_set_ride_setting(int *eax, int *ebx, int *ecx, int *edx, int * if (setting == 0){ if (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN){ RCT2_GLOBAL(0x141E9AC, uint16) = 1796; - *ebx = 0x80000000; + *ebx = MONEY32_UNDEFINED; return; } if (ride->status != RIDE_STATUS_CLOSED){ RCT2_GLOBAL(0x141E9AC, uint16) = 1006; - *ebx = 0x80000000; + *ebx = MONEY32_UNDEFINED; return; } } @@ -2798,7 +2798,7 @@ void game_command_set_ride_setting(int *eax, int *ebx, int *ecx, int *edx, int * if (setting == 0 || setting == 4 || setting == 8 || setting == 9) { RCT2_GLOBAL(0x141E9AC, uint16) = 1797; - *ebx = 0x80000000; + *ebx = MONEY32_UNDEFINED; return; } } @@ -2807,7 +2807,7 @@ void game_command_set_ride_setting(int *eax, int *ebx, int *ecx, int *edx, int * ride->lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT && new_value > 1){ RCT2_GLOBAL(0x141E9AC, uint16) = 3141; - *ebx = 0x80000000; + *ebx = MONEY32_UNDEFINED; return; } diff --git a/src/ride/track.c b/src/ride/track.c index 27c128ef40..d9d4f2f96e 100644 --- a/src/ride/track.c +++ b/src/ride/track.c @@ -784,7 +784,7 @@ int sub_6D2189(int* cost, uint8* ride_id){ edx = track_design->type | (entry_index << 8); esi = GAME_COMMAND_6; - if (0x80000000 == game_do_command_p(GAME_COMMAND_6, &eax, &ebx, &ecx, &edx, &esi, &edi, &ebp)) return 1; + if (MONEY32_UNDEFINED == game_do_command_p(GAME_COMMAND_6, &eax, &ebx, &ecx, &edx, &esi, &edi, &ebp)) return 1; // bh *ride_id = edi & 0xFF; @@ -840,7 +840,7 @@ int sub_6D2189(int* cost, uint8* ride_id){ edi = sub_6D01B3((*ride_id << 8) | bl, map_size, map_size, z); RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) = backup_park_flags; - if (edi != 0x80000000){ + if (edi != MONEY32_UNDEFINED){ if (!find_object_in_entry_group(&track_design->vehicle_object, &entry_type, &entry_index)){ RCT2_GLOBAL(0xF44151, uint8) |= 4; diff --git a/src/scenario.c b/src/scenario.c index 44c9ab020e..836002e88e 100644 --- a/src/scenario.c +++ b/src/scenario.c @@ -314,7 +314,7 @@ int scenario_load_and_play_from_path(const char *path) RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_PROFIT, money32) = 0; RCT2_GLOBAL(0x01358334, money32) = 0; RCT2_GLOBAL(0x01358338, uint16) = 0; - RCT2_GLOBAL(RCT2_ADDRESS_COMPLETED_COMPANY_VALUE, uint32) = 0x80000000; + RCT2_GLOBAL(RCT2_ADDRESS_COMPLETED_COMPANY_VALUE, uint32) = MONEY32_UNDEFINED; RCT2_GLOBAL(RCT2_ADDRESS_TOTAL_ADMISSIONS, uint32) = 0; RCT2_GLOBAL(RCT2_ADDRESS_INCOME_FROM_ADMISSIONS, uint32) = 0; RCT2_GLOBAL(0x013587D8, uint16) = 63; @@ -517,7 +517,7 @@ void scenario_objectives_check() park_value = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_PARK_VALUE, sint32); - if ( scenario_completed_company_value != 0x80000000) + if ( scenario_completed_company_value != MONEY32_UNDEFINED) return; switch (objective_type) { diff --git a/src/windows/clear_scenery.c b/src/windows/clear_scenery.c index 9c5b514f56..3a93c30365 100644 --- a/src/windows/clear_scenery.c +++ b/src/windows/clear_scenery.c @@ -103,7 +103,7 @@ void window_clear_scenery_open() window_init_scroll_widgets(window); window_push_others_below(window); - RCT2_GLOBAL(0x00F1AD62, uint32) = 0x80000000; + RCT2_GLOBAL(0x00F1AD62, uint32) = MONEY32_UNDEFINED; window->colours[0] = 24; window->colours[1] = 24; window->colours[2] = 24; @@ -209,7 +209,7 @@ static void window_clear_scenery_paint() // Draw cost amount x = (window_clear_scenery_widgets[WIDX_PREVIEW].left + window_clear_scenery_widgets[WIDX_PREVIEW].right) / 2 + w->x; y = window_clear_scenery_widgets[WIDX_PREVIEW].bottom + w->y + 5; - if (RCT2_GLOBAL(0x00F1AD62, uint32) != 0x80000000 && RCT2_GLOBAL(0x00F1AD62, uint32) != 0) + if (RCT2_GLOBAL(0x00F1AD62, uint32) != MONEY32_UNDEFINED && RCT2_GLOBAL(0x00F1AD62, uint32) != 0) gfx_draw_string_centred(dpi, 986, x, y, 0, (void*)0x00F1AD62); } diff --git a/src/windows/finances.c b/src/windows/finances.c index ec42a904f5..5ba64652ef 100644 --- a/src/windows/finances.c +++ b/src/windows/finances.c @@ -865,7 +865,7 @@ static void window_finances_financial_graph_paint() money32 *balanceHistory = RCT2_ADDRESS(RCT2_ADDRESS_BALANCE_HISTORY, money32); for (i = 0; i < 64; i++) { money32 balance = balanceHistory[i]; - if (balance == 0x80000000) + if (balance == MONEY32_UNDEFINED) continue; // Modifier balance then keep halfing until less than 127 pixels @@ -983,7 +983,7 @@ static void window_finances_park_value_graph_paint() money32 *parkValueHistory = RCT2_ADDRESS(RCT2_ADDRESS_PARK_VALUE_HISTORY, money32); for (i = 0; i < 64; i++) { money32 balance = parkValueHistory[i]; - if (balance == 0x80000000) + if (balance == MONEY32_UNDEFINED) continue; // Modifier balance then keep halfing until less than 255 pixels @@ -1101,7 +1101,7 @@ static void window_finances_profit_graph_paint() money32 *weeklyProfitHistory = RCT2_ADDRESS(RCT2_ADDRESS_WEEKLY_PROFIT_HISTORY, money32); for (i = 0; i < 64; i++) { money32 balance = weeklyProfitHistory[i]; - if (balance == 0x80000000) + if (balance == MONEY32_UNDEFINED) continue; // Modifier balance then keep halfing until less than 127 pixels diff --git a/src/windows/ride_construction.c b/src/windows/ride_construction.c index 33c1ee1b02..4486c5a9a5 100644 --- a/src/windows/ride_construction.c +++ b/src/windows/ride_construction.c @@ -169,7 +169,7 @@ rct_window *window_construction_open() window_push_others_right(w); show_gridlines(); - RCT2_GLOBAL(0xF44070, uint32) = 0x80000000; + RCT2_GLOBAL(0xF44070, uint32) = MONEY32_UNDEFINED; RCT2_GLOBAL(0xF440CD, uint8) = 8; RCT2_GLOBAL(0xF440CE, uint8) = 18; RCT2_GLOBAL(0xF440CF, uint8) = 4; @@ -307,7 +307,7 @@ void window_construction_mouseup_demolish(rct_window* w){ RCT2_CALLPROC_X(0x6C9BA5, 0, 0, 0, 0, (int)w, 0, 0); return; - RCT2_GLOBAL(0xF44070, uint32) = 0x80000000; + RCT2_GLOBAL(0xF44070, uint32) = MONEY32_UNDEFINED; sub_6C9627(); RCT2_GLOBAL(0xF440B8, uint8) = 3; @@ -440,7 +440,7 @@ void window_construction_paint() short string_y = RCT2_GLOBAL(0x9D7C08, int16_t) + w->y - 23; if (RCT2_GLOBAL(0xF440A6, uint8_t) != 4) gfx_draw_string_centred(dpi, 1407, string_x, string_y, 0, w); string_y += 11; - if (RCT2_GLOBAL(0xF44070, uint32_t) != 0x80000000 && !(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32_t) & 0x800)) + if (RCT2_GLOBAL(0xF44070, uint32_t) != MONEY32_UNDEFINED && !(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32_t) & 0x800)) gfx_draw_string_centred(dpi, 1408, string_x, string_y, 0, (void*)0xF44070); } diff --git a/src/windows/scenery.c b/src/windows/scenery.c index 228e94b200..06b9e9e984 100644 --- a/src/windows/scenery.c +++ b/src/windows/scenery.c @@ -464,7 +464,7 @@ void window_scenery_open() window->scenery.hover_counter = 0; window_push_others_below(window); RCT2_GLOBAL(0x00F64F0D, uint8) = 0; - RCT2_GLOBAL(0x00F64EB4, uint32) = 0x80000000; + RCT2_GLOBAL(0x00F64EB4, uint32) = MONEY32_UNDEFINED; RCT2_GLOBAL(0x00F64EC0, uint16) = 0; window_scenery_is_repaint_scenery_tool_on = 0; // repaint colored scenery tool state window_scenery_is_build_cluster_tool_on = 0; // build cluster tool state @@ -643,7 +643,7 @@ static void window_scenery_mousedown(int widgetIndex, rct_window* w, rct_widget* if (widgetIndex >= WIDX_SCENERY_TAB_1 && widgetIndex <= WIDX_SCENERY_TAB_20) { window_scenery_active_tab_index = widgetIndex - WIDX_SCENERY_TAB_1; window_invalidate(w); - RCT2_GLOBAL(0x00F64EB4, uint32) = 0x80000000; + RCT2_GLOBAL(0x00F64EB4, uint32) = MONEY32_UNDEFINED; window_scenery_update_scroll(w); } } @@ -817,7 +817,7 @@ void window_scenery_scrollmousedown() window_scenery_is_repaint_scenery_tool_on &= 0xFE; sound_play_panned(4, (w->width >> 1) + w->x, 0, 0, 0); w->scenery.hover_counter = -16; - RCT2_GLOBAL(0x00F64EB4, uint32) = 0x80000000; + RCT2_GLOBAL(0x00F64EB4, uint32) = MONEY32_UNDEFINED; window_invalidate(w); } @@ -1057,7 +1057,7 @@ void window_scenery_paint() price = sceneryEntry->small_scenery.price * 10; } - if (w->scenery.selected_scenery_id == -1 && RCT2_GLOBAL(0x00F64EB4, uint32) != 0x80000000) { + if (w->scenery.selected_scenery_id == -1 && RCT2_GLOBAL(0x00F64EB4, uint32) != MONEY32_UNDEFINED) { price = RCT2_GLOBAL(0x00F64EB4, uint32); } diff --git a/src/windows/top_toolbar.c b/src/windows/top_toolbar.c index bf726d96f0..90af8a665f 100644 --- a/src/windows/top_toolbar.c +++ b/src/windows/top_toolbar.c @@ -1420,7 +1420,7 @@ static void window_top_toolbar_scenery_tool_down(short x, short y, rct_window* w cost = game_do_command_p(GAME_COMMAND_50, &eax, &ebx, &ecx, &edx, &esi, &banner_id, &ebp); } - if (cost == MONEY32_UNDEFINED)return; + if (ebx == MONEY32_UNDEFINED)return; sound_play_panned(SOUND_PLACE_ITEM, 0x8001, RCT2_GLOBAL(0x009DEA5E, uint16), RCT2_GLOBAL(0x009DEA60, uint16), RCT2_GLOBAL(0x009DEA62, uint16)); @@ -1609,8 +1609,8 @@ void window_top_toolbar_land_tool_drag(short x, short y) selection_raise_land(GAME_COMMAND_FLAG_APPLY); - RCT2_GLOBAL(RCT2_ADDRESS_LAND_RAISE_COST, uint32) = 0x80000000; - RCT2_GLOBAL(RCT2_ADDRESS_LAND_LOWER_COST, uint32) = 0x80000000; + RCT2_GLOBAL(RCT2_ADDRESS_LAND_RAISE_COST, uint32) = MONEY32_UNDEFINED; + RCT2_GLOBAL(RCT2_ADDRESS_LAND_LOWER_COST, uint32) = MONEY32_UNDEFINED; return; } @@ -1619,8 +1619,8 @@ void window_top_toolbar_land_tool_drag(short x, short y) selection_lower_land(GAME_COMMAND_FLAG_APPLY); - RCT2_GLOBAL(RCT2_ADDRESS_LAND_RAISE_COST, uint32) = 0x80000000; - RCT2_GLOBAL(RCT2_ADDRESS_LAND_LOWER_COST, uint32) = 0x80000000; + RCT2_GLOBAL(RCT2_ADDRESS_LAND_RAISE_COST, uint32) = MONEY32_UNDEFINED; + RCT2_GLOBAL(RCT2_ADDRESS_LAND_LOWER_COST, uint32) = MONEY32_UNDEFINED; return; } @@ -1666,8 +1666,8 @@ void window_top_toolbar_water_tool_drag(short x, short y) RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16), RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16) ); - RCT2_GLOBAL(RCT2_ADDRESS_WATER_RAISE_COST, uint32) = 0x80000000; - RCT2_GLOBAL(RCT2_ADDRESS_WATER_LOWER_COST, uint32) = 0x80000000; + RCT2_GLOBAL(RCT2_ADDRESS_WATER_RAISE_COST, uint32) = MONEY32_UNDEFINED; + RCT2_GLOBAL(RCT2_ADDRESS_WATER_LOWER_COST, uint32) = MONEY32_UNDEFINED; return; } @@ -1688,8 +1688,8 @@ void window_top_toolbar_water_tool_drag(short x, short y) RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_X, uint16), RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_B_Y, uint16) ); - RCT2_GLOBAL(RCT2_ADDRESS_WATER_RAISE_COST, uint32) = 0x80000000; - RCT2_GLOBAL(RCT2_ADDRESS_WATER_LOWER_COST, uint32) = 0x80000000; + RCT2_GLOBAL(RCT2_ADDRESS_WATER_RAISE_COST, uint32) = MONEY32_UNDEFINED; + RCT2_GLOBAL(RCT2_ADDRESS_WATER_LOWER_COST, uint32) = MONEY32_UNDEFINED; return; } diff --git a/src/world/map.c b/src/world/map.c index 0e8199e944..5d20144156 100644 --- a/src/world/map.c +++ b/src/world/map.c @@ -898,7 +898,7 @@ void game_command_raise_land(int* eax, int* ebx, int* ecx, int* edx, int* esi, i int by = (uint16)(*ebp >> 16); uint16 selection_type = *edi; - int cost = 0x80000000; + int cost = MONEY32_UNDEFINED; if(*ebx & GAME_COMMAND_FLAG_APPLY && RCT2_GLOBAL(0x009A8C28, uint8) == 1){ sound_play_panned(SOUND_PLACE_ITEM, 0x8001, x, y, z); @@ -930,8 +930,8 @@ void game_command_raise_land(int* eax, int* ebx, int* ecx, int* edx, int* esi, i int edx2 = (dh << 8) + height; int edi2 = selection_type * 32; RCT2_CALLFUNC_X(0x0066397F, &xi, &ebx2, &yi, &edx2, (int*)&map_element, &edi2, ebp); // actually apply the change - if(ebx2 != 0x80000000){ - if(cost == 0x80000000){ + if(ebx2 != MONEY32_UNDEFINED){ + if(cost == MONEY32_UNDEFINED){ cost = ebx2; }else{ cost += ebx2; @@ -962,7 +962,7 @@ void game_command_lower_land(int* eax, int* ebx, int* ecx, int* edx, int* esi, i int by = (uint16)(*ebp >> 16); uint16 selection_type = *edi; - int cost = 0x80000000; + int cost = MONEY32_UNDEFINED; if(*ebx & GAME_COMMAND_FLAG_APPLY && RCT2_GLOBAL(0x009A8C28, uint8) == 1){ sound_play_panned(SOUND_PLACE_ITEM, 0x8001, x, y, z); @@ -1008,8 +1008,8 @@ void game_command_lower_land(int* eax, int* ebx, int* ecx, int* edx, int* esi, i int edx2 = (dh << 8) + height; int edi2 = selection_type * 32; RCT2_CALLFUNC_X(0x0066397F, &xi, &ebx2, &yi, &edx2, (int*)&map_element, &edi2, ebp); // actually apply the change - if(ebx2 != 0x80000000){ - if(cost == 0x80000000){ + if(ebx2 != MONEY32_UNDEFINED){ + if(cost == MONEY32_UNDEFINED){ cost = ebx2; }else{ cost += ebx2; @@ -1070,8 +1070,8 @@ void game_command_raise_water(int* eax, int* ebx, int* ecx, int* edx, int* esi, } int eax2 = xi, ebx2 = *ebx, ecx2 = yi, edx2 = (max_height << 8) + height, esi2, edi2, ebp2; ebx2 = game_do_command_p(GAME_COMMAND_16, &eax2, &ebx2, &ecx2, &edx2, &esi2, &edi2, &ebp2); - if(ebx2 == 0x80000000){ - *ebx = 0x80000000; + if(ebx2 == MONEY32_UNDEFINED){ + *ebx = MONEY32_UNDEFINED; return; }else{ cost += ebx2; @@ -1139,8 +1139,8 @@ void game_command_lower_water(int* eax, int* ebx, int* ecx, int* edx, int* esi, height -= 2; int eax2 = xi, ebx2 = *ebx, ecx2 = yi, edx2 = (min_height << 8) + height, esi2, edi2, ebp2; ebx2 = game_do_command_p(GAME_COMMAND_16, &eax2, &ebx2, &ecx2, &edx2, &esi2, &edi2, &ebp2); - if(ebx2 == 0x80000000){ - *ebx = 0x80000000; + if(ebx2 == MONEY32_UNDEFINED){ + *ebx = MONEY32_UNDEFINED; return; }else{ cost += ebx2; @@ -1180,12 +1180,12 @@ void game_command_remove_fence(int* eax, int* ebx, int* ecx, int* edx, int* esi, RCT2_GLOBAL(0x141F56C, uint8) = 12; if(RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8) != 0){ RCT2_GLOBAL(RCT2_ADDRESS_GAME_COMMAND_ERROR_TEXT, uint16) = STR_CONSTRUCTION_NOT_POSSIBLE_WHILE_GAME_IS_PAUSED; - *ebx = 0x80000000; + *ebx = MONEY32_UNDEFINED; return; } if((*ebx & 0x40) || !(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_SCENARIO_EDITOR)){ if(!map_is_location_owned(x, y, base_height * 8)){ - *ebx = 0x80000000; + *ebx = MONEY32_UNDEFINED; return; } rct_map_element* map_element = map_get_surface_element_at(x / 32, y / 32);