diff options
author | Patric Stout <truebrain@openttd.org> | 2021-03-24 09:42:54 +0100 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-03-26 12:22:32 +0100 |
commit | 1a1049bc0db4e29402e950e56f3a6873c1f5a0ab (patch) | |
tree | 9b0919ad80fef38e3909a602bc2f3f3b7d51c2c7 /src/smallmap_gui.cpp | |
parent | 23f27db8c30793384ca107db15548ea43dbdf329 (diff) | |
download | openttd-1a1049bc0db4e29402e950e56f3a6873c1f5a0ab.tar.xz |
Change: rename setting "max_heightlevel" to "map_height_limit"
This better reflects what it is, and hopefully removes a bit of
the confusion people are having what this setting actually does.
Additionally, update the text on the setting to better inform
users what it is doing exactly, so they can make an educated
decision on how to change it.
Next commit will introduce an "auto" value, which should be the
new default. The rename has as added benefit that everyone will
start out on the "auto" value.
Diffstat (limited to 'src/smallmap_gui.cpp')
-rw-r--r-- | src/smallmap_gui.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index ef1638d2f..0e7d313a6 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -298,12 +298,12 @@ void BuildLandLegend() /* Table for delta; if max_height is less than the first column, use the second column as value. */ uint deltas[][2] = { { 24, 2 }, { 48, 4 }, { 72, 6 }, { 120, 10 }, { 180, 15 }, { 240, 20 }, { MAX_TILE_HEIGHT + 1, 25 }}; uint i = 0; - for (; _settings_game.construction.max_heightlevel >= deltas[i][0]; i++) { + for (; _settings_game.construction.map_height_limit >= deltas[i][0]; i++) { /* Nothing to do here. */ } uint delta = deltas[i][1]; - int total_entries = (_settings_game.construction.max_heightlevel / delta) + 1; + int total_entries = (_settings_game.construction.map_height_limit / delta) + 1; int rows = CeilDiv(total_entries, 2); int j = 0; @@ -1103,11 +1103,11 @@ SmallMapWindow::~SmallMapWindow() void SmallMapWindow::RebuildColourIndexIfNecessary() { /* Rebuild colour indices if necessary. */ - if (SmallMapWindow::max_heightlevel == _settings_game.construction.max_heightlevel) return; + if (SmallMapWindow::map_height_limit == _settings_game.construction.map_height_limit) return; for (uint n = 0; n < lengthof(_heightmap_schemes); n++) { /* The heights go from 0 up to and including maximum. */ - int heights = _settings_game.construction.max_heightlevel + 1; + int heights = _settings_game.construction.map_height_limit + 1; _heightmap_schemes[n].height_colours = ReallocT<uint32>(_heightmap_schemes[n].height_colours, heights); for (int z = 0; z < heights; z++) { @@ -1118,7 +1118,7 @@ void SmallMapWindow::RebuildColourIndexIfNecessary() } } - SmallMapWindow::max_heightlevel = _settings_game.construction.max_heightlevel; + SmallMapWindow::map_height_limit = _settings_game.construction.map_height_limit; BuildLandLegend(); } @@ -1682,7 +1682,7 @@ Point SmallMapWindow::GetStationMiddle(const Station *st) const SmallMapWindow::SmallMapType SmallMapWindow::map_type = SMT_CONTOUR; bool SmallMapWindow::show_towns = true; -int SmallMapWindow::max_heightlevel = -1; +int SmallMapWindow::map_height_limit = -1; /** * Custom container class for displaying smallmap with a vertically resizing legend panel. |