From fec6d660c60b3d41186e8dcc2c8f6d5159021501 Mon Sep 17 00:00:00 2001 From: Ted John Date: Tue, 7 May 2019 23:10:05 +0100 Subject: [PATCH] Remove obsolete configs: - no crashes - test unfinished track --- src/openrct2-ui/windows/Options.cpp | 29 +++++++------------ src/openrct2/config/Config.cpp | 7 ----- src/openrct2/config/Config.h | 2 -- src/openrct2/interface/InteractiveConsole.cpp | 22 -------------- src/openrct2/localisation/StringIds.h | 2 -- 5 files changed, 10 insertions(+), 52 deletions(-) diff --git a/src/openrct2-ui/windows/Options.cpp b/src/openrct2-ui/windows/Options.cpp index c41600f2fd..0392859bc7 100644 --- a/src/openrct2-ui/windows/Options.cpp +++ b/src/openrct2-ui/windows/Options.cpp @@ -173,7 +173,6 @@ enum WINDOW_OPTIONS_WIDGET_IDX { // Advanced WIDX_DEBUGGING_TOOLS = WIDX_PAGE_START, - WIDX_TEST_UNFINISHED_TRACKS, WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM, WIDX_SAVE_PLUGIN_DATA_CHECKBOX, WIDX_STAY_CONNECTED_AFTER_DESYNC, @@ -359,17 +358,16 @@ static rct_widget window_options_misc_widgets[] = { static rct_widget window_options_advanced_widgets[] = { MAIN_OPTIONS_WIDGETS, { WWT_CHECKBOX, 2, 10, 299, 54, 65, STR_ENABLE_DEBUGGING_TOOLS, STR_ENABLE_DEBUGGING_TOOLS_TIP }, // Enable debugging tools - { WWT_CHECKBOX, 2, 10, 299, 69, 80, STR_TEST_UNFINISHED_TRACKS, STR_TEST_UNFINISHED_TRACKS_TIP }, // Test unfinished tracks - { WWT_CHECKBOX, 2, 10, 299, 84, 95, STR_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM, STR_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM_TIP }, // Allow loading with incorrect checksum - { WWT_CHECKBOX, 2, 10, 299, 99, 110, STR_SAVE_PLUGIN_DATA, STR_SAVE_PLUGIN_DATA_TIP }, // Export plug-in objects with saved games - { WWT_CHECKBOX, 2, 10, 299, 114, 125, STR_STAY_CONNECTED_AFTER_DESYNC, STR_STAY_CONNECTED_AFTER_DESYNC_TIP }, // Do not disconnect after the client desynchronises with the server - { WWT_CHECKBOX, 1, 10, 299, 129, 140, STR_ALWAYS_NATIVE_LOADSAVE, STR_ALWAYS_NATIVE_LOADSAVE_TIP }, // Use native load/save window - { WWT_DROPDOWN, 1, 165, 299, 145, 157, STR_NONE, STR_NONE }, // Autosave dropdown - { WWT_BUTTON, 1, 288, 298, 146, 156, STR_DROPDOWN_GLYPH, STR_AUTOSAVE_FREQUENCY_TIP }, // Autosave dropdown button - SPINNER_WIDGETS (1, 165, 299, 165, 176, STR_NONE, STR_AUTOSAVE_AMOUNT_TIP ), // Autosave amount spinner - { WWT_LABEL, 1, 23, 298, 184, 195, STR_PATH_TO_RCT1, STR_PATH_TO_RCT1_TIP }, // RCT 1 path text - { WWT_BUTTON, 1, 24, 289, 199, 212, STR_NONE, STR_STRING_TOOLTIP }, // RCT 1 path button - { WWT_BUTTON, 1, 289, 299, 199, 212, STR_CLOSE_X, STR_PATH_TO_RCT1_CLEAR_TIP }, // RCT 1 path clear button + { WWT_CHECKBOX, 2, 10, 299, 69, 80, STR_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM, STR_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM_TIP }, // Allow loading with incorrect checksum + { WWT_CHECKBOX, 2, 10, 299, 84, 95, STR_SAVE_PLUGIN_DATA, STR_SAVE_PLUGIN_DATA_TIP }, // Export plug-in objects with saved games + { WWT_CHECKBOX, 2, 10, 299, 99, 110, STR_STAY_CONNECTED_AFTER_DESYNC, STR_STAY_CONNECTED_AFTER_DESYNC_TIP }, // Do not disconnect after the client desynchronises with the server + { WWT_CHECKBOX, 1, 10, 299, 114, 125, STR_ALWAYS_NATIVE_LOADSAVE, STR_ALWAYS_NATIVE_LOADSAVE_TIP }, // Use native load/save window + { WWT_DROPDOWN, 1, 165, 299, 130, 142, STR_NONE, STR_NONE }, // Autosave dropdown + { WWT_BUTTON, 1, 288, 298, 131, 141, STR_DROPDOWN_GLYPH, STR_AUTOSAVE_FREQUENCY_TIP }, // Autosave dropdown button + SPINNER_WIDGETS (1, 165, 299, 150, 161, STR_NONE, STR_AUTOSAVE_AMOUNT_TIP ), // Autosave amount spinner + { WWT_LABEL, 1, 23, 298, 169, 180, STR_PATH_TO_RCT1, STR_PATH_TO_RCT1_TIP }, // RCT 1 path text + { WWT_BUTTON, 1, 24, 289, 184, 197, STR_NONE, STR_STRING_TOOLTIP }, // RCT 1 path button + { WWT_BUTTON, 1, 289, 299, 184, 197, STR_CLOSE_X, STR_PATH_TO_RCT1_CLEAR_TIP }, // RCT 1 path clear button { WIDGETS_END }, }; @@ -601,7 +599,6 @@ static uint64_t window_options_page_enabled_widgets[] = { MAIN_OPTIONS_ENABLED_WIDGETS | (1 << WIDX_DEBUGGING_TOOLS) | - (1 << WIDX_TEST_UNFINISHED_TRACKS) | (1 << WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM) | (1 << WIDX_SAVE_PLUGIN_DATA_CHECKBOX) | (1 << WIDX_STAY_CONNECTED_AFTER_DESYNC) | @@ -924,11 +921,6 @@ static void window_options_mouseup(rct_window* w, rct_widgetindex widgetIndex) config_save_default(); gfx_invalidate_screen(); break; - case WIDX_TEST_UNFINISHED_TRACKS: - gConfigGeneral.test_unfinished_tracks ^= 1; - config_save_default(); - window_invalidate(w); - break; case WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM: gConfigGeneral.allow_loading_with_incorrect_checksum = !gConfigGeneral .allow_loading_with_incorrect_checksum; @@ -1926,7 +1918,6 @@ static void window_options_invalidate(rct_window* w) case WINDOW_OPTIONS_PAGE_ADVANCED: widget_set_checkbox_value(w, WIDX_DEBUGGING_TOOLS, gConfigGeneral.debugging_tools); - widget_set_checkbox_value(w, WIDX_TEST_UNFINISHED_TRACKS, gConfigGeneral.test_unfinished_tracks); widget_set_checkbox_value( w, WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM, gConfigGeneral.allow_loading_with_incorrect_checksum); widget_set_checkbox_value(w, WIDX_SAVE_PLUGIN_DATA_CHECKBOX, gConfigGeneral.save_plugin_data); diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp index edb4251b28..34162c30e3 100644 --- a/src/openrct2/config/Config.cpp +++ b/src/openrct2/config/Config.cpp @@ -170,11 +170,6 @@ namespace Config model->use_vsync = reader->GetBoolean("use_vsync", true); model->virtual_floor_style = reader->GetEnum( "virtual_floor_style", VIRTUAL_FLOOR_STYLE_GLASSY, Enum_VirtualFloorStyle); - - // Default config setting is false until ghost trains are implemented #4540 - model->test_unfinished_tracks = reader->GetBoolean("test_unfinished_tracks", false); - - model->no_test_crashes = reader->GetBoolean("no_test_crashes", false); model->date_format = reader->GetEnum("date_format", platform_get_locale_date_format(), Enum_DateFormat); model->auto_staff_placement = reader->GetBoolean("auto_staff", true); model->handymen_mow_default = reader->GetBoolean("handymen_mow_default", false); @@ -250,8 +245,6 @@ namespace Config writer->WriteEnum("drawing_engine", model->drawing_engine, Enum_DrawingEngine); writer->WriteBoolean("uncap_fps", model->uncap_fps); writer->WriteBoolean("use_vsync", model->use_vsync); - writer->WriteBoolean("test_unfinished_tracks", model->test_unfinished_tracks); - writer->WriteBoolean("no_test_crashes", model->no_test_crashes); writer->WriteEnum("date_format", model->date_format, Enum_DateFormat); writer->WriteBoolean("auto_staff", model->auto_staff_placement); writer->WriteBoolean("handymen_mow_default", model->handymen_mow_default); diff --git a/src/openrct2/config/Config.h b/src/openrct2/config/Config.h index b346365967..790982c544 100644 --- a/src/openrct2/config/Config.h +++ b/src/openrct2/config/Config.h @@ -70,8 +70,6 @@ struct GeneralConfiguration int32_t window_snap_proximity; bool allow_loading_with_incorrect_checksum; bool save_plugin_data; - bool test_unfinished_tracks; - bool no_test_crashes; bool debugging_tools; int32_t autosave_frequency; int32_t autosave_amount; diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index 1a2e574e37..92d71a1d02 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -650,14 +650,6 @@ static int32_t cc_get(InteractiveConsole& console, const arguments_t& argv) { console.WriteFormatLine("console_small_font %d", gConfigInterface.console_small_font); } - else if (argv[0] == "test_unfinished_tracks") - { - console.WriteFormatLine("test_unfinished_tracks %d", gConfigGeneral.test_unfinished_tracks); - } - else if (argv[0] == "no_test_crashes") - { - console.WriteFormatLine("no_test_crashes %d", gConfigGeneral.no_test_crashes); - } else if (argv[0] == "location") { rct_window* w = window_get_main(); @@ -916,18 +908,6 @@ static int32_t cc_set(InteractiveConsole& console, const arguments_t& argv) config_save_default(); console.Execute("get console_small_font"); } - else if (argv[0] == "test_unfinished_tracks" && invalidArguments(&invalidArgs, int_valid[0])) - { - gConfigGeneral.test_unfinished_tracks = (int_val[0] != 0); - config_save_default(); - console.Execute("get test_unfinished_tracks"); - } - else if (argv[0] == "no_test_crashes" && invalidArguments(&invalidArgs, int_valid[0])) - { - gConfigGeneral.no_test_crashes = (int_val[0] != 0); - config_save_default(); - console.Execute("get no_test_crashes"); - } else if (argv[0] == "location" && invalidArguments(&invalidArgs, int_valid[0] && int_valid[1])) { rct_window* w = window_get_main(); @@ -1673,8 +1653,6 @@ static constexpr const utf8* console_variable_table[] = { "climate", "game_speed", "console_small_font", - "test_unfinished_tracks", - "no_test_crashes", "location", "window_scale", "window_limit", diff --git a/src/openrct2/localisation/StringIds.h b/src/openrct2/localisation/StringIds.h index 838aa3f577..f139ce0d4c 100644 --- a/src/openrct2/localisation/StringIds.h +++ b/src/openrct2/localisation/StringIds.h @@ -2741,8 +2741,6 @@ enum STR_LOCALE_DECIMAL_POINT = 5152, STR_EDIT_THEMES_BUTTON = 5153, STR_HARDWARE_DISPLAY = 5154, // Unused - STR_TEST_UNFINISHED_TRACKS = 5155, - STR_TEST_UNFINISHED_TRACKS_TIP = 5156, STR_CHEAT_UNLOCK_PRICES = 5157, STR_QUIT_TO_MENU = 5158, STR_EXIT_OPENRCT2 = 5159,