OpenTTD Source 20260208-master-g43af8e94d0
NewGRFMappingChunkHandler Struct Reference
Inheritance diagram for NewGRFMappingChunkHandler:
ChunkHandler APIDChunkHandler ATIDChunkHandler HIDSChunkHandler IIDSChunkHandler OBIDChunkHandler TIDSChunkHandler

Public Member Functions

 NewGRFMappingChunkHandler (uint32_t id, OverrideManagerBase &mapping)
void Save () const override
 Save a GRF ID + local id -> OpenTTD's id mapping.
void Load () const override
 Load a GRF ID + local id -> OpenTTD's id mapping.
Public Member Functions inherited from ChunkHandler
 ChunkHandler (uint32_t id, ChunkType type)
virtual void FixPointers () const
 Fix the pointers.
virtual void LoadCheck (size_t len=0) const
 Load the chunk for game preview.
std::string GetName () const

Data Fields

OverrideManagerBasemapping
Data Fields inherited from ChunkHandler
uint32_t id
 Unique ID (4 letters).
ChunkType type
 Type of the chunk.

Detailed Description

Definition at line 16 of file newgrf_sl.h.

Constructor & Destructor Documentation

◆ NewGRFMappingChunkHandler()

NewGRFMappingChunkHandler::NewGRFMappingChunkHandler ( uint32_t id,
OverrideManagerBase & mapping )
inline

Definition at line 19 of file newgrf_sl.h.

Member Function Documentation

◆ Load()

void NewGRFMappingChunkHandler::Load ( ) const
overridevirtual

Load a GRF ID + local id -> OpenTTD's id mapping.

Implements ChunkHandler.

Definition at line 47 of file newgrf_sl.cpp.

References _newgrf_mapping_desc, _newgrf_mapping_sl_compat, SlCompatTableHeader(), SlErrorCorrupt(), SlIterateArray(), and SlObject().

◆ Save()

void NewGRFMappingChunkHandler::Save ( ) const
overridevirtual

Save a GRF ID + local id -> OpenTTD's id mapping.

Reimplemented from ChunkHandler.

Definition at line 32 of file newgrf_sl.cpp.

References _newgrf_mapping_desc, SlObject(), and SlTableHeader().

Field Documentation

◆ mapping

OverrideManagerBase& NewGRFMappingChunkHandler::mapping

Definition at line 17 of file newgrf_sl.h.


The documentation for this struct was generated from the following files: