1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

New setting: landscape_smoothing

This commit is contained in:
atmaxinger
2014-05-28 10:55:35 +02:00
parent 0e6e11798b
commit 098fe08fdf
3 changed files with 27 additions and 0 deletions

View File

@@ -86,6 +86,7 @@ general_configuration_t gGeneral_config_default = {
0, // construction_marker_colour
1, // edge_scrolling
0, // always_show_gridlines
1, // landscape_smoothing
};
sound_configuration_t gSound_config;
@@ -149,6 +150,14 @@ void config_load()
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) &= !CONFIG_FLAG_ALWAYS_SHOW_GRIDLINES;
}
// landscape smoothing
if (!gGeneral_config.landscape_smoothing){
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) |= CONFIG_FLAG_DISABLE_SMOOTH_LANDSCAPE;
}
else {
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) &= !CONFIG_FLAG_DISABLE_SMOOTH_LANDSCAPE;
}
//sound configuration
@@ -327,6 +336,13 @@ void config_write_ini_general(FILE *fp)
else {
fprintf(fp, "always_show_gridlines = false\n");
}
if (gGeneral_config.landscape_smoothing){
fprintf(fp, "landscape_smoothing = true\n");
}
else {
fprintf(fp, "landscape_smoothing = false\n");
}
}
/**
@@ -533,6 +549,14 @@ static void config_general(char *setting, char *value){
gGeneral_config.always_show_gridlines = 0;
}
}
else if (strcmp(setting, "landscape_smoothing") == 0){
if (strcmp(value, "true") == 0){
gGeneral_config.landscape_smoothing = 1;
}
else {
gGeneral_config.landscape_smoothing = 0;
}
}
}
/**

View File

@@ -137,6 +137,7 @@ typedef struct general_configuration {
sint8 construction_marker_colour;
sint8 edge_scrolling;
sint8 always_show_gridlines;
sint8 landscape_smoothing;
} general_configuration_t;
static const struct { char *key; int value; } _currencyLookupTable[] = {

View File

@@ -249,6 +249,8 @@ static void window_options_mouseup()
break;
case WIDX_TILE_SMOOTHING_CHECKBOX:
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) ^= CONFIG_FLAG_DISABLE_SMOOTH_LANDSCAPE;
gGeneral_config.landscape_smoothing = !(RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8)
& CONFIG_FLAG_DISABLE_SMOOTH_LANDSCAPE);
config_save();
gfx_invalidate_screen();
break;