OpenTTD Source 20260917-master-gec444f7315
storage_sl.cpp File Reference

Code handling saving and loading of persistent storages. More...

#include "../stdafx.h"
#include "saveload.h"
#include "compat/storage_sl_compat.h"
#include "../newgrf_storage.h"
#include "../safeguards.h"

Go to the source code of this file.

Data Structures

struct  PSACChunkHandler
 Persistent storage data. More...

Functions

const ChunkHandlerTable _persistent_storage_chunk_handlers (persistent_storage_chunk_handlers)

Variables

static const SaveLoad _storage_desc []
 Description of the data to save and load in PersistentStorage.
static const PSACChunkHandler PSAC
static const ChunkHandlerRef persistent_storage_chunk_handlers []

Detailed Description

Code handling saving and loading of persistent storages.

Definition in file storage_sl.cpp.

Variable Documentation

◆ _storage_desc

const SaveLoad _storage_desc[]
static
Initial value:
= {
}
#define SLE_OBJECT_ADDRESS(base, variable)
Macro to be able to pass the variable type and construct the SaveLoad::AddressFunction given a base c...
Definition saveload.h:754
@ MultipleRoadStops
Saveload version: 6.0, SVN revision: 1721 Multi tile road stops, and some map size related fixes.
Definition saveload.h:53
@ PersistentStoragePool
Saveload version: 161, SVN revision: 22567 Store persistent storage in a pool.
Definition saveload.h:243
@ ExtendPersistentStorage
Saveload version: 201, GitHub pull request: 6885 Extend NewGRF persistent storages.
Definition saveload.h:291
Class for pooled persistent storage of data.
static SaveLoad Variable(std::string name, AddressFunction< T > address_func, SaveLoadVersion from=SaveLoadVersion::MinVersion, SaveLoadVersion to=SaveLoadVersion::MaxVersion, size_t extra=0)
Storage of a variable in some savegame versions.
Definition saveload.h:926
static SaveLoad Array(std::string name, AddressFunction< T > address_func, SaveLoadVersion from=SaveLoadVersion::MinVersion, SaveLoadVersion to=SaveLoadVersion::MaxVersion, size_t extra=0)
Storage of an array in some savegame versions.
Definition saveload.h:1026

Description of the data to save and load in PersistentStorage.

Definition at line 20 of file storage_sl.cpp.

Referenced by PSACChunkHandler::Load(), and PSACChunkHandler::Save().

◆ persistent_storage_chunk_handlers

const ChunkHandlerRef persistent_storage_chunk_handlers[]
static
Initial value:
= {
PSAC,
}

Definition at line 57 of file storage_sl.cpp.

◆ PSAC

const PSACChunkHandler PSAC
static

Definition at line 56 of file storage_sl.cpp.