OpenTTD
Data Structures | Functions | Variables
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 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.
const ChunkHandler _cargomonitor_chunk_handlers []
 Chunk definition of the cargomonitoring maps.

Detailed Description

Code handling saving and loading of Cargo monitoring.

Definition in file cargomonitor_sl.cpp.

Function Documentation

static void LoadDelivery ( )
static

Load the _cargo_deliveries monitoring map.

Definition at line 52 of file cargomonitor_sl.cpp.

References _cargo_deliveries, ClearCargoDeliveryMonitoring(), SlIterateArray(), and SlObject().

static void LoadPickup ( )
static

Load the _cargo_pickups monitoring map.

Definition at line 87 of file cargomonitor_sl.cpp.

References _cargo_pickups, ClearCargoPickupMonitoring(), SlIterateArray(), and SlObject().

static void SaveDelivery ( )
static

Save the _cargo_deliveries monitoring map.

Definition at line 33 of file cargomonitor_sl.cpp.

References _cargo_deliveries, and SlObject().

static void SavePickup ( )
static

Save the _cargo_pickups monitoring map.

Definition at line 68 of file cargomonitor_sl.cpp.

References _cargo_pickups, and SlObject().

Variable Documentation

const ChunkHandler _cargomonitor_chunk_handlers[]
Initial value:
{
{ 'CMDL', SaveDelivery, LoadDelivery, NULL, NULL, CH_ARRAY},
{ 'CMPU', SavePickup, LoadPickup, NULL, NULL, CH_ARRAY | CH_LAST},
}

Chunk definition of the cargomonitoring maps.

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 26 of file cargomonitor_sl.cpp.