summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp10
-rw-r--r--src/saveload/oldloader_sl.cpp16
-rw-r--r--src/saveload/station_sl.cpp12
-rw-r--r--src/saveload/vehicle_sl.cpp2
4 files changed, 20 insertions, 20 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 15777af79..abe4013ee 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -594,8 +594,8 @@ bool AfterLoadGame()
if (CheckSavegameVersion(139)) {
Station *st;
FOR_ALL_STATIONS(st) {
- if (st->airport.tile != INVALID_TILE && st->airport_type == 15) {
- st->airport_type = AT_OILRIG;
+ if (st->airport.tile != INVALID_TILE && st->airport.type == 15) {
+ st->airport.type = AT_OILRIG;
}
}
}
@@ -734,7 +734,7 @@ bool AfterLoadGame()
* It was 3 (till 2.2) and later 5 (till 5.1).
* Setting it unconditionally does not hurt.
*/
- Station::GetByTile(t)->airport_type = AT_OILRIG;
+ Station::GetByTile(t)->airport.type = AT_OILRIG;
} else {
DeleteOilRig(t);
}
@@ -2095,8 +2095,8 @@ bool AfterLoadGame()
Station *st;
FOR_ALL_STATIONS(st) {
if (st->airport.tile != INVALID_TILE) {
- st->airport.w = st->GetAirportSpec()->size_x;
- st->airport.h = st->GetAirportSpec()->size_y;
+ st->airport.w = st->airport.GetSpec()->size_x;
+ st->airport.h = st->airport.GetSpec()->size_y;
}
}
}
diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp
index f745808c0..e6dc18660 100644
--- a/src/saveload/oldloader_sl.cpp
+++ b/src/saveload/oldloader_sl.cpp
@@ -732,11 +732,11 @@ static const OldChunks station_chunk[] = {
OCL_SVAR( OC_UINT8, Station, delete_ctr ),
OCL_SVAR( OC_UINT8, Station, owner ),
OCL_SVAR( OC_UINT8, Station, facilities ),
- OCL_SVAR( OC_TTD | OC_UINT8, Station, airport_type ),
- OCL_SVAR( OC_TTO | OC_FILE_U16 | OC_VAR_U64, Station, airport_flags ),
+ OCL_SVAR( OC_TTD | OC_UINT8, Station, airport.type ),
+ OCL_SVAR( OC_TTO | OC_FILE_U16 | OC_VAR_U64, Station, airport.flags ),
OCL_NULL( 3 ), ///< bus/truck status, blocked months, no longer in use
OCL_CNULL( OC_TTD, 1 ), ///< unknown
- OCL_SVAR( OC_TTD | OC_FILE_U16 | OC_VAR_U64, Station, airport_flags ),
+ OCL_SVAR( OC_TTD | OC_FILE_U16 | OC_VAR_U64, Station, airport.flags ),
OCL_CNULL( OC_TTD, 2 ), ///< last_vehicle. now last_vehicle_type
OCL_CNULL( OC_TTD, 4 ), ///< junk at end of chunk
@@ -760,12 +760,12 @@ static bool LoadOldStation(LoadgameState *ls, int num)
st->string_id = _old_string_id + 0x2800; // custom name
}
- if (HasBit(st->airport_flags, 8)) {
- st->airport_type = 1; // large airport
- } else if (HasBit(st->airport_flags, 6)) {
- st->airport_type = 3; // oil rig
+ if (HasBit(st->airport.flags, 8)) {
+ st->airport.type = 1; // large airport
+ } else if (HasBit(st->airport.flags, 6)) {
+ st->airport.type = 3; // oil rig
} else {
- st->airport_type = 0; // small airport
+ st->airport.type = 0; // small airport
}
} else {
st->string_id = RemapOldStringID(_old_string_id);
diff --git a/src/saveload/station_sl.cpp b/src/saveload/station_sl.cpp
index c705e2b61..a1f12ab44 100644
--- a/src/saveload/station_sl.cpp
+++ b/src/saveload/station_sl.cpp
@@ -172,14 +172,14 @@ static const SaveLoad _old_station_desc[] = {
SLE_VAR(Station, delete_ctr, SLE_UINT8),
SLE_VAR(Station, owner, SLE_UINT8),
SLE_VAR(Station, facilities, SLE_UINT8),
- SLE_VAR(Station, airport_type, SLE_UINT8),
+ SLE_VAR(Station, airport.type, SLE_UINT8),
SLE_CONDNULL(2, 0, 5), ///< Truck/bus stop status
SLE_CONDNULL(1, 0, 4), ///< Blocked months
- SLE_CONDVAR(Station, airport_flags, SLE_VAR_U64 | SLE_FILE_U16, 0, 2),
- SLE_CONDVAR(Station, airport_flags, SLE_VAR_U64 | SLE_FILE_U32, 3, 45),
- SLE_CONDVAR(Station, airport_flags, SLE_UINT64, 46, SL_MAX_VERSION),
+ SLE_CONDVAR(Station, airport.flags, SLE_VAR_U64 | SLE_FILE_U16, 0, 2),
+ SLE_CONDVAR(Station, airport.flags, SLE_VAR_U64 | SLE_FILE_U32, 3, 45),
+ SLE_CONDVAR(Station, airport.flags, SLE_UINT64, 46, SL_MAX_VERSION),
SLE_CONDNULL(2, 0, 25), ///< last-vehicle
SLE_CONDVAR(Station, last_vehicle_type, SLE_UINT8, 26, SL_MAX_VERSION),
@@ -334,8 +334,8 @@ static const SaveLoad _station_desc[] = {
SLE_VAR(Station, airport.tile, SLE_UINT32),
SLE_CONDVAR(Station, airport.w, SLE_FILE_U8 | SLE_VAR_U16, 140, SL_MAX_VERSION),
SLE_CONDVAR(Station, airport.h, SLE_FILE_U8 | SLE_VAR_U16, 140, SL_MAX_VERSION),
- SLE_VAR(Station, airport_type, SLE_UINT8),
- SLE_VAR(Station, airport_flags, SLE_UINT64),
+ SLE_VAR(Station, airport.type, SLE_UINT8),
+ SLE_VAR(Station, airport.flags, SLE_UINT64),
SLE_VAR(Station, indtype, SLE_UINT8),
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp
index d3f3e44d7..e45e7114c 100644
--- a/src/saveload/vehicle_sl.cpp
+++ b/src/saveload/vehicle_sl.cpp
@@ -165,7 +165,7 @@ void UpdateOldAircraft()
/* set airport_flags to 0 for all airports just to be sure */
Station *st;
FOR_ALL_STATIONS(st) {
- st->airport_flags = 0; // reset airport
+ st->airport.flags = 0; // reset airport
}
Aircraft *a;