equal
deleted
inserted
replaced
5 */ |
5 */ |
6 |
6 |
7 #include "stdafx.h" |
7 #include "stdafx.h" |
8 #include "openttd.h" |
8 #include "openttd.h" |
9 #include "variables.h" |
9 #include "variables.h" |
10 #include "clear_map.h" |
10 #include "landscape.h" |
11 #include "town.h" |
11 #include "town.h" |
12 #include "industry.h" |
12 #include "industry.h" |
13 #include "newgrf.h" |
13 #include "newgrf.h" |
14 #include "newgrf_commons.h" |
14 #include "newgrf_commons.h" |
15 |
15 |
227 * Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline */ |
227 * Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline */ |
228 uint32 GetTerrainType(TileIndex tile) |
228 uint32 GetTerrainType(TileIndex tile) |
229 { |
229 { |
230 switch (_opt.landscape) { |
230 switch (_opt.landscape) { |
231 case LT_TROPIC: return GetTropicZone(tile) == TROPICZONE_DESERT ? 1 : 2; |
231 case LT_TROPIC: return GetTropicZone(tile) == TROPICZONE_DESERT ? 1 : 2; |
232 case LT_ARCTIC: return (GetClearGround(tile) == CLEAR_SNOW) ? 4 : 0; |
232 case LT_ARCTIC: return GetTileZ(tile) >= GetSnowLine() ? 4 : 0; |
233 default: return 0; |
233 default: return 0; |
234 } |
234 } |
235 } |
235 } |
236 |
236 |
237 TileIndex GetNearbyTile(byte parameter, TileIndex tile) |
237 TileIndex GetNearbyTile(byte parameter, TileIndex tile) |