# townname_func.h File Reference

Town name generator stuff. More...

Go to the source code of this file.

## Functions
char * | GenerateTownNameString (char *buf, const char *last, size_t lang, uint32 seed)
| Generates town name from given seed.
char * | GetTownName (char *buff, const struct TownNameParams *par, uint32 townnameparts, const char *last)
char * | GetTownName (char *buff, const struct Town *t, const char *last)
bool | VerifyTownName (uint32 r, const struct TownNameParams *par)
bool | GenerateTownName (uint32 *townnameparts)
| Generates valid town name.

## Detailed Description

Town name generator stuff.

Definition in file townname_func.h.

## Function Documentation

bool GenerateTownName | ( | uint32 * | townnameparts | ) |

Generates valid town name.

Parameters:

  | townnameparts | if a name is generated, it's stored there

Returns:
  true iff a name was generated

Definition at line 112 of file townname.cpp.

References _generating_world, _settings_game, GameSettings::game_creation, GameCreationSettings::town_name, and VerifyTownName().

Referenced by GenerateTowns().

char* GenerateTownNameString | ( | char * | buf,
|  | const char * | last,
|  | size_t | lang,
|  | uint32 | seed |
| ) |  |  |

Generates town name from given seed.

a language.

Parameters:

  | buf | output buffer
  | last | end of buffer
  | lang | town name language
  | seed | generation seed

Returns:
  last character ('/0')

Definition at line 1033 of file townname.cpp.

References AllocaM, lengthof, TownNameGeneratorParams::min, TownNameGeneratorParams::proc, and strecpy().