| OpenTTD
    | 
Code handling saving and loading of waypoints. More...
#include "../stdafx.h"#include "../waypoint_base.h"#include "../newgrf_station.h"#include "../vehicle_base.h"#include "../town.h"#include "../newgrf.h"#include "table/strings.h"#include "saveload_internal.h"#include "../safeguards.h"Go to the source code of this file.
| Data Structures | |
| struct | OldWaypoint | 
| Helper structure to convert from the old waypoint system.  More... | |
| Functions | |
| static void | UpdateWaypointOrder (Order *o) | 
| Update the waypoint orders to get the new waypoint ID. | |
| void | MoveWaypointsToBaseStations () | 
| Perform all steps to upgrade from the old waypoints to the new version that uses station. | |
| static void | Load_WAYP () | 
| static void | Ptrs_WAYP () | 
| Variables | |
| static SmallVector < OldWaypoint, 16 > | _old_waypoints | 
| Temporary array with old waypoints. | |
| static const SaveLoad | _old_waypoint_desc [] | 
| const ChunkHandler | _waypoint_chunk_handlers [] | 
Code handling saving and loading of waypoints.
Definition in file waypoint_sl.cpp.
| void MoveWaypointsToBaseStations | ( | ) | 
Perform all steps to upgrade from the old waypoints to the new version that uses station.
This includes some old saveload mechanics.
Definition at line 67 of file waypoint_sl.cpp.
References _m, AllocateSpecToStation(), SmallVector< T, S >::Begin(), BaseStation::build_date, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_station_pool >::CanAllocateItem(), Vehicle::current_order, BaseStation::delete_ctr, SmallVector< T, S >::End(), FACIL_TRAIN, BaseStation::facilities, FOR_ALL_VEHICLES, GB(), NewGRFClass< Tspec, Tid, Tmax >::Get(), OrderList::GetFirstOrder(), OrderList::GetFirstSharedVehicle(), GetRailTileType(), GetRailType(), NewGRFClass< Tspec, Tid, Tmax >::GetSpecCount(), GetTileOwner(), StationSpec::grf_prop, GRFFilePropsBase< Tcnt >::grffile, HasBit(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, IsSavegameVersionBefore(), IsTileType(), SmallVector< T, S >::Length(), GRFFilePropsBase< Tcnt >::local_id, Tile::m2, Tile::m3, Tile::m4, MakeRailWaypoint(), MP_RAILWAY, BaseStation::name, Order::next, BaseStation::owner, BaseStation::rect, SmallVector< T, S >::Reset(), SetCustomStationSpecIndex(), SetRailStationReservation(), SlError(), STAT_CLASS_WAYP, BaseStation::string_id, BaseStation::town, Waypoint::town_cn, BaseVehicle::type, UpdateWaypointOrder(), and VEH_TRAIN.
Referenced by AfterLoadGame().
| 
 | static | 
Update the waypoint orders to get the new waypoint ID.
| o | the order 'list' to check. | 
Definition at line 51 of file waypoint_sl.cpp.
References SmallVector< T, S >::Begin(), SmallVector< T, S >::End(), Order::GetDestination(), Order::IsType(), and Order::SetDestination().
Referenced by MoveWaypointsToBaseStations().
| 
 | static | 
Definition at line 152 of file waypoint_sl.cpp.
| 
 | static | 
Temporary array with old waypoints.
Definition at line 45 of file waypoint_sl.cpp.
| const ChunkHandler _waypoint_chunk_handlers[] | 
 1.8.1.2
 1.8.1.2