OpenTTD Source: src/saveload/order_sl.cpp File Reference

OpenTTD Source 1.11.0-RC1

Functions | Variables
order_sl.cpp File Reference
`#include "../stdafx.h"`
`#include "../order_backup.h"`
`#include "../settings_type.h"`
`#include "../network/network.h"`
`#include "saveload_internal.h"`
`#include "../safeguards.h"`

Go to the source code of this file.

## 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...
const SaveLoad * | GetOrderDescription ()
static void | Save_ORDR ()
static void | Load_ORDR ()
static void | Ptrs_ORDR ()
const SaveLoad * | GetOrderListDescription ()
static void | Save_ORDL ()
static void | Load_ORDL ()
static void | Ptrs_ORDL ()
const SaveLoad * | GetOrderBackupDescription ()
static void | Save_BKOR ()
void | Load_BKOR ()
static void | Ptrs_BKOR ()

## Variables
const ChunkHandler | _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

  packed | packed order

Returns
  unpacked order

Definition at line 89 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

  packed | packed order

Returns
  unpacked order

Definition at line 79 of file order_sl.cpp.

References GB().

Referenced by UnpackOldOrder().

## Variable Documentation

## ◆ _order_chunk_handlers

const ChunkHandler _order_chunk_handlers[]

Initial value:
= {
{ 'BKOR', Save_BKOR, Load_BKOR, Ptrs_BKOR, nullptr, CH_ARRAY},
{ 'ORDR', Save_ORDR, Load_ORDR, Ptrs_ORDR, nullptr, CH_ARRAY},
{ 'ORDL', Save_ORDL, Load_ORDL, Ptrs_ORDL, nullptr, CH_ARRAY | CH_LAST},
}
CH_LAST
@ CH_LAST
Last chunk in this array.
Definition: saveload.h:410