Merge commit 'a8b575671894ffe1329ef37dca4989c0e60d70f5'

These merges are becoming more awful every time

Conflicts:
	src/ai/ai_gui.cpp
	src/build_vehicle_gui.cpp
	src/cheat_gui.cpp
	src/company_gui.cpp
	src/depot_gui.cpp
	src/dock_gui.cpp
	src/error_gui.cpp
	src/genworld_gui.cpp
	src/misc_gui.cpp
	src/network/network_content_gui.cpp
	src/network/network_gui.cpp
	src/newgrf_gui.cpp
	src/news_gui.cpp
	src/rail_gui.cpp
	src/rev.cpp.in
	src/road_gui.cpp
	src/settings_gui.cpp
	src/settings_gui.h
	src/signs_gui.cpp
	src/station_gui.cpp
	src/table/settings.ini
	src/terraform_gui.cpp
	src/toolbar_gui.cpp
	src/toolbar_gui.h
	src/vehicle_gui.cpp
	src/video/sdl_v.cpp
	src/viewport.cpp
	src/widget.cpp
	src/widgets/settings_widget.h
This commit is contained in:
pelya
2016-03-27 22:33:11 +03:00
527 changed files with 33650 additions and 23739 deletions
+35 -1
View File
@@ -1070,6 +1070,12 @@ static bool ZoomMinMaxChanged(int32 p1)
extern void ConstrainAllViewportsZoom();
ConstrainAllViewportsZoom();
GfxClearSpriteCache();
if (_settings_client.gui.zoom_min > _gui_zoom) {
/* Restrict GUI zoom if it is no longer available. */
_gui_zoom = _settings_client.gui.zoom_min;
UpdateCursorSize();
LoadStringWidthTable();
}
return true;
}
@@ -1153,7 +1159,7 @@ static bool InvalidateCompanyWindow(int32 p1)
static void ValidateSettings()
{
/* Do not allow a custom sea level with the original land generator. */
if (_settings_newgame.game_creation.land_generator == 0 &&
if (_settings_newgame.game_creation.land_generator == LG_ORIGINAL &&
_settings_newgame.difficulty.quantity_sea_lakes == CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY) {
_settings_newgame.difficulty.quantity_sea_lakes = CUSTOM_SEA_LEVEL_MIN_PERCENTAGE;
}
@@ -1283,12 +1289,40 @@ static bool ChangeDynamicEngines(int32 p1)
return true;
}
static bool ChangeMaxHeightLevel(int32 p1)
{
if (_game_mode == GM_NORMAL) return false;
if (_game_mode != GM_EDITOR) return true;
/* Check if at least one mountain on the map is higher than the new value.
* If yes, disallow the change. */
for (TileIndex t = 0; t < MapSize(); t++) {
if ((int32)TileHeight(t) > p1) {
ShowErrorMessage(STR_CONFIG_SETTING_TOO_HIGH_MOUNTAIN, INVALID_STRING_ID, WL_ERROR);
/* Return old, unchanged value */
return false;
}
}
/* The smallmap uses an index from heightlevels to colours. Trigger rebuilding it. */
InvalidateWindowClassesData(WC_SMALLMAP, 2);
return true;
}
static bool StationCatchmentChanged(int32 p1)
{
Station::RecomputeIndustriesNearForAll();
return true;
}
static bool MaxVehiclesChanged(int32 p1)
{
InvalidateWindowClassesData(WC_BUILD_TOOLBAR);
MarkWholeScreenDirty();
return true;
}
#ifdef ENABLE_NETWORK