# namegen.cpp File Reference

`#include "stdafx.h"`
`#include "openttd.h"`
`#include "debug.h"`
`#include "namegen.h"`
`#include "string_func.h"`
`#include "table/namegen.h"`

Go to the source code of this file.

## Defines
#define | FIXNUM(x, y, z) (((((x) << 16) / (y)) + 1) << z)
## Functions
static uint32 | SeedChance (int shift_by, int max, uint32 seed)
static uint32 | SeedModChance (int shift_by, int max, uint32 seed)
static int32 | SeedChanceBias (int shift_by, int max, uint32 seed, int bias)
static void | ReplaceWords (const char *org, const char *rep, char *buf)
static byte | MakeEnglishOriginalTownName (char *buf, uint32 seed, const char *last)
static byte | MakeEnglishAdditionalTownName (char *buf, uint32 seed, const char *last)
static byte | MakeAustrianTownName (char *buf, uint32 seed, const char *last)
static byte | MakeGermanTownName (char *buf, uint32 seed, const char *last)
static byte | MakeSpanishTownName (char *buf, uint32 seed, const char *last)
static byte | MakeFrenchTownName (char *buf, uint32 seed, const char *last)
static byte | MakeSillyTownName (char *buf, uint32 seed, const char *last)
static byte | MakeSwedishTownName (char *buf, uint32 seed, const char *last)
static byte | MakeDutchTownName (char *buf, uint32 seed, const char *last)
static byte | MakeFinnishTownName (char *buf, uint32 seed, const char *last)
static byte | MakePolishTownName (char *buf, uint32 seed, const char *last)
static byte | MakeCzechTownName (char *buf, uint32 seed, const char *last)
static byte | MakeRomanianTownName (char *buf, uint32 seed, const char *last)
static byte | MakeSlovakTownName (char *buf, uint32 seed, const char *last)
static byte | MakeNorwegianTownName (char *buf, uint32 seed, const char *last)
static byte | MakeHungarianTownName (char *buf, uint32 seed, const char *last)
static byte | MakeSwissTownName (char *buf, uint32 seed, const char *last)
static byte | MakeDanishTownName (char *buf, uint32 seed, const char *last)
static byte | MakeTurkishTownName (char *buf, uint32 seed, const char *last)
static byte | MakeItalianTownName (char *buf, uint32 seed, const char *last)
static byte | MakeCatalanTownName (char *buf, uint32 seed, const char *last)
uint32 | GetOldTownName (uint32 townnameparts, byte old_town_name_type)
## Variables
static const char * | mascul_femin_italian []
TownNameGenerator *const | _town_name_generators []

## Detailed Description

Definition in file namegen.cpp.

## Variable Documentation

TownNameGenerator* const _town_name_generators[]

Initial value:

    {
      MakeEnglishOriginalTownName,
      MakeFrenchTownName,
      MakeGermanTownName,
      MakeEnglishAdditionalTownName,
      MakeSpanishTownName,
      MakeSillyTownName,
      MakeSwedishTownName,
      MakeDutchTownName,
      MakeFinnishTownName,
      MakePolishTownName,
      MakeSlovakTownName,
      MakeNorwegianTownName,
      MakeHungarianTownName,
      MakeAustrianTownName,
      MakeRomanianTownName,
      MakeCzechTownName,
      MakeSwissTownName,
      MakeDanishTownName,
      MakeTurkishTownName,
      MakeItalianTownName,
      MakeCatalanTownName,
    }

Definition at line 737 of file namegen.cpp.

const char* mascul_femin_italian[]`[static]`

Initial value:

     {
      "o",
      "a",
    }

Definition at line 655 of file namegen.cpp.