2156 |
2156 |
2157 SLE_REF(Vehicle,next_shared, REF_VEHICLE), |
2157 SLE_REF(Vehicle,next_shared, REF_VEHICLE), |
2158 SLE_REF(Vehicle,prev_shared, REF_VEHICLE), |
2158 SLE_REF(Vehicle,prev_shared, REF_VEHICLE), |
2159 |
2159 |
2160 // reserve extra space in savegame here. (currently 10 bytes) |
2160 // reserve extra space in savegame here. (currently 10 bytes) |
2161 SLE_CONDARR(NullStruct,null,SLE_FILE_U8 | SLE_VAR_NULL, 10, 2, SL_MAX_VERSION), |
2161 SLE_CONDNULL(10, 2, SL_MAX_VERSION), |
2162 |
2162 |
2163 SLE_END() |
2163 SLE_END() |
2164 }; |
2164 }; |
2165 |
2165 |
2166 |
2166 |
2173 SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRail,track), SLE_UINT8), |
2173 SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRail,track), SLE_UINT8), |
2174 |
2174 |
2175 SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRail,flags), SLE_UINT8, 2, SL_MAX_VERSION), |
2175 SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRail,flags), SLE_UINT8, 2, SL_MAX_VERSION), |
2176 SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRail,days_since_order_progr), SLE_UINT16, 2, SL_MAX_VERSION), |
2176 SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRail,days_since_order_progr), SLE_UINT16, 2, SL_MAX_VERSION), |
2177 |
2177 |
2178 SLE_CONDARR(NullStruct, null, SLE_FILE_U8 | SLE_VAR_NULL, 2, 2, 19), |
2178 SLE_CONDNULL(2, 2, 19), |
2179 // reserve extra space in savegame here. (currently 11 bytes) |
2179 // reserve extra space in savegame here. (currently 11 bytes) |
2180 SLE_CONDARR(NullStruct, null, SLE_FILE_U8 | SLE_VAR_NULL, 11, 2, SL_MAX_VERSION), |
2180 SLE_CONDNULL(11, 2, SL_MAX_VERSION), |
2181 |
2181 |
2182 SLE_END() |
2182 SLE_END() |
2183 }; |
2183 }; |
2184 |
2184 |
2185 static const SaveLoad _roadveh_desc[] = { |
2185 static const SaveLoad _roadveh_desc[] = { |
2195 |
2195 |
2196 SLE_CONDREFX(offsetof(Vehicle,u)+offsetof(VehicleRoad,slot), REF_ROADSTOPS, 6, SL_MAX_VERSION), |
2196 SLE_CONDREFX(offsetof(Vehicle,u)+offsetof(VehicleRoad,slot), REF_ROADSTOPS, 6, SL_MAX_VERSION), |
2197 SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,slotindex), SLE_UINT8, 6, SL_MAX_VERSION), |
2197 SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,slotindex), SLE_UINT8, 6, SL_MAX_VERSION), |
2198 SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,slot_age), SLE_UINT8, 6, SL_MAX_VERSION), |
2198 SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,slot_age), SLE_UINT8, 6, SL_MAX_VERSION), |
2199 // reserve extra space in savegame here. (currently 16 bytes) |
2199 // reserve extra space in savegame here. (currently 16 bytes) |
2200 SLE_CONDARR(NullStruct,null,SLE_FILE_U64 | SLE_VAR_NULL, 2, 2, SL_MAX_VERSION), |
2200 SLE_CONDNULL(16, 2, SL_MAX_VERSION), |
2201 |
2201 |
2202 SLE_END() |
2202 SLE_END() |
2203 }; |
2203 }; |
2204 |
2204 |
2205 static const SaveLoad _ship_desc[] = { |
2205 static const SaveLoad _ship_desc[] = { |
2206 SLE_WRITEBYTE(Vehicle,type,VEH_Ship, 2), // Ship type. VEH_Ship in mem, 2 in file. |
2206 SLE_WRITEBYTE(Vehicle,type,VEH_Ship, 2), // Ship type. VEH_Ship in mem, 2 in file. |
2207 SLE_INCLUDEX(0, INC_VEHICLE_COMMON), |
2207 SLE_INCLUDEX(0, INC_VEHICLE_COMMON), |
2208 SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleShip,state), SLE_UINT8), |
2208 SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleShip,state), SLE_UINT8), |
2209 |
2209 |
2210 // reserve extra space in savegame here. (currently 16 bytes) |
2210 // reserve extra space in savegame here. (currently 16 bytes) |
2211 SLE_CONDARR(NullStruct,null,SLE_FILE_U64 | SLE_VAR_NULL, 2, 2, SL_MAX_VERSION), |
2211 SLE_CONDNULL(16, 2, SL_MAX_VERSION), |
2212 |
2212 |
2213 SLE_END() |
2213 SLE_END() |
2214 }; |
2214 }; |
2215 |
2215 |
2216 static const SaveLoad _aircraft_desc[] = { |
2216 static const SaveLoad _aircraft_desc[] = { |
2225 SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleAir,state), SLE_UINT8), |
2225 SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleAir,state), SLE_UINT8), |
2226 |
2226 |
2227 SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleAir,previous_pos), SLE_UINT8, 2, SL_MAX_VERSION), |
2227 SLE_CONDVARX(offsetof(Vehicle,u)+offsetof(VehicleAir,previous_pos), SLE_UINT8, 2, SL_MAX_VERSION), |
2228 |
2228 |
2229 // reserve extra space in savegame here. (currently 15 bytes) |
2229 // reserve extra space in savegame here. (currently 15 bytes) |
2230 SLE_CONDARR(NullStruct,null,SLE_FILE_U8 | SLE_VAR_NULL, 15, 2, SL_MAX_VERSION), |
2230 SLE_CONDNULL(15, 2, SL_MAX_VERSION), |
2231 |
2231 |
2232 SLE_END() |
2232 SLE_END() |
2233 }; |
2233 }; |
2234 |
2234 |
2235 static const SaveLoad _special_desc[] = { |
2235 static const SaveLoad _special_desc[] = { |
2257 |
2257 |
2258 SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleSpecial,unk0), SLE_UINT16), |
2258 SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleSpecial,unk0), SLE_UINT16), |
2259 SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleSpecial,unk2), SLE_UINT8), |
2259 SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleSpecial,unk2), SLE_UINT8), |
2260 |
2260 |
2261 // reserve extra space in savegame here. (currently 16 bytes) |
2261 // reserve extra space in savegame here. (currently 16 bytes) |
2262 SLE_CONDARR(NullStruct,null,SLE_FILE_U64 | SLE_VAR_NULL, 2, 2, SL_MAX_VERSION), |
2262 SLE_CONDNULL(16, 2, SL_MAX_VERSION), |
2263 |
2263 |
2264 SLE_END() |
2264 SLE_END() |
2265 }; |
2265 }; |
2266 |
2266 |
2267 static const SaveLoad _disaster_desc[] = { |
2267 static const SaveLoad _disaster_desc[] = { |
2299 |
2299 |
2300 SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleDisaster,image_override), SLE_UINT16), |
2300 SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleDisaster,image_override), SLE_UINT16), |
2301 SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleDisaster,unk2), SLE_UINT16), |
2301 SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleDisaster,unk2), SLE_UINT16), |
2302 |
2302 |
2303 // reserve extra space in savegame here. (currently 16 bytes) |
2303 // reserve extra space in savegame here. (currently 16 bytes) |
2304 SLE_CONDARR(NullStruct,null,SLE_FILE_U64 | SLE_VAR_NULL, 2, 2, SL_MAX_VERSION), |
2304 SLE_CONDNULL(16, 2, SL_MAX_VERSION), |
2305 |
2305 |
2306 SLE_END() |
2306 SLE_END() |
2307 }; |
2307 }; |
2308 |
2308 |
2309 |
2309 |