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

New setting: show_height_as_units

This commit is contained in:
atmaxinger
2014-05-28 11:12:12 +02:00
parent 098fe08fdf
commit 4ae98b18e6
3 changed files with 29 additions and 3 deletions

View File

@@ -87,6 +87,7 @@ general_configuration_t gGeneral_config_default = {
1, // edge_scrolling
0, // always_show_gridlines
1, // landscape_smoothing
0, // show_height_as_units
};
sound_configuration_t gSound_config;
@@ -158,7 +159,13 @@ void config_load()
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) &= !CONFIG_FLAG_DISABLE_SMOOTH_LANDSCAPE;
}
// show height as units
if (gGeneral_config.show_height_as_units){
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) |= CONFIG_FLAG_SHOW_HEIGHT_AS_UNITS;
}
else {
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_FLAGS, uint8) &= !CONFIG_FLAG_SHOW_HEIGHT_AS_UNITS;
}
//sound configuration
RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_SOUND_QUALITY, sint8) = gSound_config.sound_quality;
@@ -343,6 +350,13 @@ void config_write_ini_general(FILE *fp)
else {
fprintf(fp, "landscape_smoothing = false\n");
}
if (gGeneral_config.show_height_as_units){
fprintf(fp, "show_height_as_units = true\n");
}
else {
fprintf(fp, "show_height_as_units = false\n");
}
}
/**
@@ -557,6 +571,14 @@ static void config_general(char *setting, char *value){
gGeneral_config.landscape_smoothing = 0;
}
}
else if (strcmp(setting, "show_height_as_units") == 0){
if (strcmp(value, "true") == 0){
gGeneral_config.show_height_as_units = 1;
}
else {
gGeneral_config.show_height_as_units = 0;
}
}
}
/**