(svn r6142) -Codechange: added WaypointID (sorry DV, couldn't splits it anymore)

-Codechange: introduced DestinationID, which is in fact an union of several types
  Used in Order struct, so no longer StationID is abused for all targets.
  Hangars are a big exception, as they use a station-id with GOTO_DEPOT (go figure)
This commit is contained in:
truelight
2006-08-26 16:34:03 +00:00
parent f73a2829f3
commit db8dfcd6e9
23 changed files with 172 additions and 157 deletions

View File

@@ -2193,12 +2193,12 @@ const SaveLoad _common_veh_desc[] = {
type and flags (which were both 4 bits) into type. Later on this is
converted correctly */
SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, type), SLE_UINT8, 0, 4),
SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, station), SLE_FILE_U8 | SLE_VAR_U16, 0, 4),
SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, dest.station), SLE_FILE_U8 | SLE_VAR_U16, 0, 4),
/* Orders for version 5 and on */
SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, type), SLE_UINT8, 5, SL_MAX_VERSION),
SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, flags), SLE_UINT8, 5, SL_MAX_VERSION),
SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, station), SLE_UINT16, 5, SL_MAX_VERSION),
SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, dest.station), SLE_UINT16, 5, SL_MAX_VERSION),
SLE_REF(Vehicle, orders, REF_ORDER),
@@ -2363,8 +2363,8 @@ static const SaveLoad _disaster_desc[] = {
SLE_VAR(Vehicle, z_height, SLE_UINT8),
SLE_VAR(Vehicle, owner, SLE_UINT8),
SLE_VAR(Vehicle, vehstatus, SLE_UINT8),
SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, station), SLE_FILE_U8 | SLE_VAR_U16, 0, 4),
SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, station), SLE_UINT16, 5, SL_MAX_VERSION),
SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, dest.station), SLE_FILE_U8 | SLE_VAR_U16, 0, 4),
SLE_CONDVARX(offsetof(Vehicle, current_order) + offsetof(Order, dest.station), SLE_UINT16, 5, SL_MAX_VERSION),
SLE_VAR(Vehicle, cur_image, SLE_UINT16),
SLE_CONDVAR(Vehicle, age, SLE_FILE_U16 | SLE_VAR_I32, 0, 30),