Merge branch 'master' into jgrpp
# Conflicts: # src/cheat_gui.cpp # src/genworld_gui.cpp # src/landscape.cpp # src/lang/english.txt # src/saveload/afterload.cpp # src/screenshot.cpp # src/settings_gui.cpp # src/settings_internal.h # src/settings_type.h # src/table/settings.ini # src/tile_type.h # src/widgets/genworld_widget.h
This commit is contained in:
@@ -272,12 +272,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;
|
||||
|
||||
@@ -1017,11 +1017,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++) {
|
||||
@@ -1032,7 +1032,7 @@ void SmallMapWindow::RebuildColourIndexIfNecessary()
|
||||
}
|
||||
}
|
||||
|
||||
SmallMapWindow::max_heightlevel = _settings_game.construction.max_heightlevel;
|
||||
SmallMapWindow::map_height_limit = _settings_game.construction.map_height_limit;
|
||||
BuildLandLegend();
|
||||
}
|
||||
|
||||
@@ -1706,7 +1706,7 @@ void SmallMapWindow::ScreenshotCallbackHandler(void *buf, uint y, uint pitch, ui
|
||||
|
||||
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.
|
||||
|
Reference in New Issue
Block a user