OpenTTD Source 20260206-master-g4d4e37dbf1
CargoTypeMapSpriteGroupHandler< T, Tclass > Struct Template Reference

Common handler for mapping sprite groups for features which support cargo-type specific sprites. More...

Inheritance diagram for CargoTypeMapSpriteGroupHandler< T, Tclass >:
MapSpriteGroupHandler

Public Member Functions

void MapSpecific (uint16_t local_id, uint8_t cid, const SpriteGroup *group) override
 Map a SpriteGroup to specific 'cargo type' of a specification.
void MapDefault (uint16_t local_id, const SpriteGroup *group) override
 Map default/fallback SpriteGroup to a specification.

Detailed Description

template<typename T, typename Tclass>
struct CargoTypeMapSpriteGroupHandler< T, Tclass >

Common handler for mapping sprite groups for features which support cargo-type specific sprites.

Definition at line 207 of file newgrf_act3.cpp.

Member Function Documentation

◆ MapDefault()

template<typename T, typename Tclass>
void CargoTypeMapSpriteGroupHandler< T, Tclass >::MapDefault ( uint16_t local_id,
const SpriteGroup * group )
inlineoverridevirtual

Map default/fallback SpriteGroup to a specification.

Parameters
local_idThe NewGRF-local id to map to.
groupThe SpriteGroup to link to the specification.

Implements MapSpriteGroupHandler.

Definition at line 220 of file newgrf_act3.cpp.

References GetSpec(), and CargoGRFFileProps::SG_DEFAULT.

◆ MapSpecific()

template<typename T, typename Tclass>
void CargoTypeMapSpriteGroupHandler< T, Tclass >::MapSpecific ( uint16_t local_id,
uint8_t cid,
const SpriteGroup * group )
inlineoverridevirtual

Map a SpriteGroup to specific 'cargo type' of a specification.

Parameters
local_idThe NewGRF-local id to map to.
cidThe 'cargo type' to map for.
groupThe SpriteGroup to link to the specification.

Implements MapSpriteGroupHandler.

Definition at line 208 of file newgrf_act3.cpp.

References GetSpec(), and IsValidCargoType().


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