1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-10 06:52:05 +01:00

Codechange: Use EnumBitSet for LandscapeTypes and remove LandscapeID. (#13436)

This commit is contained in:
Peter Nelson
2025-02-01 23:09:18 +00:00
committed by GitHub
parent 9ff485b329
commit 59354576d4
49 changed files with 521 additions and 503 deletions

View File

@@ -2596,7 +2596,7 @@ static void TileLoop_Track(TileIndex tile)
}
switch (_settings_game.game_creation.landscape) {
case LT_ARCTIC: {
case LandscapeType::Arctic: {
auto [slope, z] = GetTileSlopeZ(tile);
bool half = false;
@@ -2652,12 +2652,15 @@ static void TileLoop_Track(TileIndex tile)
break;
}
case LT_TROPIC:
case LandscapeType::Tropic:
if (GetTropicZone(tile) == TROPICZONE_DESERT) {
new_ground = RAIL_GROUND_ICE_DESERT;
goto set_ground;
}
break;
default:
break;
}
new_ground = RAIL_GROUND_GRASS;