OpenTTD Source 20250609-master-g3908df5fbe
|
Code handling saving and loading of orders. More...
#include "../stdafx.h"
#include "saveload.h"
#include "compat/order_sl_compat.h"
#include "saveload_internal.h"
#include "../order_backup.h"
#include "../settings_type.h"
#include "../network/network.h"
#include "../safeguards.h"
Go to the source code of this file.
Data Structures | |
struct | ORDRChunkHandler |
class | SlOrders< T > |
struct | ORDLChunkHandler |
struct | BKORChunkHandler |
Functions | |
static Order | UnpackVersion4Order (uint16_t packed) |
Unpacks a order from savegames with version 4 and lower. | |
Order | UnpackOldOrder (uint16_t packed) |
Unpacks a order from savegames made with TTD(Patch) | |
void | ClearOldOrders () |
Clear all old orders. | |
OldOrderSaveLoadItem * | GetOldOrder (size_t ref_index) |
Get a pointer to an old order with the given reference index. | |
OldOrderSaveLoadItem & | AllocateOldOrder (size_t pool_index) |
Allocate an old order with the given pool index. | |
SaveLoadTable | GetOrderDescription () |
SaveLoadTable | GetOrderListDescription () |
SaveLoadTable | GetOrderBackupDescription () |
const ChunkHandlerTable | _order_chunk_handlers (order_chunk_handlers) |
Variables | |
static std::vector< OldOrderSaveLoadItem > | _old_order_saveload_pool |
Temporary storage for conversion from old order pool. | |
static const BKORChunkHandler | BKOR |
static const ORDRChunkHandler | ORDR |
static const ORDLChunkHandler | ORDL |
static const ChunkHandlerRef | order_chunk_handlers [] |
Code handling saving and loading of orders.
Definition in file order_sl.cpp.
OldOrderSaveLoadItem & AllocateOldOrder | ( | size_t | pool_index | ) |
Allocate an old order with the given pool index.
pool_index | Pool index (zero-based) to allocate. |
Definition at line 134 of file order_sl.cpp.
References _old_order_saveload_pool.
Referenced by ORDRChunkHandler::Load().
void ClearOldOrders | ( | ) |
Clear all old orders.
Definition at line 111 of file order_sl.cpp.
References _old_order_saveload_pool.
Referenced by AfterLoadGame(), and ResetSaveloadData().
OldOrderSaveLoadItem * GetOldOrder | ( | size_t | ref_index | ) |
Get a pointer to an old order with the given reference index.
ref_index | Reference index (one-based) to get. |
Definition at line 122 of file order_sl.cpp.
References _old_order_saveload_pool.
Referenced by ORDLChunkHandler::FixPointers(), BKORChunkHandler::FixPointers(), and ORDRChunkHandler::Load().
SaveLoadTable GetOrderBackupDescription | ( | ) |
Definition at line 293 of file order_sl.cpp.
SaveLoadTable GetOrderDescription | ( | ) |
Definition at line 141 of file order_sl.cpp.
SaveLoadTable GetOrderListDescription | ( | ) |
Definition at line 237 of file order_sl.cpp.
Order UnpackOldOrder | ( | uint16_t | packed | ) |
Unpacks a order from savegames made with TTD(Patch)
packed | packed order |
Definition at line 92 of file order_sl.cpp.
References Order::IsType(), Order::MakeDummy(), and UnpackVersion4Order().
|
static |
Unpacks a order from savegames with version 4 and lower.
packed | packed order |
Definition at line 82 of file order_sl.cpp.
References GB().
Referenced by ORDRChunkHandler::Load(), and UnpackOldOrder().
|
static |
Temporary storage for conversion from old order pool.
Definition at line 106 of file order_sl.cpp.
Referenced by AllocateOldOrder(), ClearOldOrders(), GetOldOrder(), and ORDRChunkHandler::Load().
|
static |
Definition at line 369 of file order_sl.cpp.
|
static |
Definition at line 372 of file order_sl.cpp.
|
static |
Definition at line 371 of file order_sl.cpp.
|
static |
Definition at line 370 of file order_sl.cpp.