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

Code handling saving and loading of newgrf config. More...

#include "../stdafx.h"
#include "saveload.h"
#include "compat/newgrf_sl_compat.h"
#include "newgrf_sl.h"
#include "../fios.h"
#include "../safeguards.h"

Go to the source code of this file.

Data Structures

struct  NGRFChunkHandler

Functions

const ChunkHandlerTable _newgrf_chunk_handlers (newgrf_chunk_handlers)

Variables

static const SaveLoad _newgrf_mapping_desc []
 Save and load the mapping between a spec and the NewGRF it came from.
static const NGRFChunkHandler NGRF
static const ChunkHandlerRef newgrf_chunk_handlers []

Detailed Description

Code handling saving and loading of newgrf config.

Definition in file newgrf_sl.cpp.

Variable Documentation

◆ _newgrf_mapping_desc

const SaveLoad _newgrf_mapping_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
@ ExtendEntityMapping
Saveload version: 311, GitHub pull request: 10672 Extend entity mapping range.
Definition saveload.h:359
@ MinVersion
First savegame version.
Definition saveload.h:37
Maps an entity id stored on the map to a GRF file.
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

Save and load the mapping between a spec and the NewGRF it came from.

Definition at line 21 of file newgrf_sl.cpp.

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

◆ newgrf_chunk_handlers

const ChunkHandlerRef newgrf_chunk_handlers[]
static
Initial value:
= {
NGRF,
}

Definition at line 146 of file newgrf_sl.cpp.

◆ NGRF

const NGRFChunkHandler NGRF
static

Definition at line 145 of file newgrf_sl.cpp.