diff options
author | rubidium <rubidium@openttd.org> | 2009-07-22 16:56:36 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-22 16:56:36 +0000 |
commit | 3bcfa7c52ad592ccfaf58ad499e78fd89aea6722 (patch) | |
tree | 93679153f8b75af75846228e5cd2c1a1a1ed0296 /src/saveload/oldloader_sl.cpp | |
parent | 13a7c550ad86f94bdf0dca83cd402cfd1ca6e8ba (diff) | |
download | openttd-3bcfa7c52ad592ccfaf58ad499e78fd89aea6722.tar.xz |
(svn r16917) -Codechange: fix some GCC 4.5 'case X is not in enum Y' warnings
Diffstat (limited to 'src/saveload/oldloader_sl.cpp')
-rw-r--r-- | src/saveload/oldloader_sl.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index fceb86df0..0702a170e 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -204,18 +204,20 @@ static bool FixTTOMapArray() { for (TileIndex t = 0; t < OLD_MAP_SIZE; t++) { TileType tt = GetTileType(t); + if (tt == 11) { + /* TTO has a different way of storing monorail. + * Instead of using bits in m3 it uses a different tile type. */ + _m[t].m3 = 1; // rail type = monorail (in TTD) + SetTileType(t, MP_RAILWAY); + _m[t].m2 = 1; // set monorail ground to RAIL_GROUND_GRASS + tt = MP_RAILWAY; + } switch (tt) { case MP_CLEAR: break; case MP_RAILWAY: - case 11: // monorail - if (tt == 11) { - _m[t].m3 = 1; // rail type = monorail - _m[t].type_height &= 0x1F; // -> MP_RAILWAY - _m[t].m2 = 1; // set monorail ground to RAIL_GROUND_GRASS - } switch (GB(_m[t].m5, 6, 2)) { case 0: // RAIL_TILE_NORMAL break; |