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

OpenTTD Source 1.11.0-RC1

Data Structures | Functions | Variables
cargomonitor_sl.cpp File Reference
`#include "../stdafx.h"`
`#include "../cargomonitor.h"`
`#include "saveload.h"`
`#include "../safeguards.h"`

Go to the source code of this file.

## Data Structures
struct | TempStorage
| Temporary storage of cargo monitoring data for loading or saving it. More...

## Functions
static CargoMonitorID | FixupCargoMonitor (CargoMonitorID number)
static void | SaveDelivery ()
| Save the _cargo_deliveries monitoring map.
static void | LoadDelivery ()
| Load the _cargo_deliveries monitoring map.
static void | SavePickup ()
| Save the _cargo_pickups monitoring map.
static void | LoadPickup ()
| Load the _cargo_pickups monitoring map.

## Variables
static const SaveLoad | _cargomonitor_pair_desc []
| Description of the TempStorage structure for the purpose of load and save. More...
const ChunkHandler | _cargomonitor_chunk_handlers []
| Chunk definition of the cargomonitoring maps. More...

## Detailed Description

Code handling saving and loading of Cargo monitoring.

Definition in file cargomonitor_sl.cpp.

## Variable Documentation

## ◆ _cargomonitor_chunk_handlers

const ChunkHandler _cargomonitor_chunk_handlers[]

Initial value:
= {
{ 'CMDL', SaveDelivery, LoadDelivery, nullptr, nullptr, CH_ARRAY},
{ 'CMPU', SavePickup, LoadPickup, nullptr, nullptr, CH_ARRAY | CH_LAST},
}

Chunk definition of the cargomonitoring maps.

## ◆ _cargomonitor_pair_desc

const SaveLoad _cargomonitor_pair_desc[]
| static

Initial value:
= {
SLE_VAR(TempStorage, number, SLE_UINT32),
SLE_VAR(TempStorage, amount, SLE_UINT32),
}

Description of the TempStorage structure for the purpose of load and save.

Definition at line 24 of file cargomonitor_sl.cpp.

Referenced by LoadDelivery(), and LoadPickup().

CH_LAST
@ CH_LAST
Last chunk in this array.
Definition: saveload.h:410
LoadDelivery
static void LoadDelivery()
Load the _cargo_deliveries monitoring map.
Definition: cargomonitor_sl.cpp:65
SaveDelivery
static void SaveDelivery()
Save the _cargo_deliveries monitoring map.
Definition: cargomonitor_sl.cpp:46
LoadPickup
static void LoadPickup()
Load the _cargo_pickups monitoring map.
Definition: cargomonitor_sl.cpp:103
TempStorage
Temporary storage of cargo monitoring data for loading or saving it.
Definition: cargomonitor_sl.cpp:18
SLE_VAR
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:621
SavePickup
static void SavePickup()
Save the _cargo_pickups monitoring map.
Definition: cargomonitor_sl.cpp:84