OpenTTD Source 20250531-master-g621c031307
|
Sprite groups indexed by CargoType. More...
#include <newgrf_commons.h>
Static Public Attributes | |
static constexpr CargoType | SG_DEFAULT = NUM_CARGO |
Default type used when no more-specific cargo matches. | |
static constexpr CargoType | SG_PURCHASE = NUM_CARGO + 1 |
Used in purchase lists before an item exists. | |
static constexpr CargoType | SG_DEFAULT_NA = NUM_CARGO + 2 |
Used only by stations and roads when no more-specific cargo matches. | |
Additional Inherited Members | |
![]() | |
using | ValueType = std::pair< CargoType, const struct SpriteGroup * > |
![]() | |
const SpriteGroup * | GetSpriteGroup (CargoType index) const |
Get the SpriteGroup at the specified index. | |
const struct SpriteGroup * | GetFirstSpriteGroupOf (std::initializer_list< CargoType > indices) const |
Get the first existing SpriteGroup from a list of options. | |
void | SetSpriteGroup (CargoType index, const SpriteGroup *spritegroup) |
Set the SpriteGroup at the specified index. | |
![]() | |
void | SetGRFFile (const struct GRFFile *grffile) |
Set the NewGRF file, and its grfid, associated with grf props. | |
bool | HasGrfFile () const |
Test if this entity was introduced by NewGRF. | |
![]() | |
std::vector< ValueType > | spritegroups |
pointers to the different sprite groups of the entity | |
![]() | |
uint16_t | local_id = 0 |
id defined by the grf file for this entity | |
uint32_t | grfid = 0 |
grfid that introduced this entity. | |
const struct GRFFile * | grffile = nullptr |
grf file that introduced this entity | |
Sprite groups indexed by CargoType.
Definition at line 456 of file newgrf_commons.h.
Default type used when no more-specific cargo matches.
Definition at line 457 of file newgrf_commons.h.
Referenced by StationResolverObject::ResolveReal(), StationResolverObject::StationResolverObject(), and VehicleResolverObject::VehicleResolverObject().
Used only by stations and roads when no more-specific cargo matches.
Definition at line 459 of file newgrf_commons.h.
Referenced by StationResolverObject::ResolveReal(), and StationResolverObject::StationResolverObject().
Used in purchase lists before an item exists.
Definition at line 458 of file newgrf_commons.h.
Referenced by StationResolverObject::ResolveReal(), StationResolverObject::StationResolverObject(), and VehicleResolverObject::VehicleResolverObject().