OpenTTD Source 20250312-master-gcdcc6b491d
|
Struct holding parameters used to generate town name. More...
#include <townname_type.h>
Public Member Functions | |
TownNameParams (uint8_t town_name) | |
Initializes this struct from language ID. | |
TownNameParams (const Town *t) | |
Initializes this struct from town data. | |
Data Fields | |
uint32_t | grfid |
newgrf ID (0 if not used) | |
uint16_t | type |
town name style | |
Struct holding parameters used to generate town name.
Speeds things up a bit because these values are computed only once per name generation.
Definition at line 26 of file townname_type.h.
|
inline |
Initializes this struct from language ID.
town_name | town name 'language' ID |
Definition at line 34 of file townname_type.h.
References BUILTIN_TOWNNAME_GENERATOR_COUNT, and SPECSTR_TOWNNAME_START.
TownNameParams::TownNameParams | ( | const Town * | t | ) |
Initializes this struct from town data.
t | town for which we will be printing name later |
Definition at line 29 of file townname.cpp.
References grfid, SPECSTR_TOWNNAME_START, and type.
uint32_t TownNameParams::grfid |
newgrf ID (0 if not used)
Definition at line 27 of file townname_type.h.
Referenced by DoCreateTown(), GetTownName(), and TownNameParams().
uint16_t TownNameParams::type |
town name style
Definition at line 28 of file townname_type.h.
Referenced by DoCreateTown(), GetTownName(), and TownNameParams().