OpenTTD Source 20241224-master-gf74b0cf984
|
Makes class IDs unique to each GRF file. More...
#include <newgrf_house.h>
Data Fields | |
uint32_t | grfid |
The GRF ID of the file this class belongs to. | |
uint8_t | class_id |
The class id within the grf file. | |
Makes class IDs unique to each GRF file.
Houses can be assigned class IDs which are only comparable within the GRF file they were defined in. This mapping ensures that if two houses have the same class as defined by the GRF file, the classes are different within the game. An array of HouseClassMapping structs is created, and the array index of the struct that matches both the GRF ID and the class ID is the class ID used in the game.
Although similar to the HouseIDMapping struct above, this serves a different purpose. Since the class ID is not saved anywhere, this mapping does not need to be persistent; it just needs to keep class ids unique.
Definition at line 86 of file newgrf_house.h.
uint8_t HouseClassMapping::class_id |
The class id within the grf file.
Definition at line 88 of file newgrf_house.h.
uint32_t HouseClassMapping::grfid |
The GRF ID of the file this class belongs to.
Definition at line 87 of file newgrf_house.h.