mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
rename 0x80000000 to MONEY32_UNDEFINED
This commit is contained in:
10
src/game.c
10
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()
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user