OpenTTD
cargomonitor_sl.cpp File Reference

Code handling saving and loading of Cargo monitoring. More...

#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. More...
 
static void LoadDelivery ()
 Load the _cargo_deliveries monitoring map. More...
 
static void SavePickup ()
 Save the _cargo_pickups monitoring map. More...
 
static void LoadPickup ()
 Load the _cargo_pickups monitoring map. More...
 

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.

Function Documentation

◆ LoadDelivery()

static void LoadDelivery ( )
static

◆ LoadPickup()

static void LoadPickup ( )
static

◆ SaveDelivery()

static void SaveDelivery ( )
static

Save the _cargo_deliveries monitoring map.

Definition at line 48 of file cargomonitor_sl.cpp.

References _cargo_deliveries.

◆ SavePickup()

static void SavePickup ( )
static

Save the _cargo_pickups monitoring map.

Definition at line 86 of file cargomonitor_sl.cpp.

References _cargo_pickups.

Variable Documentation

◆ _cargomonitor_chunk_handlers

const ChunkHandler _cargomonitor_chunk_handlers[]
Initial value:
= {
{ 'CMDL', SaveDelivery, LoadDelivery, NULL, NULL, CH_ARRAY},
{ 'CMPU', SavePickup, LoadPickup, NULL, NULL, CH_ARRAY | CH_LAST},
}
static void SavePickup()
Save the _cargo_pickups monitoring map.
static void SaveDelivery()
Save the _cargo_deliveries monitoring map.
static void LoadDelivery()
Load the _cargo_deliveries monitoring map.
static void LoadPickup()
Load the _cargo_pickups monitoring map.
Last chunk in this array.
Definition: saveload.h:381

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),
}
Temporary storage of cargo monitoring data for loading or saving it.
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition: saveload.h:584

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

Definition at line 26 of file cargomonitor_sl.cpp.