(svn r2957) - Feature: [ 1263280 ] Danish town names (fey_dk)

pull/155/head
Darkvater 19 years ago
parent 78e4cbbfda
commit 4d7e916a09

@ -832,6 +832,7 @@ STR_TOWNNAME_AUSTRIAN :
STR_TOWNNAME_ROMANIAN :Rumænske
STR_TOWNNAME_CZECH :Tjekkiske
STR_TOWNNAME_SWISS :Schweiziske
STR_TOWNNAME_DANISH :Danske
############ end of townname region
STR_CURR_GBP :Pund ({POUNDSIGN})

@ -835,6 +835,7 @@ STR_TOWNNAME_AUSTRIAN :Austrian
STR_TOWNNAME_ROMANIAN :Romanian
STR_TOWNNAME_CZECH :Czech
STR_TOWNNAME_SWISS :Swiss
STR_TOWNNAME_DANISH :Danish
############ end of townname region
STR_CURR_GBP :Pounds ({POUNDSIGN})

@ -573,6 +573,25 @@ static byte MakeSwissTownName(char *buf, uint32 seed)
return 0;
}
static byte MakeDanishTownName(char *buf, uint32 seed)
{
int i;
// null terminates the string for strcat
strcpy(buf, "");
// optional first segment
i = SeedChanceBias(0, lengthof(name_danish_1), seed, 50);
if (i >= 0)
strcat(buf, name_danish_1[i]);
// middle segments removed as this algorithm seems to create much more realistic names
strcat(buf, name_danish_2[SeedChance( 7, lengthof(name_danish_2), seed)]);
strcat(buf, name_danish_3[SeedChance(16, lengthof(name_danish_3), seed)]);
return 0;
}
TownNameGenerator * const _town_name_generators[] =
{
MakeEnglishOriginalTownName,
@ -592,6 +611,7 @@ TownNameGenerator * const _town_name_generators[] =
MakeRomanianTownName,
MakeCzechTownName,
MakeSwissTownName,
MakeDanishTownName,
};
// DO WE NEED THIS ANY MORE?

@ -487,7 +487,8 @@ enum SpecialStrings {
SPECSTR_TOWNNAME_ROMANIAN,
SPECSTR_TOWNNAME_CZECH,
SPECSTR_TOWNNAME_SWISS,
SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_SWISS,
SPECSTR_TOWNNAME_DANISH,
SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_DANISH,
// special strings for player names on the form "TownName transport".
SPECSTR_PLAYERNAME_START = 0x70EA,

@ -2597,3 +2597,135 @@ static const char *name_swiss_real[] = {
"Zürich",
"Zug",
};
static const char *name_danish_1[] = {
"Gamle ",
"Lille ",
"Nye ",
"Store ",
"Kirke ",
"Nørre ",
"Vester ",
"Sønder ",
"Øster ",
"Hvide ",
"Høje ",
"Kongens ",
};
static const char *name_danish_2[] = {
"Ager",
"Alle",
"Aske",
"Balle",
"Bede",
"Birke",
"Bjerring",
"Bjæver",
"Blommens",
"Blok",
"Bolder",
"Bred",
"Charlotten",
"Christians",
"Danne",
"Diana",
"Es",
"Fredens",
"Frederiks",
"Fugle",
"Fåre",
"Gille",
"Gis",
"Givs",
"Glams",
"Glo",
"Guld",
"Had",
"Haralds",
"Hassel",
"Hede",
"Helle",
"Hessel",
"Hjorts",
"Hol",
"Horn",
"Humle",
"Høj",
"Hør",
"Is",
"Jyde",
"Jægers",
"Karls",
"Klov",
"Kokke",
"Kvist",
"Lang",
"Lange",
"Mari",
"Nord",
"Ny",
"Oks",
"Ring",
"Røde",
"Rung",
"Rør",
"Rud",
"Saks",
"Salt",
"Skam",
"Silke",
"Skod",
"Skæl",
"Skær",
"Sol",
"Svend",
"Svine",
"Strand",
"Stubbe",
"Ting",
"Tjære",
"Tore",
"Uger",
"Ulf",
"Val",
"Vand",
"Vej",
"Vor",
"Vær",
"Ør",
"Ål"
};
static const char *name_danish_3[] = {
"basse",
"borg",
"berg",
"bro",
"by",
"havn",
"strup",
"holm",
"hus",
"købing",
"lund",
"lunde",
"sund",
"ovre",
"høj",
"dal",
"sted",
"sten",
"løse",
"rød",
"magle",
"",
"bjerg",
"bæk",
"drup",
"lev",
"bo",
"lyst",
"feld",
"skov"
};

Loading…
Cancel
Save