equal
deleted
inserted
replaced
10 #include "rail_map.h" |
10 #include "rail_map.h" |
11 #include "road_map.h" |
11 #include "road_map.h" |
12 #include "table/sprites.h" |
12 #include "table/sprites.h" |
13 #include "table/strings.h" |
13 #include "table/strings.h" |
14 #include "map.h" |
14 #include "map.h" |
|
15 #include "landscape.h" |
15 #include "tile.h" |
16 #include "tile.h" |
16 #include "town_map.h" |
17 #include "town_map.h" |
17 #include "tunnel_map.h" |
18 #include "tunnel_map.h" |
18 #include "vehicle.h" |
19 #include "vehicle.h" |
19 #include "viewport.h" |
20 #include "viewport.h" |
1297 image = dts->ground_sprite; |
1298 image = dts->ground_sprite; |
1298 if (image != SPR_FLAT_GRASS_TILE) image += rti->total_offset; |
1299 if (image != SPR_FLAT_GRASS_TILE) image += rti->total_offset; |
1299 |
1300 |
1300 // adjust ground tile for desert |
1301 // adjust ground tile for desert |
1301 // don't adjust for snow, because snow in depots looks weird |
1302 // don't adjust for snow, because snow in depots looks weird |
1302 if (IsSnowRailGround(ti->tile) && _opt.landscape == LT_DESERT) { |
1303 if (IsSnowRailGround(ti->tile) && _opt.landscape == LT_TROPIC) { |
1303 if (image != SPR_FLAT_GRASS_TILE) { |
1304 if (image != SPR_FLAT_GRASS_TILE) { |
1304 image += rti->snow_offset; // tile with tracks |
1305 image += rti->snow_offset; // tile with tracks |
1305 } else { |
1306 } else { |
1306 image = SPR_FLAT_SNOWY_TILE; // flat ground |
1307 image = SPR_FLAT_SNOWY_TILE; // flat ground |
1307 } |
1308 } |
1741 { |
1742 { |
1742 RailGroundType old_ground = GetRailGroundType(tile); |
1743 RailGroundType old_ground = GetRailGroundType(tile); |
1743 RailGroundType new_ground; |
1744 RailGroundType new_ground; |
1744 |
1745 |
1745 switch (_opt.landscape) { |
1746 switch (_opt.landscape) { |
1746 case LT_HILLY: |
1747 case LT_ARCTIC: |
1747 if (GetTileZ(tile) > _opt.snow_line) { |
1748 if (GetTileZ(tile) > GetSnowLine()) { |
1748 new_ground = RAIL_GROUND_ICE_DESERT; |
1749 new_ground = RAIL_GROUND_ICE_DESERT; |
1749 goto set_ground; |
1750 goto set_ground; |
1750 } |
1751 } |
1751 break; |
1752 break; |
1752 |
1753 |
1753 case LT_DESERT: |
1754 case LT_TROPIC: |
1754 if (GetTropicZone(tile) == TROPICZONE_DESERT) { |
1755 if (GetTropicZone(tile) == TROPICZONE_DESERT) { |
1755 new_ground = RAIL_GROUND_ICE_DESERT; |
1756 new_ground = RAIL_GROUND_ICE_DESERT; |
1756 goto set_ground; |
1757 goto set_ground; |
1757 } |
1758 } |
1758 break; |
1759 break; |