Changeset - r6357:de4229337c35
[Not reviewed]
master
0 30 0
belugas - 18 years ago 2007-03-22 03:42:43
belugas@openttd.org
(svn r9400) -Codechange: Use some more representative enum names for landscape types.
30 files changed with 125 insertions and 125 deletions:
0 comments (0 inline, 0 general)
projects/openttd_vs80.vcproj
Show inline comments
 
@@ -308,7 +308,7 @@
 
				AdditionalDependencies="winmm.lib ws2_32.lib libpng.lib zlibstat.lib dxguid.lib libfreetype2.lib"
 
				LinkIncremental="0"
 
				SuppressStartupBanner="true"
 
				IgnoreDefaultLibraryNames="LIBCMT.lib"
 
				IgnoreDefaultLibraryNames="LIBCMT.lib;LIBC.lib"
 
				GenerateDebugInformation="true"
 
				SubSystem="2"
 
				TargetMachine="1"
src/ai/default/default.cpp
Show inline comments
 
@@ -2461,7 +2461,7 @@ handle_nocash:
 
		bool is_pass = (
 
			p->ai.cargo_type == CT_PASSENGERS ||
 
			p->ai.cargo_type == CT_MAIL ||
 
			(_opt.landscape == LT_NORMAL && p->ai.cargo_type == CT_VALUABLES)
 
			(_opt.landscape == LT_TEMPERATE && p->ai.cargo_type == CT_VALUABLES)
 
		);
 
		Order order;
 

	
 
@@ -3203,7 +3203,7 @@ static void AiStateBuildRoadVehicles(Pla
 
		bool is_pass = (
 
			p->ai.cargo_type == CT_PASSENGERS ||
 
			p->ai.cargo_type == CT_MAIL ||
 
			(_opt.landscape == LT_NORMAL && p->ai.cargo_type == CT_VALUABLES)
 
			(_opt.landscape == LT_TEMPERATE && p->ai.cargo_type == CT_VALUABLES)
 
		);
 
		Order order;
 

	
src/clear_cmd.cpp
Show inline comments
 
@@ -668,8 +668,8 @@ static void TileLoop_Clear(TileIndex til
 
	TileLoopClearHelper(tile);
 

	
 
	switch (_opt.landscape) {
 
		case LT_DESERT: TileLoopClearDesert(tile); break;
 
		case LT_HILLY:  TileLoopClearAlps(tile);   break;
 
		case LT_TROPIC: TileLoopClearDesert(tile); break;
 
		case LT_ARCTIC: TileLoopClearAlps(tile);   break;
 
	}
 

	
 
	switch (GetClearGround(tile)) {
src/economy.cpp
Show inline comments
 
@@ -1119,7 +1119,7 @@ int32 GetTransportedGoodsIncome(uint num
 
	byte f;
 

	
 
	/* zero the distance if it's the bank and very short transport. */
 
	if (_opt.landscape == LT_NORMAL && cs->label == 'VALU' && dist < 10)
 
	if (_opt.landscape == LT_TEMPERATE && cs->label == 'VALU' && dist < 10)
 
		dist = 0;
 

	
 
	f = 255;
src/genworld_gui.cpp
Show inline comments
 
@@ -240,7 +240,7 @@ static void GenerateLandscapeWndProc(Win
 
			SetWindowWidgetDisabledState(w, GLAND_SMOOTHNESS_PULLDOWN, _patches_newgame.land_generator == 0);
 
		}
 
		/* Disable snowline if not hilly */
 
		SetWindowWidgetDisabledState(w, GLAND_SNOW_LEVEL_TEXT, _opt_newgame.landscape != LT_HILLY);
 
		SetWindowWidgetDisabledState(w, GLAND_SNOW_LEVEL_TEXT, _opt_newgame.landscape != LT_ARCTIC);
 
		/* Disable town, industry and trees in SE */
 
		SetWindowWidgetDisabledState(w, GLAND_TOWN_TEXT,         _game_mode == GM_EDITOR);
 
		SetWindowWidgetDisabledState(w, GLAND_TOWN_PULLDOWN,     _game_mode == GM_EDITOR);
 
@@ -251,13 +251,13 @@ static void GenerateLandscapeWndProc(Win
 

	
 
		SetWindowWidgetDisabledState(w, GLAND_START_DATE_DOWN, _patches_newgame.starting_year <= MIN_YEAR);
 
		SetWindowWidgetDisabledState(w, GLAND_START_DATE_UP,   _patches_newgame.starting_year >= MAX_YEAR);
 
		SetWindowWidgetDisabledState(w, GLAND_SNOW_LEVEL_DOWN, _patches_newgame.snow_line_height <= 2 || _opt_newgame.landscape != LT_HILLY);
 
		SetWindowWidgetDisabledState(w, GLAND_SNOW_LEVEL_UP,   _patches_newgame.snow_line_height >= 13 || _opt_newgame.landscape != LT_HILLY);
 
		SetWindowWidgetDisabledState(w, GLAND_SNOW_LEVEL_DOWN, _patches_newgame.snow_line_height <= 2 || _opt_newgame.landscape != LT_ARCTIC);
 
		SetWindowWidgetDisabledState(w, GLAND_SNOW_LEVEL_UP,   _patches_newgame.snow_line_height >= 13 || _opt_newgame.landscape != LT_ARCTIC);
 

	
 
		SetWindowWidgetLoweredState(w, GLAND_TEMPERATE, _opt_newgame.landscape == LT_NORMAL);
 
		SetWindowWidgetLoweredState(w, GLAND_ARCTIC,    _opt_newgame.landscape == LT_HILLY);
 
		SetWindowWidgetLoweredState(w, GLAND_TROPICAL,  _opt_newgame.landscape == LT_DESERT);
 
		SetWindowWidgetLoweredState(w, GLAND_TOYLAND,   _opt_newgame.landscape == LT_CANDY);
 
		SetWindowWidgetLoweredState(w, GLAND_TEMPERATE, _opt_newgame.landscape == LT_TEMPERATE);
 
		SetWindowWidgetLoweredState(w, GLAND_ARCTIC,    _opt_newgame.landscape == LT_ARCTIC);
 
		SetWindowWidgetLoweredState(w, GLAND_TROPICAL,  _opt_newgame.landscape == LT_TROPIC);
 
		SetWindowWidgetLoweredState(w, GLAND_TOYLAND,   _opt_newgame.landscape == LT_TOYLAND);
 
		DrawWindowWidgets(w);
 

	
 
		y = (mode == GLWP_HEIGHTMAP) ? 22 : 0;
 
@@ -589,10 +589,10 @@ static void CreateScenarioWndProc(Window
 
		SetWindowWidgetDisabledState(w, CSCEN_FLAT_LAND_HEIGHT_DOWN, _patches_newgame.se_flat_world_height <= 0);
 
		SetWindowWidgetDisabledState(w, CSCEN_FLAT_LAND_HEIGHT_UP,   _patches_newgame.se_flat_world_height >= 15);
 

	
 
		SetWindowWidgetLoweredState(w, CSCEN_TEMPERATE, _opt_newgame.landscape == LT_NORMAL);
 
		SetWindowWidgetLoweredState(w, CSCEN_ARCTIC,    _opt_newgame.landscape == LT_HILLY);
 
		SetWindowWidgetLoweredState(w, CSCEN_TROPICAL,  _opt_newgame.landscape == LT_DESERT);
 
		SetWindowWidgetLoweredState(w, CSCEN_TOYLAND,   _opt_newgame.landscape == LT_CANDY);
 
		SetWindowWidgetLoweredState(w, CSCEN_TEMPERATE, _opt_newgame.landscape == LT_TEMPERATE);
 
		SetWindowWidgetLoweredState(w, CSCEN_ARCTIC,    _opt_newgame.landscape == LT_ARCTIC);
 
		SetWindowWidgetLoweredState(w, CSCEN_TROPICAL,  _opt_newgame.landscape == LT_TROPIC);
 
		SetWindowWidgetLoweredState(w, CSCEN_TOYLAND,   _opt_newgame.landscape == LT_TOYLAND);
 
		DrawWindowWidgets(w);
 

	
 
		DrawStringRightAligned(211, 97, STR_MAPSIZE, 0);
src/gfx.cpp
Show inline comments
 
@@ -1555,7 +1555,7 @@ void DoPaletteAnimations()
 
	memcpy(old_val, d, c * sizeof(*old_val));
 

	
 
	/* Dark blue water */
 
	s = (_opt.landscape == LT_CANDY) ? ev->ac : ev->a;
 
	s = (_opt.landscape == LT_TOYLAND) ? ev->ac : ev->a;
 
	j = EXTR(320, 5);
 
	for (i = 0; i != 5; i++) {
 
		*d++ = s[j];
 
@@ -1564,7 +1564,7 @@ void DoPaletteAnimations()
 
	}
 

	
 
	/* Glittery water */
 
	s = (_opt.landscape == LT_CANDY) ? ev->bc : ev->b;
 
	s = (_opt.landscape == LT_TOYLAND) ? ev->bc : ev->b;
 
	j = EXTR(128, 15);
 
	for (i = 0; i != 5; i++) {
 
		*d++ = s[j];
 
@@ -1624,7 +1624,7 @@ void DoPaletteAnimations()
 
	/* Animate water for old DOS graphics */
 
	if (_use_dos_palette) {
 
		/* Dark blue water DOS */
 
		s = (_opt.landscape == LT_CANDY) ? ev->ac : ev->a;
 
		s = (_opt.landscape == LT_TOYLAND) ? ev->ac : ev->a;
 
		j = EXTR(320, 5);
 
		for (i = 0; i != 5; i++) {
 
			*d++ = s[j];
 
@@ -1633,7 +1633,7 @@ void DoPaletteAnimations()
 
		}
 

	
 
		/* Glittery water DOS */
 
		s = (_opt.landscape == LT_CANDY) ? ev->bc : ev->b;
 
		s = (_opt.landscape == LT_TOYLAND) ? ev->bc : ev->b;
 
		j = EXTR(128, 15);
 
		for (i = 0; i != 5; i++) {
 
			*d++ = s[j];
src/gfxinit.cpp
Show inline comments
 
@@ -357,7 +357,7 @@ static void LoadSpriteTables()
 
	}
 

	
 
	/* Load additional sprites for climates other than temperate */
 
	if (_opt.landscape != LT_NORMAL) {
 
	if (_opt.landscape != LT_TEMPERATE) {
 
		LoadGrfIndexed(
 
			files->landscape[_opt.landscape - 1].filename,
 
			_landscape_spriteindexes[_opt.landscape - 1],
src/industry_cmd.cpp
Show inline comments
 
@@ -814,14 +814,14 @@ static void PlantFarmField(TileIndex til
 
	uint field_type;
 
	int type;
 

	
 
	if (_opt.landscape == LT_HILLY) {
 
	if (_opt.landscape == LT_ARCTIC) {
 
		if (GetTileZ(tile) + TILE_HEIGHT * 2 >= GetSnowLine())
 
			return;
 
	}
 

	
 
	/* determine field size */
 
	r = (Random() & 0x303) + 0x404;
 
	if (_opt.landscape == LT_HILLY) r += 0x404;
 
	if (_opt.landscape == LT_ARCTIC) r += 0x404;
 
	size_x = GB(r, 0, 8);
 
	size_y = GB(r, 8, 8);
 

	
 
@@ -852,7 +852,7 @@ static void PlantFarmField(TileIndex til
 
	END_TILE_LOOP(cur_tile, size_x, size_y, tile)
 

	
 
	type = 3;
 
	if (_opt.landscape != LT_HILLY && _opt.landscape != LT_DESERT) {
 
	if (_opt.landscape != LT_ARCTIC && _opt.landscape != LT_TROPIC) {
 
		type = _plantfarmfield_type[Random() & 0xF];
 
	}
 

	
 
@@ -1016,7 +1016,7 @@ static bool CheckNewIndustry_NULL(TileIn
 

	
 
static bool CheckNewIndustry_Forest(TileIndex tile)
 
{
 
	if (_opt.landscape == LT_HILLY) {
 
	if (_opt.landscape == LT_ARCTIC) {
 
		if (GetTileZ(tile) < HighestSnowLine() + TILE_HEIGHT * 2U) {
 
			_error_message = STR_4831_FOREST_CAN_ONLY_BE_PLANTED;
 
			return false;
 
@@ -1048,7 +1048,7 @@ static bool CheckNewIndustry_OilRig(Tile
 

	
 
static bool CheckNewIndustry_Farm(TileIndex tile)
 
{
 
	if (_opt.landscape == LT_HILLY) {
 
	if (_opt.landscape == LT_ARCTIC) {
 
		if (GetTileZ(tile) + TILE_HEIGHT * 2 >= HighestSnowLine()) {
 
			_error_message = STR_0239_SITE_UNSUITABLE;
 
			return false;
 
@@ -1766,7 +1766,7 @@ static void ChangeIndustryProduction(Ind
 

	
 
		case INDUSTRYLIFE_PRODUCTION:
 
			/* decrease or increase */
 
			if (type == IT_OIL_WELL && _opt.landscape == LT_NORMAL)
 
			if (type == IT_OIL_WELL && _opt.landscape == LT_TEMPERATE)
 
				only_decrease = true;
 

	
 
			if (only_decrease || CHANCE16(1,3)) {
src/intro_gui.cpp
Show inline comments
 
@@ -55,10 +55,10 @@ static void SelectGameWndProc(Window *w,
 
	case WE_CREATE: LowerWindowWidget(w, _opt_newgame.landscape + 8); break;
 

	
 
	case WE_PAINT:
 
		SetWindowWidgetLoweredState(w, 8,  _opt_newgame.landscape == LT_NORMAL);
 
		SetWindowWidgetLoweredState(w, 9,  _opt_newgame.landscape == LT_HILLY);
 
		SetWindowWidgetLoweredState(w, 10, _opt_newgame.landscape == LT_DESERT);
 
		SetWindowWidgetLoweredState(w, 11, _opt_newgame.landscape == LT_CANDY);
 
		SetWindowWidgetLoweredState(w, 8,  _opt_newgame.landscape == LT_TEMPERATE);
 
		SetWindowWidgetLoweredState(w, 9,  _opt_newgame.landscape == LT_ARCTIC);
 
		SetWindowWidgetLoweredState(w, 10, _opt_newgame.landscape == LT_TROPIC);
 
		SetWindowWidgetLoweredState(w, 11, _opt_newgame.landscape == LT_TOYLAND);
 
		SetDParam(0, STR_6801_EASY + _opt_newgame.diff_level);
 
		DrawWindowWidgets(w);
 
		break;
src/landscape.cpp
Show inline comments
 
@@ -692,15 +692,15 @@ void GenerateLandscape(byte mode)
 
	uint32 r;
 

	
 
	if (mode == GW_HEIGHTMAP) {
 
		SetGeneratingWorldProgress(GWP_LANDSCAPE, (_opt.landscape == LT_DESERT) ? 1 + gwp_desert_amount : 1);
 
		SetGeneratingWorldProgress(GWP_LANDSCAPE, (_opt.landscape == LT_TROPIC) ? 1 + gwp_desert_amount : 1);
 
		LoadHeightmap(_file_to_saveload.name);
 
		IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
 
	} else if (_patches.land_generator == LG_TERRAGENESIS) {
 
		SetGeneratingWorldProgress(GWP_LANDSCAPE, (_opt.landscape == LT_DESERT) ? 3 + gwp_desert_amount : 3);
 
		SetGeneratingWorldProgress(GWP_LANDSCAPE, (_opt.landscape == LT_TROPIC) ? 3 + gwp_desert_amount : 3);
 
		GenerateTerrainPerlin();
 
	} else {
 
		switch (_opt.landscape) {
 
			case LT_HILLY:
 
			case LT_ARCTIC:
 
				SetGeneratingWorldProgress(GWP_LANDSCAPE, 2);
 

	
 
				for (i = ScaleByMapSize((Random() & 0x7F) + 950); i != 0; --i) {
 
@@ -716,7 +716,7 @@ void GenerateLandscape(byte mode)
 
				IncreaseGeneratingWorldProgress(GWP_LANDSCAPE);
 
				break;
 

	
 
			case LT_DESERT:
 
			case LT_TROPIC:
 
				SetGeneratingWorldProgress(GWP_LANDSCAPE, 3 + gwp_desert_amount);
 

	
 
				for (i = ScaleByMapSize((Random() & 0x7F) + 170); i != 0; --i) {
 
@@ -753,7 +753,7 @@ void GenerateLandscape(byte mode)
 

	
 
	ConvertGroundTilesIntoWaterTiles();
 

	
 
	if (_opt.landscape == LT_DESERT) CreateDesertOrRainForest();
 
	if (_opt.landscape == LT_TROPIC) CreateDesertOrRainForest();
 
}
 

	
 
void OnTick_Town();
src/main_gui.cpp
Show inline comments
 
@@ -1211,7 +1211,7 @@ static void EditorTerraformClick_RockyAr
 

	
 
static void EditorTerraformClick_DesertLightHouse(Window *w)
 
{
 
	HandlePlacePushButton(w, 10, SPR_CURSOR_LIGHTHOUSE, 1, (_opt.landscape == LT_DESERT) ? PlaceProc_DesertArea : PlaceProc_LightHouse);
 
	HandlePlacePushButton(w, 10, SPR_CURSOR_LIGHTHOUSE, 1, (_opt.landscape == LT_TROPIC) ? PlaceProc_DesertArea : PlaceProc_LightHouse);
 
}
 

	
 
static void EditorTerraformClick_Transmitter(Window *w)
 
@@ -1275,7 +1275,7 @@ static void ScenEditLandGenWndProc(Windo
 
	switch (e->event) {
 
	case WE_CREATE:
 
		/* XXX - lighthouse button is widget 10!! Don't forget when changing */
 
		w->widget[10].tooltips = (_opt.landscape == LT_DESERT) ? STR_028F_DEFINE_DESERT_AREA : STR_028D_PLACE_LIGHTHOUSE;
 
		w->widget[10].tooltips = (_opt.landscape == LT_TROPIC) ? STR_028F_DEFINE_DESERT_AREA : STR_028D_PLACE_LIGHTHOUSE;
 
		break;
 

	
 
	case WE_PAINT:
src/newgrf.cpp
Show inline comments
 
@@ -1306,8 +1306,8 @@ static bool TownHouseChangeInfo(uint hid
 

	
 
				/* If value of goods is negative, it means in fact food or, if in toyland, fizzy_drink acceptance.
 
				 * Else, we have "standard" 3rd cargo type, goods or candy, for toyland once more */
 
				housespec[i]->accepts_cargo[2] = (goods >= 0) ? ((_opt.landscape == LT_CANDY) ? CT_CANDY : CT_GOODS) :
 
						((_opt.landscape == LT_CANDY) ? CT_FIZZY_DRINKS : CT_FOOD);
 
				housespec[i]->accepts_cargo[2] = (goods >= 0) ? ((_opt.landscape == LT_TOYLAND) ? CT_CANDY : CT_GOODS) :
 
						((_opt.landscape == LT_TOYLAND) ? CT_FIZZY_DRINKS : CT_FOOD);
 

	
 
				housespec[i]->cargo_acceptance[2] = abs(goods); // but we do need positive value here
 
			}
src/newgrf_house.cpp
Show inline comments
 
@@ -252,8 +252,8 @@ static uint32 GetNumHouses(HouseID house
 
static uint32 GetTerrainType(TileIndex tile)
 
{
 
	switch (_opt.landscape) {
 
		case LT_DESERT: return GetTropicZone(tile) == TROPICZONE_DESERT ? 1 : 2;
 
		case LT_HILLY:  return GetTileZ(tile) >= GetSnowLine() ? 4 : 0;
 
		case LT_TROPIC: return GetTropicZone(tile) == TROPICZONE_DESERT ? 1 : 2;
 
		case LT_ARCTIC: return GetTileZ(tile) >= GetSnowLine() ? 4 : 0;
 
		default:        return 0;
 
	}
 
}
src/newgrf_spritegroup.cpp
Show inline comments
 
@@ -94,7 +94,7 @@ static inline uint32 GetVariable(const R
 
		case 0x1A: return UINT_MAX;
 
		case 0x1B: return GB(_display_opt, 0, 6);
 
		case 0x1C: return object->last_value;
 
		case 0x20: return _opt.landscape == LT_HILLY ? GetSnowLine() : 0xFF;
 
		case 0x20: return _opt.landscape == LT_ARCTIC ? GetSnowLine() : 0xFF;
 

	
 
		/* Not a common variable, so evalute the feature specific variables */
 
		default: return object->GetVariable(object, variable, parameter, available);
src/newgrf_station.cpp
Show inline comments
 
@@ -389,8 +389,8 @@ static uint32 StationGetVariable(const R
 
		case 0x40: return GetPlatformInfoHelper(tile, false, false, false);
 
		case 0x41: return GetPlatformInfoHelper(tile, true,  false, false);
 
		case 0x42: // Terrain and rail type
 
			return ((_opt.landscape == LT_HILLY && GetTileZ(tile) > GetSnowLine()) ? 4 : 0) |
 
			       (_opt.landscape == LT_DESERT ? GetTropicZone(tile) : 0) |
 
			return ((_opt.landscape == LT_ARCTIC && GetTileZ(tile) > GetSnowLine()) ? 4 : 0) |
 
			       (_opt.landscape == LT_TROPIC ? GetTropicZone(tile) : 0) |
 
			       (GetRailType(tile) << 8);
 
		case 0x43: return st->owner; // Station owner
 
		case 0x44: return 2;         // PBS status
src/openttd.h
Show inline comments
 
@@ -183,10 +183,10 @@ enum {
 

	
 
/* Landscape types */
 
enum {
 
	LT_NORMAL     = 0,
 
	LT_HILLY      = 1,
 
	LT_DESERT     = 2,
 
	LT_CANDY      = 3,
 
	LT_TEMPERATE  = 0,
 
	LT_ARCTIC     = 1,
 
	LT_TROPIC     = 2,
 
	LT_TOYLAND    = 3,
 

	
 
	NUM_LANDSCAPE = 4,
 
};
src/rail_cmd.cpp
Show inline comments
 
@@ -1294,7 +1294,7 @@ static void DrawTile_Track(TileInfo *ti)
 

	
 
			// adjust ground tile for desert
 
			// don't adjust for snow, because snow in depots looks weird
 
			if (IsSnowRailGround(ti->tile) && _opt.landscape == LT_DESERT) {
 
			if (IsSnowRailGround(ti->tile) && _opt.landscape == LT_TROPIC) {
 
				if (image != SPR_FLAT_GRASS_TILE) {
 
					image += rti->snow_offset; // tile with tracks
 
				} else {
 
@@ -1738,14 +1738,14 @@ static void TileLoop_Track(TileIndex til
 
	RailGroundType new_ground;
 

	
 
	switch (_opt.landscape) {
 
		case LT_HILLY:
 
		case LT_ARCTIC:
 
			if (GetTileZ(tile) > GetSnowLine()) {
 
				new_ground = RAIL_GROUND_ICE_DESERT;
 
				goto set_ground;
 
			}
 
			break;
 

	
 
		case LT_DESERT:
 
		case LT_TROPIC:
 
			if (GetTropicZone(tile) == TROPICZONE_DESERT) {
 
				new_ground = RAIL_GROUND_ICE_DESERT;
 
				goto set_ground;
src/road_cmd.cpp
Show inline comments
 
@@ -864,14 +864,14 @@ static const Roadside _town_road_types_2
 
static void TileLoop_Road(TileIndex tile)
 
{
 
	switch (_opt.landscape) {
 
		case LT_HILLY:
 
		case LT_ARCTIC:
 
			if (IsOnSnow(tile) != (GetTileZ(tile) > GetSnowLine())) {
 
				ToggleSnow(tile);
 
				MarkTileDirtyByTile(tile);
 
			}
 
			break;
 

	
 
		case LT_DESERT:
 
		case LT_TROPIC:
 
			if (GetTropicZone(tile) == TROPICZONE_DESERT && !IsOnDesert(tile)) {
 
				ToggleDesert(tile);
 
				MarkTileDirtyByTile(tile);
 
@@ -909,7 +909,7 @@ static void TileLoop_Road(TileIndex tile
 

	
 
		{
 
			/* Adjust road ground type depending on 'grp' (grp is the distance to the center) */
 
			const Roadside* new_rs = (_opt.landscape == LT_CANDY) ? _town_road_types_2[grp] : _town_road_types[grp];
 
			const Roadside* new_rs = (_opt.landscape == LT_TOYLAND) ? _town_road_types_2[grp] : _town_road_types[grp];
 
			Roadside cur_rs = GetRoadside(tile);
 

	
 
			/* We have our desired type, do nothing */
src/roadveh_cmd.cpp
Show inline comments
 
@@ -639,7 +639,7 @@ static void HandleBrokenRoadVeh(Vehicle 
 
		InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
 

	
 
		if (!PlayVehicleSound(v, VSE_BREAKDOWN)) {
 
			SndPlayVehicleFx((_opt.landscape != LT_CANDY) ?
 
			SndPlayVehicleFx((_opt.landscape != LT_TOYLAND) ?
 
				SND_0F_VEHICLE_BREAKDOWN : SND_35_COMEDY_BREAKDOWN, v);
 
		}
 

	
src/ship_cmd.cpp
Show inline comments
 
@@ -208,7 +208,7 @@ static void HandleBrokenShip(Vehicle *v)
 
		InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
 

	
 
		if (!PlayVehicleSound(v, VSE_BREAKDOWN)) {
 
			SndPlayVehicleFx((_opt.landscape != LT_CANDY) ?
 
			SndPlayVehicleFx((_opt.landscape != LT_TOYLAND) ?
 
				SND_10_TRAIN_BREAKDOWN : SND_3A_COMEDY_BREAKDOWN_2, v);
 
		}
 

	
src/smallmap_gui.cpp
Show inline comments
 
@@ -492,7 +492,7 @@ static inline uint32 GetSmallMapVegetati
 

	
 
		case MP_TREES:
 
			if (GetTreeGround(tile) == TREE_GROUND_SNOW_DESERT) {
 
				bits = (_opt.landscape == LT_HILLY) ? MKCOLOR(0x98575798) : MKCOLOR(0xC25757C2);
 
				bits = (_opt.landscape == LT_ARCTIC) ? MKCOLOR(0x98575798) : MKCOLOR(0xC25757C2);
 
			} else {
 
				bits = MKCOLOR(0x54575754);
 
			}
src/station_cmd.cpp
Show inline comments
 
@@ -250,7 +250,7 @@ static bool GenerateStationName(Station 
 
				CountMapSquareAround(tile, MP_TREES, 0) >= 8 ||
 
				CountMapSquareAround(tile, MP_INDUSTRY, IT_FOREST) >= 2)
 
			) {
 
		found = _opt.landscape == LT_DESERT ?
 
		found = _opt.landscape == LT_TROPIC ?
 
			M(STR_SV_STNAME_FOREST) : M(STR_SV_STNAME_WOODS);
 
		goto done;
 
	}
src/strings.cpp
Show inline comments
 
@@ -953,7 +953,7 @@ static char *GenAndCoName(char *buff, ui
 
	const char* const* base;
 
	uint num;
 

	
 
	if (_opt_ptr->landscape == LT_CANDY) {
 
	if (_opt_ptr->landscape == LT_TOYLAND) {
 
		base = _silly_surname_list;
 
		num  = lengthof(_silly_surname_list);
 
	} else {
 
@@ -983,7 +983,7 @@ static char *GenPresidentName(char *buff
 
		buff = strecpy(buff, initial, last);
 
	}
 

	
 
	if (_opt_ptr->landscape == LT_CANDY) {
 
	if (_opt_ptr->landscape == LT_TOYLAND) {
 
		base = _silly_surname_list;
 
		num  = lengthof(_silly_surname_list);
 
	} else {
src/table/build_industry.h
Show inline comments
 
@@ -1100,7 +1100,7 @@ static const IndustrySpec _industry_spec
 
	   IT_POWER_STATION,  IT_INVALID,          IT_INVALID,       CHECK_NOTHING,
 
	   CT_COAL,       15, CT_INVALID,       0, 5,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_NORMAL | 1 << LT_HILLY,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TEMPERATE | 1 << LT_ARCTIC,
 
	   STR_4802_COAL_MINE,                     STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4836_NEW_COAL_SEAM_FOUND_AT,   STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1108,7 +1108,7 @@ static const IndustrySpec _industry_spec
 
	   IT_COAL_MINE,      IT_INVALID,          IT_INVALID,       CHECK_NOTHING,
 
	   CT_INVALID,     0, CT_INVALID,       0, 5,
 
	   CT_COAL,           CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_NOT_CLOSABLE,              1 << LT_NORMAL | 1 << LT_HILLY,
 
	   INDUSTRYLIFE_NOT_CLOSABLE,              1 << LT_TEMPERATE | 1 << LT_ARCTIC,
 
	   STR_4803_POWER_STATION,                 STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1116,7 +1116,7 @@ static const IndustrySpec _industry_spec
 
	   IT_FOREST,         IT_INVALID,          IT_INVALID,       CHECK_NOTHING,
 
	   CT_GOODS,       0, CT_INVALID,       0, 5,
 
	   CT_WOOD,           CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_NORMAL,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_TEMPERATE,
 
	   STR_4804_SAWMILL,                       STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4833_SUPPLY_PROBLEMS_CAUSE_TO,      STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1124,7 +1124,7 @@ static const IndustrySpec _industry_spec
 
	   IT_SAWMILL,        IT_PAPER_MILL,       IT_INVALID,       CHECK_FOREST,
 
	   CT_WOOD,       13, CT_INVALID,       0, 30,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_NORMAL | 1 << LT_HILLY,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TEMPERATE | 1 << LT_ARCTIC,
 
	   STR_4805_FOREST,                        STR_482E_NEW_BEING_PLANTED_NEAR,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4835_INCREASES_PRODUCTION,     STR_483A_INSECT_INFESTATION_CAUSES),
 

	
 
@@ -1132,7 +1132,7 @@ static const IndustrySpec _industry_spec
 
	   IT_OIL_RIG,        IT_INVALID,          IT_INVALID,       CHECK_REFINERY,
 
	   CT_GOODS,       0, CT_INVALID,       0, 5,
 
	   CT_OIL,            CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_NORMAL | 1 << LT_HILLY | 1 << LT_DESERT,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_TEMPERATE | 1 << LT_ARCTIC | 1 << LT_TROPIC,
 
	   STR_4806_OIL_REFINERY,                  STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4833_SUPPLY_PROBLEMS_CAUSE_TO,      STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1140,7 +1140,7 @@ static const IndustrySpec _industry_spec
 
	   IT_OIL_REFINERY,   IT_INVALID,          IT_INVALID,       CHECK_OIL_RIG,
 
	   CT_OIL,        15, CT_PASSENGERS,    2, 5,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_NORMAL,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TEMPERATE,
 
	   STR_4807_OIL_RIG,                       STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4837_NEW_OIL_RESERVES_FOUND,   STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1148,7 +1148,7 @@ static const IndustrySpec _industry_spec
 
	   IT_FARM,           IT_STEEL_MILL,       IT_INVALID,       CHECK_NOTHING,
 
	   CT_GOODS,       0, CT_INVALID,       0, 5,
 
	   CT_LIVESTOCK,      CT_GRAIN,            CT_STEEL,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_NORMAL,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_TEMPERATE,
 
	   STR_4808_FACTORY,                       STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4833_SUPPLY_PROBLEMS_CAUSE_TO,      STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1156,7 +1156,7 @@ static const IndustrySpec _industry_spec
 
	   IT_PAPER_MILL,     IT_INVALID,          IT_INVALID,       CHECK_NOTHING,
 
	   CT_GOODS,       0, CT_INVALID,       0, 5,
 
	   CT_PAPER,          CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_HILLY,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_ARCTIC,
 
	   STR_4809_PRINTING_WORKS,                STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4833_SUPPLY_PROBLEMS_CAUSE_TO,      STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1164,7 +1164,7 @@ static const IndustrySpec _industry_spec
 
	   IT_IRON_MINE,      IT_FACTORY,          IT_INVALID,       CHECK_NOTHING,
 
	   CT_STEEL,       0, CT_INVALID,       0, 5,
 
	   CT_IRON_ORE,       CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_NORMAL,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_TEMPERATE,
 
	   STR_480A_STEEL_MILL,                    STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4833_SUPPLY_PROBLEMS_CAUSE_TO,      STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1172,7 +1172,7 @@ static const IndustrySpec _industry_spec
 
	   IT_FACTORY,        IT_FOOD_PROCESS,     IT_INVALID,       CHECK_FARM,
 
	   CT_GRAIN,      10, CT_LIVESTOCK,    10, 5,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_NORMAL | 1 << LT_HILLY,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TEMPERATE | 1 << LT_ARCTIC,
 
	   STR_480B_FARM,                          STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES),
 

	
 
@@ -1180,7 +1180,7 @@ static const IndustrySpec _industry_spec
 
	   IT_FACTORY_2,      IT_INVALID,          IT_INVALID,       CHECK_NOTHING,
 
	   CT_COPPER_ORE, 10, CT_INVALID,       0, 5,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_DESERT,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TROPIC,
 
	   STR_480C_COPPER_ORE_MINE,               STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1188,7 +1188,7 @@ static const IndustrySpec _industry_spec
 
	   IT_OIL_REFINERY,   IT_INVALID,          IT_INVALID,       CHECK_NOTHING,
 
	   CT_OIL,        12, CT_INVALID,       0, 5,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_NORMAL | 1 << LT_HILLY | 1 << LT_DESERT,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TEMPERATE | 1 << LT_ARCTIC | 1 << LT_TROPIC,
 
	   STR_480D_OIL_WELLS,                     STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4837_NEW_OIL_RESERVES_FOUND,   STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1196,7 +1196,7 @@ static const IndustrySpec _industry_spec
 
	   IT_BANK_TEMP,      IT_INVALID,          IT_INVALID,       CHECK_NOTHING,
 
	   CT_VALUABLES,   6, CT_INVALID,       0, 5,
 
	   CT_VALUABLES,      CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_NOT_CLOSABLE,              1 << LT_NORMAL,
 
	   INDUSTRYLIFE_NOT_CLOSABLE,              1 << LT_TEMPERATE,
 
	   STR_480E_BANK,                          STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1204,7 +1204,7 @@ static const IndustrySpec _industry_spec
 
	   IT_FRUIT_PLANTATION, IT_FARM,           IT_FARM_2,        CHECK_NOTHING,
 
	   CT_FOOD,        0, CT_INVALID,       0, 5,
 
	   CT_FRUIT,          CT_MAIZE,            CT_INVALID,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_HILLY | 1 << LT_DESERT,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_ARCTIC | 1 << LT_TROPIC,
 
	   STR_480F_FOOD_PROCESSING_PLANT,         STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4833_SUPPLY_PROBLEMS_CAUSE_TO,      STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1212,7 +1212,7 @@ static const IndustrySpec _industry_spec
 
	   IT_FOREST,         IT_PRINTING_WORKS,   IT_INVALID,       CHECK_NOTHING,
 
	   CT_PAPER,       0, CT_INVALID,       0, 5,
 
	   CT_WOOD,           CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_HILLY,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_ARCTIC,
 
	   STR_4810_PAPER_MILL,                    STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4833_SUPPLY_PROBLEMS_CAUSE_TO,      STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1220,7 +1220,7 @@ static const IndustrySpec _industry_spec
 
	   IT_BANK_TROPIC_ARCTIC, IT_INVALID,      IT_INVALID,       CHECK_NOTHING,
 
	   CT_GOLD,        7, CT_INVALID,       0, 5,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_DESERT,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TROPIC,
 
	   STR_4811_GOLD_MINE,                     STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1228,7 +1228,7 @@ static const IndustrySpec _industry_spec
 
	   IT_GOLD_MINE,      IT_DIAMOND_MINE,     IT_INVALID,       CHECK_NOTHING,
 
	   CT_INVALID,     0, CT_INVALID,       0, 5,
 
	   CT_GOLD,           CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_NOT_CLOSABLE,              1 << LT_HILLY | 1 << LT_DESERT,
 
	   INDUSTRYLIFE_NOT_CLOSABLE,              1 << LT_ARCTIC | 1 << LT_TROPIC,
 
	   STR_4812_BANK,                          STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1236,7 +1236,7 @@ static const IndustrySpec _industry_spec
 
	   IT_BANK_TROPIC_ARCTIC, IT_INVALID,      IT_INVALID,       CHECK_NOTHING,
 
	   CT_DIAMONDS,    7, CT_INVALID,       0, 5,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_DESERT,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TROPIC,
 
	   STR_4813_DIAMOND_MINE,                  STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1244,7 +1244,7 @@ static const IndustrySpec _industry_spec
 
	   IT_STEEL_MILL,     IT_INVALID,          IT_INVALID,       CHECK_NOTHING,
 
	   CT_IRON_ORE,   10, CT_INVALID,       0, 5,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_NORMAL,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TEMPERATE,
 
	   STR_4814_IRON_ORE_MINE,                 STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1252,7 +1252,7 @@ static const IndustrySpec _industry_spec
 
	   IT_FOOD_PROCESS,   IT_INVALID,          IT_INVALID,       CHECK_PLANTATION,
 
	   CT_FRUIT,      10, CT_INVALID,       0, 15,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_DESERT,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TROPIC,
 
	   STR_4815_FRUIT_PLANTATION,              STR_482E_NEW_BEING_PLANTED_NEAR,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES),
 

	
 
@@ -1260,7 +1260,7 @@ static const IndustrySpec _industry_spec
 
	   IT_FACTORY_2,      IT_INVALID,          IT_INVALID,       CHECK_PLANTATION,
 
	   CT_RUBBER,     10, CT_INVALID,       0, 15,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_DESERT,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TROPIC,
 
	   STR_4816_RUBBER_PLANTATION,             STR_482E_NEW_BEING_PLANTED_NEAR,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES),
 

	
 
@@ -1268,7 +1268,7 @@ static const IndustrySpec _industry_spec
 
	   IT_WATER_TOWER,    IT_INVALID,          IT_INVALID,       CHECK_WATER,
 
	   CT_WATER,      12, CT_INVALID,       0, 5,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_DESERT,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TROPIC,
 
	   STR_4817_WATER_SUPPLY,                  STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1276,7 +1276,7 @@ static const IndustrySpec _industry_spec
 
	   IT_WATER_SUPPLY,   IT_INVALID,          IT_INVALID,       CHECK_WATER,
 
	   CT_INVALID,     0, CT_INVALID,       0, 5,
 
	   CT_WATER,          CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_NOT_CLOSABLE,              1 << LT_DESERT,
 
	   INDUSTRYLIFE_NOT_CLOSABLE,              1 << LT_TROPIC,
 
	   STR_4818_WATER_TOWER,                   STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1284,7 +1284,7 @@ static const IndustrySpec _industry_spec
 
	   IT_RUBBER_PLANTATION, IT_COPPER_MINE,   IT_LUMBER_MILL,   CHECK_PLANTATION,
 
	   CT_GOODS,       0, CT_INVALID,       0, 5,
 
	   CT_RUBBER,         CT_COPPER_ORE,       CT_WOOD,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_DESERT,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_TROPIC,
 
	   STR_4819_FACTORY,                       STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4833_SUPPLY_PROBLEMS_CAUSE_TO,      STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1292,7 +1292,7 @@ static const IndustrySpec _industry_spec
 
	   IT_FOOD_PROCESS,   IT_INVALID,          IT_INVALID,       CHECK_PLANTATION,
 
	   CT_MAIZE,      11, CT_INVALID,       0, 5,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_DESERT,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TROPIC,
 
	   STR_481A_FARM,                          STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES),
 

	
 
@@ -1300,7 +1300,7 @@ static const IndustrySpec _industry_spec
 
	   IT_FACTORY_2,      IT_INVALID,          IT_INVALID,       CHECK_LUMBERMILL,
 
	   CT_WOOD,        0, CT_INVALID,       0, 5,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_DESERT,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_TROPIC,
 
	   STR_481B_LUMBER_MILL,                   STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4834_LACK_OF_NEARBY_TREES_CAUSES,   STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1308,7 +1308,7 @@ static const IndustrySpec _industry_spec
 
	   IT_CANDY_FACTORY,  IT_INVALID,          IT_INVALID,       CHECK_NOTHING,
 
	   CT_COTTON_CANDY, 13, CT_INVALID,    0, 30,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_CANDY,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TOYLAND,
 
	   STR_481C_COTTON_CANDY_FOREST,           STR_482E_NEW_BEING_PLANTED_NEAR,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4838_IMPROVED_FARMING_METHODS, STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1316,7 +1316,7 @@ static const IndustrySpec _industry_spec
 
	   IT_COTTON_CANDY,   IT_TOFFEE_QUARRY,    IT_SUGAR_MINE,    CHECK_NOTHING,
 
	   CT_CANDY,       0, CT_INVALID,       0, 5,
 
	   CT_SUGAR,          CT_TOFFEE,           CT_COTTON_CANDY,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_CANDY,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_TOYLAND,
 
	   STR_481D_CANDY_FACTORY,                 STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4833_SUPPLY_PROBLEMS_CAUSE_TO,      STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1324,7 +1324,7 @@ static const IndustrySpec _industry_spec
 
	   IT_TOY_FACTORY,    IT_INVALID,          IT_INVALID,       CHECK_NOTHING,
 
	   CT_BATTERIES,  11, CT_INVALID,      0, 30,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_CANDY,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TOYLAND,
 
	   STR_481E_BATTERY_FARM,                  STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4838_IMPROVED_FARMING_METHODS, STR_483A_INSECT_INFESTATION_CAUSES),
 

	
 
@@ -1332,7 +1332,7 @@ static const IndustrySpec _industry_spec
 
	   IT_FIZZY_DRINK_FACTORY, IT_INVALID,     IT_INVALID,       CHECK_NOTHING,
 
	   CT_COLA,       12, CT_INVALID,       0, 5,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_CANDY,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TOYLAND,
 
	   STR_481F_COLA_WELLS,                    STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1340,7 +1340,7 @@ static const IndustrySpec _industry_spec
 
	   IT_TOY_FACTORY,    IT_INVALID,          IT_INVALID,       CHECK_NOTHING,
 
	   CT_INVALID,     0, CT_INVALID,       0, 5,
 
	   CT_TOYS,           CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_NOT_CLOSABLE,              1 << LT_CANDY,
 
	   INDUSTRYLIFE_NOT_CLOSABLE,              1 << LT_TOYLAND,
 
	   STR_4820_TOY_SHOP,                      STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4833_SUPPLY_PROBLEMS_CAUSE_TO,      STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1348,7 +1348,7 @@ static const IndustrySpec _industry_spec
 
	   IT_PLASTIC_FOUNTAINS, IT_BATTERY_FARM,  IT_TOY_SHOP,     CHECK_NOTHING,
 
	   CT_TOYS,        0, CT_INVALID,       0, 5,
 
	   CT_PLASTIC,        CT_BATTERIES,        CT_INVALID,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_CANDY,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_TOYLAND,
 
	   STR_4821_TOY_FACTORY,                   STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4833_SUPPLY_PROBLEMS_CAUSE_TO,      STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1356,7 +1356,7 @@ static const IndustrySpec _industry_spec
 
	   IT_TOY_FACTORY,    IT_INVALID,          IT_INVALID,       CHECK_NOTHING,
 
	   CT_PLASTIC,    14, CT_INVALID,       0, 5,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_CANDY,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TOYLAND,
 
	   STR_4822_PLASTIC_FOUNTAINS,             STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1364,7 +1364,7 @@ static const IndustrySpec _industry_spec
 
	   IT_COLA_WELLS,     IT_BUBBLE_GENERATOR, IT_INVALID,     CHECK_NOTHING,
 
	   CT_FIZZY_DRINKS, 0, CT_INVALID,      0, 5,
 
	   CT_COLA,           CT_BUBBLES,          CT_INVALID,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_CANDY,
 
	   INDUSTRYLIFE_CLOSABLE,                  1 << LT_TOYLAND,
 
	   STR_4823_FIZZY_DRINK_FACTORY,           STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4833_SUPPLY_PROBLEMS_CAUSE_TO,      STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1372,7 +1372,7 @@ static const IndustrySpec _industry_spec
 
	   IT_FIZZY_DRINK_FACTORY, IT_INVALID,     IT_INVALID,       CHECK_BUBBLEGEN,
 
	   CT_BUBBLES,    13, CT_INVALID,       0, 5,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_CANDY,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TOYLAND,
 
	   STR_4824_BUBBLE_GENERATOR,              STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1380,7 +1380,7 @@ static const IndustrySpec _industry_spec
 
	   IT_CANDY_FACTORY,  IT_INVALID,          IT_INVALID,       CHECK_NOTHING,
 
	   CT_TOFFEE,     10, CT_INVALID,       0, 5,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_CANDY,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TOYLAND,
 
	   STR_4825_TOFFEE_QUARRY,                 STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 

	
 
@@ -1388,7 +1388,7 @@ static const IndustrySpec _industry_spec
 
	   IT_CANDY_FACTORY,  IT_INVALID,          IT_INVALID,       CHECK_NOTHING,
 
	   CT_SUGAR,      11, CT_INVALID,       0, 5,
 
	   CT_INVALID,        CT_INVALID,          CT_INVALID,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_CANDY,
 
	   INDUSTRYLIFE_PRODUCTION,                1 << LT_TOYLAND,
 
	   STR_4826_SUGAR_MINE,                    STR_482D_NEW_UNDER_CONSTRUCTION,
 
	   STR_4832_ANNOUNCES_IMMINENT_CLOSURE,    STR_4835_INCREASES_PRODUCTION,     STR_4839_PRODUCTION_DOWN_BY_50),
 
};
src/tgp.cpp
Show inline comments
 
@@ -398,8 +398,8 @@ static void HeightMapSineTransform(heigh
 
		fheight = (double)(*h - h_min) / (double)(h_max - h_min);
 
		/* Apply sine transform depending on landscape type */
 
		switch(_opt.landscape) {
 
			case LT_CANDY:
 
			case LT_NORMAL:
 
			case LT_TOYLAND:
 
			case LT_TEMPERATE:
 
				/* Move and scale 0..1 into -1..+1 */
 
				fheight = 2 * fheight - 1;
 
				/* Sine transform */
 
@@ -408,7 +408,7 @@ static void HeightMapSineTransform(heigh
 
				fheight = 0.5 * (fheight + 1);
 
				break;
 

	
 
			case LT_HILLY:
 
			case LT_ARCTIC:
 
				{
 
					/* Arctic terrain needs special height distribution.
 
					 * Redistribute heights to have more tiles at highest (75%..100%) range */
 
@@ -429,7 +429,7 @@ static void HeightMapSineTransform(heigh
 
				}
 
				break;
 

	
 
			case LT_DESERT:
 
			case LT_TROPIC:
 
				{
 
					/* Desert terrain needs special height distribution.
 
					 * Half of tiles should be at lowest (0..25%) heights */
src/town_cmd.cpp
Show inline comments
 
@@ -1231,7 +1231,7 @@ static void DoBuildTownHouse(Town *t, Ti
 
		uint rad = GetTownRadiusGroup(t, tile);
 

	
 
		int land = _opt.landscape;
 
		if (land == LT_HILLY && z >= _opt.snow_line) land = -1;
 
		if (land == LT_ARCTIC && z >= _opt.snow_line) land = -1;
 

	
 
		bitmask = (1 << rad) + (1 << (land + 12));
 
	}
 
@@ -1698,10 +1698,10 @@ static void UpdateTownGrowRate(Town *t)
 
		m = _grow_count_values[min(n, 5) - 1];
 
	}
 

	
 
	if (_opt.landscape == LT_HILLY) {
 
	if (_opt.landscape == LT_ARCTIC) {
 
		if (TilePixelHeight(t->xy) >= GetSnowLine() && t->act_food == 0 && t->population > 90)
 
			return;
 
	} else if (_opt.landscape == LT_DESERT) {
 
	} else if (_opt.landscape == LT_TROPIC) {
 
		if (GetTropicZone(t->xy) == TROPICZONE_DESERT && (t->act_food==0 || t->act_water==0) && t->population > 60)
 
			return;
 
	}
src/train_cmd.cpp
Show inline comments
 
@@ -3214,7 +3214,7 @@ static void HandleBrokenTrain(Vehicle *v
 
		InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
 

	
 
		if (!PlayVehicleSound(v, VSE_BREAKDOWN)) {
 
			SndPlayVehicleFx((_opt.landscape != LT_CANDY) ?
 
			SndPlayVehicleFx((_opt.landscape != LT_TOYLAND) ?
 
				SND_10_TRAIN_BREAKDOWN : SND_3A_COMEDY_BREAKDOWN_2, v);
 
		}
 

	
src/tree_cmd.cpp
Show inline comments
 
@@ -28,13 +28,13 @@ enum TreePlacer {
 
static TreeType GetRandomTreeType(TileIndex tile, uint seed)
 
{
 
	switch (_opt.landscape) {
 
		case LT_NORMAL:
 
		case LT_TEMPERATE:
 
			return (TreeType)(seed * TREE_COUNT_TEMPERATE / 256 + TREE_TEMPERATE);
 

	
 
		case LT_HILLY:
 
		case LT_ARCTIC:
 
			return (TreeType)(seed * TREE_COUNT_SUB_ARCTIC / 256 + TREE_SUB_ARCTIC);
 

	
 
		case LT_DESERT:
 
		case LT_TROPIC:
 
			switch (GetTropicZone(tile)) {
 
				case TROPICZONE_INVALID: return (TreeType)(seed * TREE_COUNT_SUB_TROPICAL / 256 + TREE_SUB_TROPICAL);
 
				case TROPICZONE_DESERT:  return (TreeType)((seed > 12) ? TREE_INVALID : TREE_CACTUS);
 
@@ -54,7 +54,7 @@ static void PlaceTree(TileIndex tile, ui
 
		MakeTree(tile, tree, GB(r, 22, 2), min(GB(r, 16, 3), 6), TREE_GROUND_GRASS, 0);
 

	
 
		// above snowline?
 
		if (_opt.landscape == LT_HILLY && GetTileZ(tile) > GetSnowLine()) {
 
		if (_opt.landscape == LT_ARCTIC && GetTileZ(tile) > GetSnowLine()) {
 
			SetTreeGroundDensity(tile, TREE_GROUND_SNOW_DESERT, 3);
 
			SetTreeCounter(tile, (TreeGround)GB(r, 24, 3));
 
		} else {
 
@@ -151,7 +151,7 @@ void PlaceTreesRandomly()
 
			j = GetTileZ(tile) / TILE_HEIGHT * 2;
 
			while (j--) {
 
				/* Above snowline more trees! */
 
				if (_opt.landscape == LT_HILLY && ht > GetSnowLine()) {
 
				if (_opt.landscape == LT_ARCTIC && ht > GetSnowLine()) {
 
					PlaceTreeAtSameHeight(tile, ht);
 
					PlaceTreeAtSameHeight(tile, ht);
 
				};
 
@@ -162,7 +162,7 @@ void PlaceTreesRandomly()
 
	} while (--i);
 

	
 
	/* place extra trees at rainforest area */
 
	if (_opt.landscape == LT_DESERT) {
 
	if (_opt.landscape == LT_TROPIC) {
 
		i = ScaleByMapSize(15000);
 

	
 
		do {
 
@@ -187,16 +187,16 @@ void GenerateTrees()
 

	
 
	if (_patches.tree_placer == TP_NONE) return;
 

	
 
	if (_opt.landscape != LT_CANDY) PlaceMoreTrees();
 
	if (_opt.landscape != LT_TOYLAND) PlaceMoreTrees();
 

	
 
	switch (_patches.tree_placer) {
 
		case TP_ORIGINAL: i = _opt.landscape == LT_HILLY ? 15 : 6; break;
 
		case TP_IMPROVED: i = _opt.landscape == LT_HILLY ?  4 : 2; break;
 
		case TP_ORIGINAL: i = _opt.landscape == LT_ARCTIC ? 15 : 6; break;
 
		case TP_IMPROVED: i = _opt.landscape == LT_ARCTIC ?  4 : 2; break;
 
		default: NOT_REACHED(); return;
 
	}
 

	
 
	total = ScaleByMapSize(1000);
 
	if (_opt.landscape == LT_DESERT) total += ScaleByMapSize(15000);
 
	if (_opt.landscape == LT_TROPIC) total += ScaleByMapSize(15000);
 
	total *= i;
 
	SetGeneratingWorldProgress(GWP_TREE, total);
 

	
 
@@ -524,8 +524,8 @@ static void TileLoopTreesAlps(TileIndex 
 
static void TileLoop_Trees(TileIndex tile)
 
{
 
	switch (_opt.landscape) {
 
		case LT_DESERT: TileLoopTreesDesert(tile); break;
 
		case LT_HILLY:  TileLoopTreesAlps(tile);   break;
 
		case LT_TROPIC: TileLoopTreesDesert(tile); break;
 
		case LT_ARCTIC: TileLoopTreesAlps(tile);   break;
 
	}
 

	
 
	TileLoopClearHelper(tile);
 
@@ -538,7 +538,7 @@ static void TileLoop_Trees(TileIndex til
 

	
 
	switch (GetTreeGrowth(tile)) {
 
		case 3: /* regular sized tree */
 
			if (_opt.landscape == LT_DESERT &&
 
			if (_opt.landscape == LT_TROPIC &&
 
					GetTreeType(tile) != TREE_CACTUS &&
 
					GetTropicZone(tile) == TROPICZONE_DESERT) {
 
				AddTreeGrowth(tile, 1);
 
@@ -613,7 +613,7 @@ void OnTick_Trees()
 
	TreeType tree;
 

	
 
	/* place a tree at a random rainforest spot */
 
	if (_opt.landscape == LT_DESERT &&
 
	if (_opt.landscape == LT_TROPIC &&
 
			(r = Random(), tile = RandomTileSeed(r), GetTropicZone(tile) == TROPICZONE_RAINFOREST) &&
 
			IsTileType(tile, MP_CLEAR) &&
 
			!IsBridgeAbove(tile) &&
src/tunnelbridge_cmd.cpp
Show inline comments
 
@@ -1178,7 +1178,7 @@ static void TileLoop_TunnelBridge(TileIn
 
{
 
	bool snow_or_desert = IsTunnelTile(tile) ? HasTunnelSnowOrDesert(tile) : HasBridgeSnowOrDesert(tile);
 
	switch (_opt.landscape) {
 
		case LT_HILLY:
 
		case LT_ARCTIC:
 
			if (snow_or_desert != (GetTileZ(tile) > GetSnowLine())) {
 
				if (IsTunnelTile(tile)) {
 
					SetTunnelSnowOrDesert(tile, !snow_or_desert);
 
@@ -1189,7 +1189,7 @@ static void TileLoop_TunnelBridge(TileIn
 
			}
 
			break;
 

	
 
		case LT_DESERT:
 
		case LT_TROPIC:
 
			if (GetTropicZone(tile) == TROPICZONE_DESERT && !snow_or_desert) {
 
				if (IsTunnelTile(tile)) {
 
					SetTunnelSnowOrDesert(tile, true);
src/unmovable_cmd.cpp
Show inline comments
 
@@ -344,7 +344,7 @@ void GenerateUnmovables()
 
	uint maxx;
 
	uint maxy;
 

	
 
	if (_opt.landscape == LT_CANDY) return;
 
	if (_opt.landscape == LT_TOYLAND) return;
 

	
 
	/* add radio tower */
 
	i = ScaleByMapSize(1000);
 
@@ -362,7 +362,7 @@ void GenerateUnmovables()
 
		}
 
	} while (--i);
 

	
 
	if (_opt.landscape == LT_DESERT) return;
 
	if (_opt.landscape == LT_TROPIC) return;
 

	
 
	/* add lighthouses */
 
	i = li;
0 comments (0 inline, 0 general)