OpenTTD Source 20241224-master-gf74b0cf984
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 15 of file newgrf_sl.h.

Constructor & Destructor Documentation

◆ NewGRFMappingChunkHandler()

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

Definition at line 18 of file newgrf_sl.h.

Member Function Documentation

◆ Load()

void NewGRFMappingChunkHandler::Load ( ) const
overridevirtual

◆ 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, OverrideManagerBase::mappings, SlObject(), and SlTableHeader().

Field Documentation

◆ mapping

OverrideManagerBase& NewGRFMappingChunkHandler::mapping

Definition at line 16 of file newgrf_sl.h.


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