From cf935d45c6f6e7e5eddd76e5e3284f58b2af5083 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Mon, 28 Dec 2015 01:40:46 +0900 Subject: [PATCH] Add configuration bits for scenario select mode and unlocking. Note this lacks an interface in the options window as of yet. --- src/config.c | 3 +++ src/config.h | 2 ++ src/windows/title_scenarioselect.c | 5 +---- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/config.c b/src/config.c index 031ce02f72..056c2740b9 100644 --- a/src/config.c +++ b/src/config.c @@ -203,6 +203,9 @@ config_property_definition _generalDefinitions[] = { { offsetof(general_configuration, show_fps), "show_fps", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL }, { offsetof(general_configuration, trap_cursor), "trap_cursor", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL }, { offsetof(general_configuration, auto_open_shops), "auto_open_shops", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL }, + { offsetof(general_configuration, scenario_select_mode), "scenario_select_mode", CONFIG_VALUE_TYPE_UINT8, 1, NULL }, + { offsetof(general_configuration, scenario_unlocking_enabled), "scenario_unlocking_enabled", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL }, + }; config_property_definition _interfaceDefinitions[] = { diff --git a/src/config.h b/src/config.h index e85c5d66d1..f3d0cbb2d6 100644 --- a/src/config.h +++ b/src/config.h @@ -172,6 +172,8 @@ typedef struct { uint8 show_fps; uint8 trap_cursor; uint8 auto_open_shops; + uint8 scenario_select_mode; + uint8 scenario_unlocking_enabled; } general_configuration; typedef struct { diff --git a/src/windows/title_scenarioselect.c b/src/windows/title_scenarioselect.c index 28e1385143..99ace8d24f 100644 --- a/src/windows/title_scenarioselect.c +++ b/src/windows/title_scenarioselect.c @@ -260,9 +260,6 @@ static void window_scenarioselect_invalidate(rct_window *w) w->pressed_widgets |= 1LL << (w->selected_tab + 4); } -int gScenarioGroupingStyle = 1; // 1 = new, 2 = classic -bool gScenarioEnableUnlocking = true; - static void window_scenarioselect_paint(rct_window *w, rct_drawpixelinfo *dpi) { int i, x, y, format; @@ -282,7 +279,7 @@ static void window_scenarioselect_paint(rct_window *w, rct_drawpixelinfo *dpi) x = (widget->left + widget->right) / 2 + w->x; y = (widget->top + widget->bottom) / 2 + w->y - 3; - if (gScenarioGroupingStyle == 1) { + if (gConfigGeneral.scenario_select_mode == 1) { RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, short) = STR_SCENARIO_CATEGORY_RCT1_CLASSIC + i; } else { // old-style RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, short) = STR_BEGINNER_PARKS + i;