OpenTTD Source: TownNameParams Struct Reference

OpenTTD Source 14.0-RC3

Public Member Functions | Data Fields
TownNameParams Struct Reference

Struct holding parameters used to generate town name. More...

`#include <townname_type.h>`

## Public Member Functions
| TownNameParams (byte town_name)
| Initializes this struct from language ID. More...
| TownNameParams (const Town *t)
| Initializes this struct from town data. More...

## Data Fields
uint32_t | grfid
| newgrf ID (0 if not used)
uint16_t | type
| town name style

## Detailed Description

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 28 of file townname_type.h.

## Constructor & Destructor Documentation

## ◆ TownNameParams() [1/2]

TownNameParams::TownNameParams | ( | byte | town_name | ) |
| inline

Initializes this struct from language ID.

Parameters

  town_name | town name 'language' ID

Definition at line 36 of file townname_type.h.

References BUILTIN_TOWNNAME_GENERATOR_COUNT.

## ◆ TownNameParams() [2/2]

TownNameParams::TownNameParams | ( | const Town * | t | ) |

Initializes this struct from town data.

Parameters

  t | town for which we will be printing name later

Definition at line 29 of file townname.cpp.

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

- src/townname_type.h
- src/townname.cpp