summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2005-01-15 21:41:49 +0000
committerdarkvater <darkvater@openttd.org>2005-01-15 21:41:49 +0000
commit6e07bad728eb950350f868d5307e6f7af5ba6c9c (patch)
tree8ad2de1714d5e86e866046715ddcfa3307d2b4d9
parent971d8442668bfd4998e0dd0f049621bfddac2435 (diff)
downloadopenttd-6e07bad728eb950350f868d5307e6f7af5ba6c9c.tar.xz
(svn r1531) -Feature: [1039061] Swiss town-names (vulvulune)
-rw-r--r--lang/english.txt1
-rw-r--r--lang/french.txt1
-rw-r--r--namegen.c7
-rw-r--r--settings.c2
-rw-r--r--table/namegen.h126
-rw-r--r--ttd.h3
-rw-r--r--ttd.vcproj3
7 files changed, 141 insertions, 2 deletions
diff --git a/lang/english.txt b/lang/english.txt
index 38ed793ed..75134a977 100644
--- a/lang/english.txt
+++ b/lang/english.txt
@@ -864,6 +864,7 @@ STR_TOWNNAME_HUNGARIAN :Hungarian
STR_TOWNNAME_AUSTRIAN :Austrian
STR_TOWNNAME_ROMANIAN :Romanian
STR_TOWNNAME_CZECH :Czech
+STR_TOWNNAME_SWISS :Swiss
############ end of townname region
STR_CURR_GBP :Pounds ({POUNDSIGN})
diff --git a/lang/french.txt b/lang/french.txt
index c85c66c8f..d7ff00078 100644
--- a/lang/french.txt
+++ b/lang/french.txt
@@ -863,6 +863,7 @@ STR_TOWNNAME_HUNGARIAN :Hongrois
STR_TOWNNAME_AUSTRIAN :Autrichiens
STR_TOWNNAME_ROMANIAN :Roumain
STR_TOWNNAME_CZECH :Tchèques
+STR_TOWNNAME_SWISS :Suisse
############ end of townname region
STR_CURR_GBP :Livres ({POUNDSIGN})
diff --git a/namegen.c b/namegen.c
index 99d220389..dcaddca68 100644
--- a/namegen.c
+++ b/namegen.c
@@ -386,6 +386,12 @@ static byte MakeHungarianTownName(byte *buf, uint32 seed)
return 0;
}
+static byte MakeSwissTownName(byte *buf, uint32 seed)
+{
+ strcpy(buf, name_swiss_real[SeedChance(0, lengthof(name_swiss_real), seed)]);
+ return 0;
+}
+
TownNameGenerator * const _town_name_generators[] =
{
MakeEnglishOriginalTownName,
@@ -404,6 +410,7 @@ TownNameGenerator * const _town_name_generators[] =
MakeAustrianTownName,
MakeRomanianTownName,
MakeCzechTownName,
+ MakeSwissTownName,
};
// DO WE NEED THIS ANY MORE?
diff --git a/settings.c b/settings.c
index f880d15ff..8d5b86294 100644
--- a/settings.c
+++ b/settings.c
@@ -786,7 +786,7 @@ static const SettingDesc gameopt_settings[] = {
{"diff_custom", SDT_INTLIST | SDT_UINT32 | (sizeof(GameDifficulty)/4) << 16, NULL, &_new_opt.diff, NULL},
{"currency", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, &_new_opt.currency, "GBP|USD|EUR|YEN|ATS|BEF|CHF|CZK|DEM|DKK|ESP|FIM|FRF|GRD|HUF|ISK|ITL|NLG|NOK|PLN|ROL|RUR|SEK|custom" },
{"distances", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, &_new_opt.kilometers, "imperial|metric" },
- {"town_names", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, &_new_opt.town_name, "english|french|german|american|latin|silly|swedish|dutch|finnish|polish|slovakish|norwegian|hungarian|austrian|romanian|czech" },
+ {"town_names", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, &_new_opt.town_name, "english|french|german|american|latin|silly|swedish|dutch|finnish|polish|slovakish|norwegian|hungarian|austrian|romanian|czech|swiss" },
{"landscape", SDT_UINT8 | SDT_ONEOFMANY, (void*)0, &_new_opt.landscape, "normal|hilly|desert|candy" },
{"autosave", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, &_new_opt.autosave, "off|monthly|quarterly|half year|yearly" },
{"road_side", SDT_UINT8 | SDT_ONEOFMANY, (void*)1, &_new_opt.road_side, "left|right" },
diff --git a/table/namegen.h b/table/namegen.h
index f87ad6359..5c6cee1a9 100644
--- a/table/namegen.h
+++ b/table/namegen.h
@@ -2230,3 +2230,129 @@ static const char *name_hungarian_real[] = {
"Záhony",
"Zirc"
};
+
+static const char *name_swiss_real[] = {
+ "Aarau",
+ "Aesch",
+ "Altdorf",
+ "Arosa",
+ "Appenzell",
+ "Arbon",
+ "Altstätten",
+ "Baar",
+ "Baden",
+ "Bellinzona",
+ "Brig-Glis",
+ "Bienne",
+ "Bulle",
+ "Binningen",
+ "Burgdorf",
+ "Bern",
+ "Basel",
+ "Bülach",
+ "Carouge",
+ "Cham",
+ "Chiasso",
+ "Chur",
+ "Davos",
+ "Delémont",
+ "Dietikon",
+ "Dübendorf",
+ "Emmen",
+ "Freienbach-Pfäffikon",
+ "Fribourg",
+ "Frauenfeld",
+ "Genève",
+ "Glarus",
+ "Gossau",
+ "Grenchen",
+ "Herisau",
+ "Horgen",
+ "Horw",
+ "Illnau-Effretikon",
+ "Ittigen",
+ "Jona",
+ "Kriens",
+ "Kloten",
+ "Köniz",
+ "Kreuzlingen",
+ "Küsnacht",
+ "Agen",
+ "Lancy",
+ "La Chaux-de-Fonds",
+ "Lenzburg",
+ "Lugano",
+ "Langenthal",
+ "Littau",
+ "Le Locle",
+ "La Neuveville",
+ "Locarno",
+ "Liestal",
+ "La Tour-de-Peilz",
+ "Lausanne",
+ "Lyss",
+ "Luzern",
+ "Martigny",
+ "Münchenstein",
+ "Meyrin",
+ "Montreux",
+ "Monthey",
+ "Morges",
+ "Murten",
+ "Moutier",
+ "Muttenz",
+ "Neuchâtel",
+ "Neuhausen am Rheinfall",
+ "Nyon",
+ "Olten",
+ "Onex",
+ "Opfikon",
+ "Ostermundigen",
+ "Payerne",
+ "Peseux",
+ "Prilly",
+ "Pully",
+ "Rapperswil",
+ "Richterswil",
+ "Regensdorf",
+ "Rheinfelden",
+ "Riehen",
+ "Renens",
+ "Romanshorn",
+ "Rorschach",
+ "Stans",
+ "Schaffhausen",
+ "Steffisburg",
+ "St. Gallen",
+ "Schlieren",
+ "Sierre",
+ "Solothurn",
+ "St. Moritz",
+ "Sion",
+ "Spiez",
+ "Stäfa",
+ "Sursee",
+ "Schwyz",
+ "Thalwil",
+ "Thônex",
+ "Thun",
+ "Uster",
+ "Uzwil",
+ "Vernier",
+ "Volketswil",
+ "Versoix",
+ "Vevey",
+ "Wädenswil",
+ "Wettingen",
+ "Wil",
+ "Wallisellen",
+ "Winterthur",
+ "Wohlen",
+ "Worb",
+ "Wetzikon",
+ "Yverdon-les-Bains",
+ "Zollikon",
+ "Zofingen",
+ "Zürich",
+ "Zug",
+};
diff --git a/ttd.h b/ttd.h
index 3dcf52bc4..af8033f27 100644
--- a/ttd.h
+++ b/ttd.h
@@ -489,7 +489,8 @@ enum SpecialStrings {
SPECSTR_TOWNNAME_AUSTRIAN,
SPECSTR_TOWNNAME_ROMANIAN,
SPECSTR_TOWNNAME_CZECH,
- SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_CZECH,
+ SPECSTR_TOWNNAME_SWISS,
+ SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_SWISS,
// special strings for player names on the form "TownName transport".
SPECSTR_PLAYERNAME_START = 0x70EA,
diff --git a/ttd.vcproj b/ttd.vcproj
index 1a8b0b5ef..9a36f4c47 100644
--- a/ttd.vcproj
+++ b/ttd.vcproj
@@ -2531,6 +2531,9 @@
RelativePath="table\landscape_sprite.h">
</File>
<File
+ RelativePath=".\table\namegen.h">
+ </File>
+ <File
RelativePath="table\palettes.h">
</File>
<File