summaryrefslogtreecommitdiff
path: root/src/oldloader.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-12-20 01:35:12 +0000
committersmatz <smatz@openttd.org>2008-12-20 01:35:12 +0000
commitd1ea0502321e38f38011e481b1daff4a14d583cc (patch)
tree2e5026c17011a6b8a6d73ea849156242e69cae97 /src/oldloader.cpp
parent383d8713cb3616c2141f09db2debf54cce8284a9 (diff)
downloadopenttd-d1ea0502321e38f38011e481b1daff4a14d583cc.tar.xz
(svn r14700) -Fix (r1): loading of very old savegames was broken (STNS chunk is stored before MAP in old savegame)
Diffstat (limited to 'src/oldloader.cpp')
-rw-r--r--src/oldloader.cpp25
1 files changed, 1 insertions, 24 deletions
diff --git a/src/oldloader.cpp b/src/oldloader.cpp
index 67fa7742d..89fbb297f 100644
--- a/src/oldloader.cpp
+++ b/src/oldloader.cpp
@@ -325,18 +325,6 @@ static void FixOldTowns()
}
}
-static void FixOldStations()
-{
- Station *st;
-
- FOR_ALL_STATIONS(st) {
- /* Check if we need to swap width and height for the station */
- if (st->train_tile != 0 && GetRailStationAxis(st->train_tile) != AXIS_X) {
- Swap(st->trainst_w, st->trainst_h);
- }
- }
-}
-
static StringID *_old_vehicle_names = NULL;
static void FixOldVehicles()
@@ -614,7 +602,6 @@ static bool LoadOldCargoPaymentRate(LoadgameState *ls, int num)
return true;
}
-static uint8 _old_platforms;
static uint _current_station_id;
static uint16 _waiting_acceptance;
static uint8 _cargo_source;
@@ -659,8 +646,7 @@ static const OldChunks station_chunk[] = {
OCL_SVAR( OC_TILE, Station, train_tile ),
OCL_SVAR( OC_TILE, Station, airport_tile ),
OCL_SVAR( OC_TILE, Station, dock_tile ),
-
- OCL_VAR ( OC_UINT8, 1, &_old_platforms ),
+ OCL_SVAR( OC_UINT8, Station, trainst_w ),
OCL_NULL( 1 ), ///< sort-index, no longer in use
OCL_NULL( 2 ), ///< sign-width, no longer in use
@@ -700,14 +686,6 @@ static bool LoadOldStation(LoadgameState *ls, int num)
return false;
if (st->IsValid()) {
- if (st->train_tile) {
- /* Calculate the trainst_w and trainst_h */
- uint w = GB(_old_platforms, 3, 3);
- uint h = GB(_old_platforms, 0, 3);
- st->trainst_w = w;
- st->trainst_h = h;
- }
-
st->town = GetTown(REMAP_TOWN_IDX(_old_town_index));
st->string_id = RemapOldStringID(_old_string_id);
}
@@ -1692,7 +1670,6 @@ static bool LoadOldMain(LoadgameState *ls)
/* Fix the game to be compatible with OpenTTD */
FixOldTowns();
- FixOldStations();
FixOldVehicles();
/* We have a new difficulty setting */