OpenTTD Source  12.0-beta2
order_sl.cpp File Reference
#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
 
struct  ORDLChunkHandler
 
struct  BKORChunkHandler
 

Functions

static Order UnpackVersion4Order (uint16 packed)
 Unpacks a order from savegames with version 4 and lower. More...
 
Order UnpackOldOrder (uint16 packed)
 Unpacks a order from savegames made with TTD(Patch) More...
 
SaveLoadTable GetOrderDescription ()
 
SaveLoadTable GetOrderListDescription ()
 
SaveLoadTable GetOrderBackupDescription ()
 

Variables

static const BKORChunkHandler BKOR
 
static const ORDRChunkHandler ORDR
 
static const ORDLChunkHandler ORDL
 
static const ChunkHandlerRef order_chunk_handlers []
 
const ChunkHandlerTable _order_chunk_handlers (order_chunk_handlers)
 

Detailed Description

Code handling saving and loading of orders

Definition in file order_sl.cpp.

Function Documentation

◆ UnpackOldOrder()

Order UnpackOldOrder ( uint16  packed)

Unpacks a order from savegames made with TTD(Patch)

Parameters
packedpacked order
Returns
unpacked order

Definition at line 92 of file order_sl.cpp.

References Order::IsType(), and UnpackVersion4Order().

◆ UnpackVersion4Order()

static Order UnpackVersion4Order ( uint16  packed)
static

Unpacks a order from savegames with version 4 and lower.

Parameters
packedpacked order
Returns
unpacked order

Definition at line 82 of file order_sl.cpp.

References GB().

Referenced by UnpackOldOrder().

Variable Documentation

◆ order_chunk_handlers

const ChunkHandlerRef order_chunk_handlers[]
static
Initial value:
= {
BKOR,
ORDR,
ORDL,
}

Definition at line 316 of file order_sl.cpp.