OpenTTD Source: EngineIDMapping Struct Reference

OpenTTD Source 15.0-RC2

Public Member Functions | Static Public Member Functions | Data Fields
EngineIDMapping Struct Reference

## Public Member Functions
uint64_t | Key () const
| EngineIDMapping (uint32_t grfid, uint16_t internal_id, VehicleType type, uint8_t substitute_id, EngineID engine)

## Static Public Member Functions
static uint64_t | Key (uint32_t grfid, uint16_t internal_id)

## Data Fields
uint32_t | grfid = 0
| The GRF ID of the file the entity belongs to.
uint16_t | internal_id = 0
| The internal ID within the GRF file.
VehicleType | type {}
| The engine type.
uint8_t | substitute_id = 0
| The (original) entity ID to use if this GRF is not available (currently not used)
EngineID | engine {}

## Detailed Description

Definition at line 203 of file engine_base.h.

## Constructor & Destructor Documentation

## ◆ EngineIDMapping() [1/2]

EngineIDMapping::EngineIDMapping | ( |  | ) |
| inline

Definition at line 214 of file engine_base.h.

## ◆ EngineIDMapping() [2/2]

EngineIDMapping::EngineIDMapping | ( | uint32_t | grfid,
|  | uint16_t | internal_id,
|  | VehicleType | type,
|  | uint8_t | substitute_id,
|  | EngineID | engine
| ) |  |
| inline

Definition at line 215 of file engine_base.h.

## Member Function Documentation

## ◆ Key() [1/2]

uint64_t EngineIDMapping::Key | ( |  | ) | const
| inline

Definition at line 212 of file engine_base.h.

## ◆ Key() [2/2]

static uint64_t EngineIDMapping::Key | ( | uint32_t | grfid,
|  | uint16_t | internal_id
| ) |  |
| inlinestatic

Definition at line 210 of file engine_base.h.

## Field Documentation

## ◆ engine

EngineID EngineIDMapping::engine {}

Definition at line 208 of file engine_base.h.

## ◆ grfid

uint32_t EngineIDMapping::grfid = 0

The GRF ID of the file the entity belongs to.

Definition at line 204 of file engine_base.h.

Referenced by EIDSChunkHandler::Load().

## ◆ internal_id

uint16_t EngineIDMapping::internal_id = 0

The internal ID within the GRF file.

Definition at line 205 of file engine_base.h.

Referenced by EIDSChunkHandler::Load().

## ◆ substitute_id

uint8_t EngineIDMapping::substitute_id = 0

The (original) entity ID to use if this GRF is not available (currently not used)

Definition at line 207 of file engine_base.h.

Referenced by EIDSChunkHandler::Load().

## ◆ type

VehicleType EngineIDMapping::type {}

The engine type.

Definition at line 206 of file engine_base.h.

Referenced by EIDSChunkHandler::Load().

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

- src/engine_base.h