1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-30 02:05:13 +01:00

Fix loadlandscape breaking enabled tabs

Issue was caused by not calling sub_6DFED0 when loading the landscape. I assume in vanilla this would happen as part of the loading but due to the way loadsave now works it doesn't happen. In the process I also labelled the offset for editor step.
This commit is contained in:
duncanspumpkin
2015-10-15 22:16:27 +01:00
parent 31e6942ff0
commit ee1e71f287
8 changed files with 20 additions and 14 deletions

View File

@@ -119,6 +119,8 @@ static EMPTY_ARGS_VOID_POINTER *next_button_mouseup_events[] = {
NULL
};
static void sub_6DFED0();
/**
* Creates the main editor top toolbar window.
* rct2: 0x0066F052 (part of 0x0066EF38)
@@ -140,6 +142,7 @@ void window_editor_bottom_toolbar_open()
(1 << WIDX_NEXT_IMAGE);
window_init_scroll_widgets(window);
sub_6DFED0();
}
/**
@@ -369,7 +372,7 @@ void window_editor_bottom_toolbar_jump_forward_to_save_scenario()
}
//
s6Info->var_000 = 255;
s6Info->editor_step = 255;
// Ensure path has .SC6 extension
path_set_extension(path, ".SC6");
@@ -388,7 +391,7 @@ void window_editor_bottom_toolbar_jump_forward_to_save_scenario()
title_load();
} else {
window_error_open(STR_SCENARIO_SAVE_FAILED, -1);
s6Info->var_000 = 4;
s6Info->editor_step = EDITOR_STEP_OBJECTIVE_SELECTION;
}
}

View File

@@ -819,7 +819,7 @@ static void window_loadsave_select(rct_window *w, const char *path)
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;
s6Info->var_000 = 255;
s6Info->editor_step = 255;
rw = SDL_RWFromFile(path, "wb+");
int success = 0;
if (rw != NULL) {
@@ -834,7 +834,7 @@ static void window_loadsave_select(rct_window *w, const char *path)
title_load();
} else {
window_error_open(STR_SAVE_SCENARIO, STR_SCENARIO_SAVE_FAILED);
s6Info->var_000 = 4;
s6Info->editor_step = EDITOR_STEP_OBJECTIVE_SELECTION;
}
break;
}