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

This commit is contained in:
Darkvater
2005-09-16 10:37:21 +00:00
parent 78e4cbbfda
commit 4d7e916a09
5 changed files with 156 additions and 1 deletions

View File

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

View File

@@ -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})

View File

@@ -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?

View File

@@ -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,

View File

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