OpenTTD Source 20241224-master-gee860a5c8e
cargomonitor_sl.cpp File Reference

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

#include "../stdafx.h"
#include "saveload.h"
#include "compat/cargomonitor_sl_compat.h"
#include "../cargomonitor.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...
 
struct  CMDLChunkHandler
 _cargo_deliveries monitoring map. More...
 
struct  CMPUChunkHandler
 _cargo_pickups monitoring map. More...
 

Functions

static CargoMonitorID FixupCargoMonitor (CargoMonitorID number)
 
const ChunkHandlerTable _cargomonitor_chunk_handlers (cargomonitor_chunk_handlers)
 

Variables

static const SaveLoad _cargomonitor_pair_desc []
 Description of the TempStorage structure for the purpose of load and save.
 
static const CMDLChunkHandler CMDL
 Chunk definition of the cargomonitoring maps.
 
static const CMPUChunkHandler CMPU
 
static const ChunkHandlerRef cargomonitor_chunk_handlers []
 

Detailed Description

Code handling saving and loading of Cargo monitoring.

Definition in file cargomonitor_sl.cpp.

Function Documentation

◆ FixupCargoMonitor()

static CargoMonitorID FixupCargoMonitor ( CargoMonitorID  number)
static

Definition at line 31 of file cargomonitor_sl.cpp.

Variable Documentation

◆ _cargomonitor_pair_desc

const SaveLoad _cargomonitor_pair_desc[]
static
Initial value:
= {
SLE_VAR(TempStorage, number, SLE_UINT32),
SLE_VAR(TempStorage, amount, SLE_UINT32),
}
#define SLE_VAR(base, variable, type)
Storage of a variable in every version of a savegame.
Definition saveload.h:1002
Temporary storage of cargo monitoring data for loading or saving it.

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

Definition at line 26 of file cargomonitor_sl.cpp.

Referenced by CMDLChunkHandler::Load(), CMPUChunkHandler::Load(), CMDLChunkHandler::Save(), and CMPUChunkHandler::Save().

◆ cargomonitor_chunk_handlers

const ChunkHandlerRef cargomonitor_chunk_handlers[]
static
Initial value:
= {
CMPU,
}
static const CMDLChunkHandler CMDL
Chunk definition of the cargomonitoring maps.

Definition at line 135 of file cargomonitor_sl.cpp.

◆ CMDL

const CMDLChunkHandler CMDL
static

Chunk definition of the cargomonitoring maps.

Definition at line 133 of file cargomonitor_sl.cpp.

◆ CMPU

const CMPUChunkHandler CMPU
static

Definition at line 134 of file cargomonitor_sl.cpp.