|
OpenTTD Source 20251104-master-g3befbdd52f
|
Code handling saving and loading of waypoints. More...
#include "../stdafx.h"#include "../waypoint_base.h"#include "../debug.h"#include "../newgrf_station.h"#include "../vehicle_base.h"#include "../town.h"#include "../newgrf.h"#include "../timer/timer_game_calendar.h"#include "saveload_internal.h"#include "table/strings.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... | |
| struct | CHKPChunkHandler |
Typedefs | |
| using | OldWaypointID = uint16_t |
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. | |
| void | ResetOldWaypoints () |
| const ChunkHandlerTable | _waypoint_chunk_handlers (waypoint_chunk_handlers) |
Variables | |
| static std::vector< OldWaypoint > | _old_waypoints |
| Temporary array with old waypoints. | |
| static const SaveLoad | _old_waypoint_desc [] |
| static const CHKPChunkHandler | CHKP |
| static const ChunkHandlerRef | waypoint_chunk_handlers [] |
Code handling saving and loading of waypoints.
Definition in file waypoint_sl.cpp.
| using OldWaypointID = uint16_t |
Definition at line 24 of 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 68 of file waypoint_sl.cpp.
References _old_waypoints, AllocateSpecToStation(), AssignSpecToStation(), BaseStation::build_date, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_station_pool >::CanAllocateItem(), Debug, BaseStation::delete_ctr, BaseStation::facilities, GB(), NewGRFClass< Tspec, Tindex, Tmax >::Get(), GetRailTileType(), GetRailType(), NewGRFClass< Tspec, Tindex, Tmax >::GetSpec(), GetTileOwner(), StationSpec::grf_prop, GRFFilePropsBase::grfid, HasBit(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem< Tpool >::index, INVALID_TILE, IsSavegameVersionBefore(), IsTileType(), Map::Iterate(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_orderlist_pool >::Iterate(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_vehicle_pool >::Iterate(), GRFFilePropsBase::local_id, Tile::m2(), Tile::m3(), Tile::m4(), Tile::m5(), MakeRailWaypoint(), MP_RAILWAY, BaseStation::name, BaseStation::owner, BaseStation::rect, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Set(), SetCustomStationSpecIndex(), SetRailStationReservation(), SlError(), SlErrorCorrupt(), SLV_100, SLV_17, NewGRFClass< Tspec, Tindex, Tmax >::Specs(), STAT_CLASS_WAYP, BaseStation::string_id, BaseStation::town, Waypoint::town_cn, Train, UpdateWaypointOrder(), and VEH_TRAIN.
Referenced by AfterLoadGame().
| void ResetOldWaypoints | ( | ) |
Definition at line 164 of file waypoint_sl.cpp.
|
static |
Update the waypoint orders to get the new waypoint ID.
| o | the order 'list' to check. |
Definition at line 52 of file waypoint_sl.cpp.
References _old_waypoints, Order::GetDestination(), Order::IsType(), and Order::SetDestination().
Referenced by MoveWaypointsToBaseStations().
|
static |
Definition at line 170 of file waypoint_sl.cpp.
|
static |
Temporary array with old waypoints.
Definition at line 46 of file waypoint_sl.cpp.
Referenced by CHKPChunkHandler::FixPointers(), CHKPChunkHandler::Load(), MoveWaypointsToBaseStations(), and UpdateWaypointOrder().
|
static |
Definition at line 234 of file waypoint_sl.cpp.
|
static |
Definition at line 235 of file waypoint_sl.cpp.