diff options
author | rubidium <rubidium@openttd.org> | 2009-12-21 16:13:30 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-12-21 16:13:30 +0000 |
commit | abb601f682775de2f0670482f0b4b773300c9949 (patch) | |
tree | ecebbb1001c8171c92e35634800c8fc47464549b /src/genworld_gui.cpp | |
parent | b3ecc90992d2d74b6be77ba084e21671b7ba9163 (diff) | |
download | openttd-abb601f682775de2f0670482f0b4b773300c9949.tar.xz |
(svn r18585) -Codechange: replace some magic numbers by constants
Diffstat (limited to 'src/genworld_gui.cpp')
-rw-r--r-- | src/genworld_gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 1a2f12a4d..adb59522f 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -499,7 +499,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow { this->SetWidgetDisabledState(GLAND_START_DATE_DOWN, _settings_newgame.game_creation.starting_year <= MIN_YEAR); this->SetWidgetDisabledState(GLAND_START_DATE_UP, _settings_newgame.game_creation.starting_year >= MAX_YEAR); - this->SetWidgetDisabledState(GLAND_SNOW_LEVEL_DOWN, _settings_newgame.game_creation.snow_line_height <= 2 || _settings_newgame.game_creation.landscape != LT_ARCTIC); + this->SetWidgetDisabledState(GLAND_SNOW_LEVEL_DOWN, _settings_newgame.game_creation.snow_line_height <= MIN_SNOWLINE_HEIGHT || _settings_newgame.game_creation.landscape != LT_ARCTIC); this->SetWidgetDisabledState(GLAND_SNOW_LEVEL_UP, _settings_newgame.game_creation.snow_line_height >= MAX_SNOWLINE_HEIGHT || _settings_newgame.game_creation.landscape != LT_ARCTIC); this->SetWidgetLoweredState(GLAND_TEMPERATE, _settings_newgame.game_creation.landscape == LT_TEMPERATE); @@ -589,7 +589,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow { this->HandleButtonClick(widget); this->SetDirty(); - _settings_newgame.game_creation.snow_line_height = Clamp(_settings_newgame.game_creation.snow_line_height + widget - GLAND_SNOW_LEVEL_TEXT, 2, MAX_SNOWLINE_HEIGHT); + _settings_newgame.game_creation.snow_line_height = Clamp(_settings_newgame.game_creation.snow_line_height + widget - GLAND_SNOW_LEVEL_TEXT, MIN_SNOWLINE_HEIGHT, MAX_SNOWLINE_HEIGHT); } _left_button_clicked = false; break; @@ -743,7 +743,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow { case GLAND_SNOW_LEVEL_TEXT: this->SetWidgetDirty(GLAND_SNOW_LEVEL_TEXT); - _settings_newgame.game_creation.snow_line_height = Clamp(value, 2, MAX_SNOWLINE_HEIGHT); + _settings_newgame.game_creation.snow_line_height = Clamp(value, MIN_SNOWLINE_HEIGHT, MAX_SNOWLINE_HEIGHT); break; case GLAND_TOWN_PULLDOWN: |