|
|
#include "stdafx.h"
|
|
|
#include "ttd.h"
|
|
|
|
|
|
|
|
|
#define GETNUM(x, y) (((uint16)(seed >> x) * (y))>>16)
|
|
|
|
|
|
static void AppendPart(byte **buf, int num, const char *names)
|
|
|
{
|
|
|
byte *s;
|
|
|
|
|
|
while (--num>=0) {
|
|
|
do names++; while (names[-1]);
|
|
|
}
|
|
|
|
|
|
|
|
|
for(s=*buf; (*s++ = *names++) != 0;) {}
|
|
|
*buf = s - 1;
|
|
|
}
|
|
|
|
|
|
#define MK(x) x "\x0"
|
|
|
|
|
|
#define NUM_ENGLISH_1 4
|
|
|
static const char english_1[] =
|
|
|
static const char english_1[] =
|
|
|
MK("Great ")
|
|
|
MK("Little ")
|
|
|
MK("New ")
|
|
|
MK("Fort ")
|
|
|
;
|
|
|
|
|
|
#define NUM_ENGLISH_2 26
|
|
|
#define NUM_ENGLISH_2 26
|
|
|
static const char english_2[] =
|
|
|
MK("Wr")
|
|
|
MK("B")
|
|
|
MK("C")
|
|
|
MK("Ch")
|
|
|
MK("Br")
|
|
|
MK("D")
|
|
|
MK("Dr")
|
|
|
MK("F")
|
|
|
MK("Fr")
|
|
|
MK("Fl")
|
|
|
MK("G")
|
|
|
MK("Gr")
|
|
|
MK("H")
|
|
|
MK("L")
|
|
|
MK("M")
|
|
|
MK("N")
|
|
|
MK("P")
|
|
|
MK("Pr")
|
|
|
MK("Pl")
|
|
|
MK("R")
|
|
|
MK("S")
|
|
|
MK("S")
|
|
|
MK("Sl")
|
|
|
MK("T")
|
|
|
MK("Tr")
|
|
|
MK("W")
|
|
|
;
|
|
|
|
|
|
#define NUM_ENGLISH_3 8
|
|
|
static const char english_3[] =
|
|
|
static const char english_3[] =
|
|
|
MK("ar")
|
|
|
MK("a")
|
|
|
MK("e")
|
|
|
MK("in")
|
|
|
MK("on")
|
|
|
MK("u")
|
|
|
MK("un")
|
|
|
MK("en")
|
|
|
;
|
|
|
|
|
|
#define NUM_ENGLISH_4 7
|
|
|
static const char english_4[] =
|
|
|
static const char english_4[] =
|
|
|
MK("n")
|
|
|
MK("ning")
|
|
|
MK("ding")
|
|
|
MK("d")
|
|
|
MK("")
|
|
|
MK("t")
|
|
|
MK("fing")
|
|
|
;
|
|
|
|
|
|
#define NUM_ENGLISH_5 23
|
|
|
static const char english_5[] =
|
|
|
static const char english_5[] =
|
|
|
MK("ville")
|
|
|
MK("ham")
|
|
|
MK("field")
|
|
|
MK("ton")
|
|
|
MK("town")
|
|
|
MK("bridge")
|
|
|
MK("bury")
|
|
|
MK("wood")
|
|
|
MK("ford")
|
|
|
MK("hall")
|
|
|
MK("ston")
|
|
|
MK("way")
|
|
|
MK("stone")
|
|
|
MK("borough")
|
|
|
MK("ley")
|
|
|
MK("head")
|
|
|
MK("bourne")
|
|
|
MK("pool")
|
|
|
MK("worth")
|
|
|
MK("hill")
|
|
|
MK("well")
|
|
|
MK("hattan")
|
|
|
MK("burg")
|
|
|
;
|
|
|
|
|
|
#define NUM_ENGLISH_6 9
|
|
|
static const char english_6[] =
|
|
|
static const char english_6[] =
|
|
|
MK("-on-sea")
|
|
|
MK(" Bay")
|
|
|
MK(" Market")
|
|
|
MK(" Cross")
|
|
|
MK(" Bridge")
|
|
|
MK(" Falls")
|
|
|
MK(" City")
|
|
|
MK(" Ridge")
|
|
|
MK(" Springs")
|
|
|
;
|
|
|
|
|
|
#define REPLACE_WORDS(a,b,c,d,e,f,g,h) { if (start[0] == a && start[1] == b && start[2] == c && start[3] == d) { start[0] = e; start[1] = f; start[2] = g; start[3] = h; } }
|
|
|
|
|
|
static byte MakeEnglishTownName(byte *buf, uint32 seed)
|
|
|
{
|
|
|
int i;
|
|
|
byte result;
|
|
|
byte *start;
|
|
|
|
|
|
i = GETNUM(0, 54) - 50;
|
|
|
if (i >= 0)
|
|
|
AppendPart(&buf, i, english_1);
|
|
|
|
|
|
|
|
|
start = buf;
|
|
|
|
|
|
AppendPart(&buf, GETNUM(4, NUM_ENGLISH_2), english_2);
|
|
|
AppendPart(&buf, GETNUM(7, NUM_ENGLISH_3), english_3);
|
|
|
AppendPart(&buf, GETNUM(10, NUM_ENGLISH_4), english_4);
|
|
|
AppendPart(&buf, GETNUM(13, NUM_ENGLISH_5), english_5);
|
|
|
|
|
|
i = GETNUM(15, NUM_ENGLISH_6 + 60) - 60;
|
|
|
|
|
|
result = 0;
|
|
|
|
|
|
|
|
|
if (i >= 0) {
|
|
|
if (i <= 1) result = NG_EDGE;
|
|
|
AppendPart(&buf, i, english_6);
|
|
|
}
|
|
|
|
|
|
if (start[0]=='C' && (start[1] == 'e' || start[1] == 'i'))
|
|
|
start[0] = 'K';
|
|
|
start[0] = 'K';
|
|
|
|
|
|
/* Replace certain words (routine identical to TTD now) */
|
|
|
|
|
|
REPLACE_WORDS('C','u','n','t', 'E','a','s','t');
|
|
|
REPLACE_WORDS('S','l','a','g', 'P','i','t','s');
|
|
|
REPLACE_WORDS('S','l','u','t', 'E','d','i','n');
|
|
|
// REPLACE_WORDS('F','a','r','t', 'B','o','o','t');
|
|
|
REPLACE_WORDS('D','r','a','r', 'Q','u','a','r');
|
|
|
REPLACE_WORDS('D','r','e','h', 'B','a','s','h');
|
|
|
REPLACE_WORDS('F','r','a','r', 'S','h','o','r');
|
|
|
REPLACE_WORDS('G','r','a','r', 'A','b','e','r');
|
|
|
REPLACE_WORDS('B','r','a','r', 'O','v','e','r');
|
|
|
REPLACE_WORDS('W','r','a','r', 'I','n','v','e');
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
#define NUM_AUSTRIAN_A1 6
|
|
|
static const char austrian_a1[] =
|
|
|
static const char austrian_a1[] =
|
|
|
MK("Bad ")
|
|
|
MK("Deutsch ")
|
|
|
MK("Gross ")
|
|
|
MK("Klein ")
|
|
|
MK("Markt ")
|
|
|
MK("Maria ")
|
|
|
;
|
|
|
|
|
|
#define NUM_AUSTRIAN_A2 42
|
|
|
static const char austrian_a2[] =
|
|
|
static const char austrian_a2[] =
|
|
|
MK("Aus")
|
|
|
MK("Alten")
|
|
|
MK("Braun")
|
|
|
MK("Vösl")
|
|
|
MK("Mittern")
|
|
|
MK("Nuss")
|
|
|
MK("Neu")
|
|
|
MK("Walters")
|
|
|
MK("Breiten")
|
|
|
MK("Eisen")
|
|
|
MK("Feld")
|
|
|
MK("Mittern")
|
|
|
MK("Gall")
|
|
|
MK("Obern")
|
|
|
MK("Grat")
|
|
|
MK("Heiligen")
|
|
|
MK("Hof")
|
|
|
MK("Holla")
|
|
|
MK("Stein")
|
|
|
MK("Eber")
|
|
|
MK("Eggen")
|
|
|
MK("Enzers")
|
|
|
MK("Frauen")
|
|
|
MK("Herren")
|
|
|
MK("Hof")
|
|
|
MK("Hütt")
|
|
|
MK("Kaisers")
|
|
|
MK("Königs")
|
|
|
MK("Knittel")
|
|
|
MK("Lang")
|
|
|
MK("Ober")
|
|
|
MK("Ollers")
|
|
|
MK("Pfaffen")
|
|
|
MK("Potten")
|
|
|
MK("Salz")
|
|
|
MK("Schwarz")
|
|
|
MK("Stocker")
|
|
|
MK("Unter")
|
|
|
MK("Utten")
|
|
|
MK("Vösen")
|
|
|
MK("Vill")
|
|
|
MK("Weissen")
|
|
|
;
|
|
|
|
|
|
#define NUM_AUSTRIAN_A3 16
|
|
|
static const char austrian_a3[] =
|
|
|
static const char austrian_a3[] =
|
|
|
MK("see")
|
|
|
MK("bach")
|
|
|
MK("dorf")
|
|
|
MK("ach")
|
|
|
MK("stein")
|
|
|
MK("hofen")
|
|
|
MK("au")
|
|
|
MK("ach")
|
|
|
MK("kirch")
|
|
|
MK("kirchen")
|
|
|
MK("kreuz")
|
|
|
MK("brunn")
|
|
|
MK("siedl")
|
|
|
MK("markt")
|
|
|
MK("wang")
|
|
|
MK("haag")
|
|
|
;
|
|
|
|
|
|
#define NUM_AUSTRIAN_A4 12
|
|
|
static const char austrian_a4[] =
|
|
|
MK("Bruck")
|
|
|
MK("Brunn")
|
|
|
MK("Gams")
|
|
|
MK("Grein")
|
|
@@ -350,50 +350,50 @@ static byte MakeAustrianTownName(byte *b
|
|
|
AppendPart(&buf, GETNUM( 9, NUM_AUSTRIAN_A6), austrian_a6);
|
|
|
j=1; // More likely to have a " an der " or " am "
|
|
|
}
|
|
|
else {
|
|
|
// Zell
|
|
|
AppendPart(&buf, GETNUM( 7, NUM_AUSTRIAN_A4), austrian_a4);
|
|
|
}
|
|
|
|
|
|
i = GETNUM(1, 6);
|
|
|
if(i >= 4-j) {
|
|
|
// an der Donau (rivers)
|
|
|
AppendPart(&buf, GETNUM(4, NUM_AUSTRIAN_F1), austrian_f1);
|
|
|
AppendPart(&buf, GETNUM(5, NUM_AUSTRIAN_F2), austrian_f2);
|
|
|
}
|
|
|
else if(i >= 2-j) {
|
|
|
// am Dachstein (mountains)
|
|
|
AppendPart(&buf, GETNUM(4, NUM_AUSTRIAN_B1), austrian_b1);
|
|
|
AppendPart(&buf, GETNUM(5, NUM_AUSTRIAN_B2), austrian_b2);
|
|
|
}
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
#define NUM_GERMAN_1 114
|
|
|
#define NUM_GERMAN_1_HARDCODED 21
|
|
|
static const char german_1[] =
|
|
|
#define NUM_GERMAN_1_HARDCODED 21
|
|
|
static const char german_1[] =
|
|
|
/* hardcoded names */
|
|
|
MK("Berlin")
|
|
|
MK("Bonn")
|
|
|
MK("Bremen")
|
|
|
MK("Cottbus")
|
|
|
MK("Chemnitz")
|
|
|
MK("Dortmund")
|
|
|
MK("Dresden")
|
|
|
MK("Erfurt")
|
|
|
MK("Erlangen")
|
|
|
MK("Essen")
|
|
|
MK("Fulda")
|
|
|
MK("Gera")
|
|
|
MK("Kassel")
|
|
|
MK("Kiel")
|
|
|
MK("Köln")
|
|
|
MK("Lübeck")
|
|
|
MK("Magdeburg")
|
|
|
MK("München")
|
|
|
MK("Potsdam")
|
|
|
MK("Stuttgart")
|
|
|
MK("Wiesbaden")
|
|
|
/* randomizer names */
|
|
|
MK("Alb")
|
|
@@ -510,89 +510,89 @@ static const char german_2[] =
|
|
|
MK("stadt")
|
|
|
MK("wald")
|
|
|
;
|
|
|
|
|
|
#define NUM_GERMAN_3 5
|
|
|
static const char german_3[] =
|
|
|
MK(" an der ")
|
|
|
MK(" am ")
|
|
|
MK("Bad ")
|
|
|
MK("Klein ")
|
|
|
MK("Neu ")
|
|
|
;
|
|
|
|
|
|
#define NUM_GERMAN_4 6
|
|
|
#define NUM_GERMAN_4_PRECHANGE 5
|
|
|
static const char german_4[] =
|
|
|
/* use "an der" */
|
|
|
MK("Oder")
|
|
|
MK("Spree")
|
|
|
MK("Donau")
|
|
|
MK("Saale")
|
|
|
MK("Elbe")
|
|
|
/* use "am" */
|
|
|
MK("Main")
|
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
static byte MakeGermanTownName(byte *buf, uint32 seed)
|
|
|
{
|
|
|
int i;
|
|
|
int ext;
|
|
|
|
|
|
|
|
|
ext=GETNUM(7, 28); /* Extension - Prefix / Suffix */
|
|
|
|
|
|
if ((ext==12) || (ext==19)) {
|
|
|
i=GETNUM(2,NUM_GERMAN_3-2);
|
|
|
AppendPart(&buf, 2+i, german_3);
|
|
|
}
|
|
|
|
|
|
|
|
|
i=GETNUM(3,NUM_GERMAN_1);
|
|
|
|
|
|
AppendPart(&buf, i, german_1);
|
|
|
|
|
|
if (i>NUM_GERMAN_1_HARDCODED-1) {
|
|
|
AppendPart(&buf, GETNUM(5, NUM_GERMAN_2), german_2);
|
|
|
}
|
|
|
|
|
|
if (ext==24) {
|
|
|
i=GETNUM(9,NUM_GERMAN_4);
|
|
|
|
|
|
if (i<=NUM_GERMAN_4_PRECHANGE-1) {
|
|
|
AppendPart(&buf, 0, german_3);
|
|
|
AppendPart(&buf, i, german_4);
|
|
|
} else {
|
|
|
AppendPart(&buf, 1, german_3);
|
|
|
AppendPart(&buf, i, german_4);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
#define NUM_SPANISH_1 86
|
|
|
static const char spanish_1[] =
|
|
|
static const char spanish_1[] =
|
|
|
MK("Caracas")
|
|
|
MK("Maracay")
|
|
|
MK("Maracaibo")
|
|
|
MK("Velencia")
|
|
|
MK("El Dorado")
|
|
|
MK("Morrocoy")
|
|
|
MK("Cata")
|
|
|
MK("Cataito")
|
|
|
MK("Ciudad Bolivar")
|
|
|
MK("Barquisimeto")
|
|
|
MK("Merida")
|
|
|
MK("Puerto Ordaz")
|
|
|
MK("Santa Elena")
|
|
|
MK("San Juan")
|
|
|
MK("San Luis")
|
|
|
MK("San Rafael")
|
|
|
MK("Santiago")
|
|
|
MK("Barcelona")
|
|
|
MK("Barinas")
|
|
|
MK("San Cristobal")
|
|
|
MK("San Fransisco")
|
|
|
MK("San Martin")
|
|
|
MK("Guayana")
|
|
|
MK("San Carlos")
|
|
@@ -641,71 +641,71 @@ static const char spanish_1[] =
|
|
|
MK("San Borja")
|
|
|
MK("Fuerte Olimpio")
|
|
|
MK("Fortin Esteros")
|
|
|
MK("Campo Grande")
|
|
|
MK("Bogota")
|
|
|
MK("El Banco")
|
|
|
MK("Zaragosa")
|
|
|
MK("Neiva")
|
|
|
MK("Mariano")
|
|
|
MK("Cali")
|
|
|
MK("La Palma")
|
|
|
MK("Andoas")
|
|
|
MK("Barranca")
|
|
|
MK("Montevideo")
|
|
|
MK("Valdivia")
|
|
|
MK("Arica")
|
|
|
MK("Temuco")
|
|
|
MK("Tocopilla")
|
|
|
MK("Mendoza")
|
|
|
MK("Santa Rosa");
|
|
|
|
|
|
static byte MakeSpanishTownName(byte *buf, uint32 seed)
|
|
|
{
|
|
|
AppendPart(&buf, GETNUM(0, NUM_SPANISH_1), spanish_1);
|
|
|
return 0;
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
#define NUM_FRENCH_1 70
|
|
|
static const char french_1[] =
|
|
|
static const char french_1[] =
|
|
|
MK("Agincourt")
|
|
|
MK("Lille")
|
|
|
MK("Dinan")
|
|
|
MK("Aubusson")
|
|
|
MK("Rodez")
|
|
|
MK("Bergerac")
|
|
|
MK("Bordeaux")
|
|
|
MK("Bayonne")
|
|
|
MK("Montpellier")
|
|
|
MK("Montelimar")
|
|
|
MK("Valence")
|
|
|
MK("Digne")
|
|
|
MK("Nice")
|
|
|
MK("Cannes")
|
|
|
MK("St. Tropez")
|
|
|
MK("Marseilles")
|
|
|
MK("Narbonne")
|
|
|
MK("Sète")
|
|
|
MK("Sète")
|
|
|
MK("Aurillac")
|
|
|
MK("Gueret")
|
|
|
MK("Le Creusot")
|
|
|
MK("Nevers")
|
|
|
MK("Auxerre")
|
|
|
MK("Versailles")
|
|
|
MK("Meaux")
|
|
|
MK("Châlons")
|
|
|
MK("Compiègne")
|
|
|
MK("Metz")
|
|
|
MK("Chaumont")
|
|
|
MK("Langres")
|
|
|
MK("Bourg")
|
|
|
MK("Lyons")
|
|
|
MK("Vienne")
|
|
|
MK("Grenoble")
|
|
|
MK("Toulon")
|
|
|
MK("Rennes")
|
|
|
MK("Le Mans")
|
|
|
MK("Angers")
|
|
|
MK("Nantes")
|
|
|
MK("Châteauroux")
|
|
|
MK("Orléans")
|
|
|
MK("Lisieux")
|
|
@@ -730,49 +730,49 @@ static const char french_1[] =
|
|
|
MK("Beaujolais")
|
|
|
MK("Narbonne")
|
|
|
MK("Albi")
|
|
|
MK("St. Valery")
|
|
|
MK("Biarritz")
|
|
|
MK("Béziers")
|
|
|
MK("Nîmes")
|
|
|
MK("Chamonix")
|
|
|
MK("Angoulème")
|
|
|
MK("Alençon");
|
|
|
|
|
|
static byte MakeFrenchTownName(byte *buf, uint32 seed)
|
|
|
{
|
|
|
AppendPart(&buf, GETNUM(0, NUM_FRENCH_1), french_1);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
static byte MakeAmericanTownName(byte *buf, uint32 seed)
|
|
|
{
|
|
|
// make american town names equal to english for now.
|
|
|
return MakeEnglishTownName(buf, seed);
|
|
|
}
|
|
|
|
|
|
#define NUM_SILLY_1 88
|
|
|
static const char silly_1[] =
|
|
|
static const char silly_1[] =
|
|
|
MK("Binky")
|
|
|
MK("Blubber")
|
|
|
MK("Bumble")
|
|
|
MK("Crinkle")
|
|
|
MK("Crusty")
|
|
|
MK("Dangle")
|
|
|
MK("Dribble")
|
|
|
MK("Flippety")
|
|
|
MK("Google")
|
|
|
MK("Muffin")
|
|
|
|
|
|
MK("Nosey")
|
|
|
MK("Pinker")
|
|
|
MK("Quack")
|
|
|
MK("Rumble")
|
|
|
MK("Sleepy")
|
|
|
MK("Sliggles")
|
|
|
MK("Snooze")
|
|
|
MK("Teddy")
|
|
|
MK("Tinkle")
|
|
|
MK("Twister")
|
|
|
|
|
|
MK("Pinker")
|
|
|
MK("Hippo")
|
|
@@ -830,70 +830,70 @@ static const char silly_1[] =
|
|
|
MK("Tumble")
|
|
|
|
|
|
MK("Snooze")
|
|
|
MK("Water")
|
|
|
MK("Windy")
|
|
|
MK("Amble")
|
|
|
MK("Bubble")
|
|
|
MK("Cheery")
|
|
|
MK("Cheese")
|
|
|
MK("Cockle")
|
|
|
MK("Cracker")
|
|
|
MK("Crumple")
|
|
|
|
|
|
MK("Teddy")
|
|
|
MK("Evil")
|
|
|
MK("Fairy")
|
|
|
MK("Falling")
|
|
|
MK("Fishy")
|
|
|
MK("Fizzle")
|
|
|
MK("Frosty")
|
|
|
MK("Griddle")
|
|
|
;
|
|
|
|
|
|
#define NUM_SILLY_2 15
|
|
|
static const char silly_2[] =
|
|
|
static const char silly_2[] =
|
|
|
MK("ton")
|
|
|
MK("bury")
|
|
|
MK("bottom")
|
|
|
MK("ville")
|
|
|
MK("well")
|
|
|
MK("weed")
|
|
|
MK("worth")
|
|
|
MK("wig")
|
|
|
MK("wick")
|
|
|
MK("wood")
|
|
|
|
|
|
|
|
|
MK("pool")
|
|
|
MK("head")
|
|
|
MK("burg")
|
|
|
MK("gate")
|
|
|
MK("bridge")
|
|
|
;
|
|
|
|
|
|
|
|
|
static byte MakeSillyTownName(byte *buf, uint32 seed)
|
|
|
{
|
|
|
{
|
|
|
AppendPart(&buf, GETNUM(0, NUM_SILLY_1), silly_1);
|
|
|
AppendPart(&buf, GETNUM(16, NUM_SILLY_2),silly_2);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
|
|
|
#define NUM_SWEDISH_1 4
|
|
|
static const char swedish_1[] =
|
|
|
MK("Gamla ")
|
|
|
MK("Lilla ")
|
|
|
MK("Nya ")
|
|
|
MK("Stora ");
|
|
|
|
|
|
#define NUM_SWEDISH_2 38
|
|
|
static const char swedish_2[] =
|
|
|
MK("Boll")
|
|
|
MK("Bor")
|
|
|
MK("Ed")
|
|
|
MK("En")
|
|
|
MK("Erik")
|
|
|
MK("Es")
|
|
|
MK("Fin")
|
|
|
MK("Fisk")
|
|
|
MK("Grön")
|
|
@@ -1060,49 +1060,49 @@ static byte MakeSwedishTownName(byte *bu
|
|
|
else {
|
|
|
AppendPart(&buf, GETNUM(7, NUM_SWEDISH_2A), swedish_2a);
|
|
|
AppendPart(&buf, GETNUM(10, NUM_SWEDISH_2B), swedish_2b);
|
|
|
AppendPart(&buf, GETNUM(13, NUM_SWEDISH_2C), swedish_2c);
|
|
|
}
|
|
|
|
|
|
AppendPart(&buf, GETNUM(16, NUM_SWEDISH_3), swedish_3);
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
|
|
|
#define NUM_DUTCH_1 8
|
|
|
static const char dutch_1[] =
|
|
|
MK("Nieuw ")
|
|
|
MK("Oud ")
|
|
|
MK("Groot ")
|
|
|
MK("Zuid ")
|
|
|
MK("Noord ")
|
|
|
MK("Oost ")
|
|
|
MK("West ")
|
|
|
MK("Klein ");
|
|
|
|
|
|
#define NUM_DUTCH_2 57
|
|
|
static const char dutch_2[] =
|
|
|
static const char dutch_2[] =
|
|
|
MK("Hoog")
|
|
|
MK("Laag")
|
|
|
MK("Klein")
|
|
|
MK("Groot")
|
|
|
MK("Noorder")
|
|
|
MK("Noord")
|
|
|
MK("Zuider")
|
|
|
MK("Zuid")
|
|
|
MK("Ooster")
|
|
|
MK("Oost")
|
|
|
MK("Wester")
|
|
|
MK("West")
|
|
|
MK("Hoofd")
|
|
|
MK("Midden")
|
|
|
MK("Eind")
|
|
|
MK("Amster")
|
|
|
MK("Amstel")
|
|
|
MK("Dord")
|
|
|
MK("Rotter")
|
|
|
MK("Haar")
|
|
|
MK("Til")
|
|
|
MK("Enk")
|
|
|
MK("Dok")
|
|
|
MK("Veen")
|
|
@@ -1120,82 +1120,82 @@ static const char dutch_2[] =
|
|
|
MK("Drie")
|
|
|
MK("Ter")
|
|
|
MK("Groes")
|
|
|
MK("Goes")
|
|
|
MK("Soest")
|
|
|
MK("Coe")
|
|
|
MK("Uit")
|
|
|
MK("Zwaag")
|
|
|
MK("Hellen")
|
|
|
MK("Slie")
|
|
|
MK("IJ")
|
|
|
MK("Grubben")
|
|
|
MK("Groen")
|
|
|
MK("Lek")
|
|
|
MK("Ridder")
|
|
|
MK("Schie")
|
|
|
MK("Olde")
|
|
|
MK("Roose")
|
|
|
MK("Haar")
|
|
|
MK("Til")
|
|
|
MK("Loos")
|
|
|
MK("Hil");
|
|
|
|
|
|
#define NUM_DUTCH_3 20
|
|
|
static const char dutch_3[] =
|
|
|
static const char dutch_3[] =
|
|
|
MK("Drog")
|
|
|
MK("Nat")
|
|
|
MK("Valk")
|
|
|
MK("Bob")
|
|
|
MK("Dedem")
|
|
|
MK("Kollum")
|
|
|
MK("Best")
|
|
|
MK("Hoend")
|
|
|
MK("Leeuw")
|
|
|
MK("Graaf")
|
|
|
MK("Uithuis")
|
|
|
MK("Purm")
|
|
|
MK("Hard")
|
|
|
MK("Hell")
|
|
|
MK("Werk")
|
|
|
MK("Spijk")
|
|
|
MK("Vink")
|
|
|
MK("Wams")
|
|
|
MK("Heerhug")
|
|
|
MK("Koning");
|
|
|
|
|
|
|
|
|
|
|
|
#define NUM_DUTCH_4 6
|
|
|
static const char dutch_4[] =
|
|
|
static const char dutch_4[] =
|
|
|
MK("e")
|
|
|
MK("er")
|
|
|
MK("el")
|
|
|
MK("en")
|
|
|
MK("o")
|
|
|
MK("s");
|
|
|
|
|
|
#define NUM_DUTCH_5 56
|
|
|
static const char dutch_5[] =
|
|
|
static const char dutch_5[] =
|
|
|
MK("stad")
|
|
|
MK("vorst")
|
|
|
MK("dorp")
|
|
|
MK("dam")
|
|
|
MK("beek")
|
|
|
MK("doorn")
|
|
|
MK("zijl")
|
|
|
MK("zijlen")
|
|
|
MK("lo")
|
|
|
MK("muiden")
|
|
|
MK("meden")
|
|
|
MK("vliet")
|
|
|
MK("nisse")
|
|
|
MK("daal")
|
|
|
MK("vorden")
|
|
|
MK("vaart")
|
|
|
MK("mond")
|
|
|
MK("zaal")
|
|
|
MK("water")
|
|
|
MK("duinen")
|
|
|
MK("heuvel")
|
|
|
MK("geest")
|
|
|
MK("kerk")
|
|
|
MK("meer")
|
|
@@ -1210,128 +1210,128 @@ static const char dutch_5[] =
|
|
|
MK("burg")
|
|
|
MK("recht")
|
|
|
MK("drecht")
|
|
|
MK("trecht")
|
|
|
MK("tricht")
|
|
|
MK("dricht")
|
|
|
MK("lum")
|
|
|
MK("rum")
|
|
|
MK("halen")
|
|
|
MK("oever")
|
|
|
MK("wolde")
|
|
|
MK("veen")
|
|
|
MK("hoven")
|
|
|
MK("gast")
|
|
|
MK("kum")
|
|
|
MK("hage")
|
|
|
MK("dijk")
|
|
|
MK("zwaag")
|
|
|
MK("pomp")
|
|
|
MK("huizen")
|
|
|
MK("bergen")
|
|
|
MK("schede")
|
|
|
MK("mere")
|
|
|
MK("end");
|
|
|
|
|
|
|
|
|
static byte MakeDutchTownName(byte *buf, uint32 seed)
|
|
|
{
|
|
|
int i;
|
|
|
|
|
|
i = GETNUM(0, 50 + NUM_DUTCH_1) - 50;
|
|
|
if (i >= 0)
|
|
|
if (i >= 0)
|
|
|
AppendPart(&buf, i, dutch_1);
|
|
|
|
|
|
i = GETNUM(6, 9);
|
|
|
if(i > 4){
|
|
|
AppendPart(&buf, GETNUM(9, NUM_DUTCH_2), dutch_2);
|
|
|
} else {
|
|
|
AppendPart(&buf, GETNUM(9, NUM_DUTCH_3), dutch_3);
|
|
|
AppendPart(&buf, GETNUM(12, NUM_DUTCH_4), dutch_4);
|
|
|
}
|
|
|
AppendPart(&buf, GETNUM(15, NUM_DUTCH_5), dutch_5);
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
#define NUM_FINNISH_1 25
|
|
|
static const char finnish_1[] =
|
|
|
static const char finnish_1[] =
|
|
|
MK("Aijala")
|
|
|
MK("Kisko")
|
|
|
MK("Espoo")
|
|
|
MK("Helsinki")
|
|
|
MK("Tapiola")
|
|
|
MK("Järvelä")
|
|
|
MK("Lahti")
|
|
|
MK("Kotka")
|
|
|
MK("Hamina")
|
|
|
MK("Loviisa")
|
|
|
MK("Kouvola")
|
|
|
MK("Tampere")
|
|
|
MK("Kokkola")
|
|
|
MK("Oulu")
|
|
|
MK("Salo")
|
|
|
MK("Malmi")
|
|
|
MK("Pelto")
|
|
|
MK("Koski")
|
|
|
MK("Iisalmi")
|
|
|
MK("Raisio")
|
|
|
MK("Taavetti")
|
|
|
MK("Joensuu")
|
|
|
MK("Imatra")
|
|
|
MK("Tapanila")
|
|
|
MK("Pasila");
|
|
|
|
|
|
|
|
|
#define NUM_FINNISH_2a 26
|
|
|
static const char finnish_2a[] =
|
|
|
static const char finnish_2a[] =
|
|
|
MK("Hiekka")
|
|
|
MK("Haapa")
|
|
|
MK("Mylly")
|
|
|
MK("Kivi")
|
|
|
MK("Lappeen")
|
|
|
MK("Lohjan")
|
|
|
MK("Savon")
|
|
|
MK("Sauna")
|
|
|
MK("Keri")
|
|
|
MK("Uusi")
|
|
|
MK("Vanha")
|
|
|
MK("Lapin")
|
|
|
MK("Kesä")
|
|
|
MK("Kuusi")
|
|
|
MK("Pelto")
|
|
|
MK("Tuomi")
|
|
|
MK("Pitäjän")
|
|
|
MK("Terva")
|
|
|
MK("Olki")
|
|
|
MK("Heinä")
|
|
|
MK("Kuusan")
|
|
|
MK("Seinä")
|
|
|
MK("Kemi")
|
|
|
MK("Rova")
|
|
|
MK("Martin")
|
|
|
MK("Koivu");
|
|
|
|
|
|
#define NUM_FINNISH_2b 18
|
|
|
static const char finnish_2b[] =
|
|
|
static const char finnish_2b[] =
|
|
|
MK("harju")
|
|
|
MK("linna")
|
|
|
MK("järvi")
|
|
|
MK("kallio")
|
|
|
MK("mäki")
|
|
|
MK("nummi")
|
|
|
MK("joki")
|
|
|
MK("kylä")
|
|
|
MK("lampi")
|
|
|
MK("lahti")
|
|
|
MK("metsä")
|
|
|
MK("suo")
|
|
|
MK("laakso")
|
|
|
MK("niitty")
|
|
|
MK("luoto")
|
|
|
MK("hovi")
|
|
|
MK("ranta")
|
|
|
MK("koski");
|
|
|
|
|
|
static byte MakeFinnishTownName(byte *buf, uint32 seed)
|
|
|
{
|
|
|
// Select randomly if town name should consists of one or two parts.
|
|
|
if (GETNUM(0, 15) >= 10)
|
|
|
AppendPart(&buf, GETNUM(2, NUM_FINNISH_1), finnish_1); // One part
|
|
@@ -1555,49 +1555,49 @@ MK(" Wody")
|
|
|
MK(" Bajoro")
|
|
|
MK(" Krajenski")
|
|
|
MK(" Slaski")
|
|
|
MK(" Mazowiecki")
|
|
|
MK(" Pomorski")
|
|
|
MK(" Wielki")
|
|
|
MK(" Maly")
|
|
|
MK(" Warminski")
|
|
|
MK(" Mazurski")
|
|
|
MK(" Mniejszy")
|
|
|
MK(" Wiekszy")
|
|
|
MK(" Gorny")
|
|
|
MK(" Dolny")
|
|
|
MK(" Wielki")
|
|
|
MK(" Stary")
|
|
|
MK(" Nowy")
|
|
|
MK(" Wielkopolski")
|
|
|
MK(" Wzgorze")
|
|
|
MK(" Mosty")
|
|
|
MK(" Kujawski")
|
|
|
MK(" Malopolski")
|
|
|
MK(" Podlaski")
|
|
|
MK(" Lesny")
|
|
|
;
|
|
|
static const char polish_3_f[] =
|
|
|
static const char polish_3_f[] =
|
|
|
MK(" Wybudowanie")
|
|
|
MK(" Swietokrzyska")
|
|
|
MK(" Gorska")
|
|
|
MK(" Morska")
|
|
|
MK(" Zdroj")
|
|
|
MK(" Woda")
|
|
|
MK(" Bajoro")
|
|
|
MK(" Krajenska")
|
|
|
MK(" Slaska")
|
|
|
MK(" Mazowiecka")
|
|
|
MK(" Pomorska")
|
|
|
MK(" Wielka")
|
|
|
MK(" Mala")
|
|
|
MK(" Warminska")
|
|
|
MK(" Mazurska")
|
|
|
MK(" Mniejsza")
|
|
|
MK(" Wieksza")
|
|
|
MK(" Gorna")
|
|
|
MK(" Dolna")
|
|
|
MK(" Wielka")
|
|
|
MK(" Stara")
|
|
|
MK(" Nowa")
|
|
|
MK(" Wielkopolska")
|
|
|
MK(" Wzgorza")
|
|
@@ -1671,49 +1671,49 @@ static byte MakePolishTownName(byte *buf
|
|
|
}
|
|
|
|
|
|
t = _polish_types;
|
|
|
if(IS_INT_INSIDE(i, NUM_POLISH_2_O, NUM_POLISH_2_O + NUM_POLISH_2_M)) {
|
|
|
// nothing
|
|
|
} else if (IS_INT_INSIDE(i, NUM_POLISH_2_O + NUM_POLISH_2_M, NUM_POLISH_2_O + NUM_POLISH_2_M + NUM_POLISH_2_F)) {
|
|
|
t += 1;
|
|
|
} else {
|
|
|
t += 2;
|
|
|
}
|
|
|
|
|
|
// suffix or prefix
|
|
|
if(x < 8) {
|
|
|
AppendPart(&buf, GETNUM(10, NUM_POLISH_1), (*t)[0]);
|
|
|
AppendPart(&buf, i, polish_2);
|
|
|
} else {
|
|
|
AppendPart(&buf, i, polish_2);
|
|
|
AppendPart(&buf, GETNUM(10, NUM_POLISH_3), (*t)[1]);
|
|
|
}
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
#define NUM_CZECH_1 82
|
|
|
static const char czech_1[] =
|
|
|
static const char czech_1[] =
|
|
|
MK("As")
|
|
|
MK("Benesov")
|
|
|
MK("Beroun")
|
|
|
MK("Bezdruzice")
|
|
|
MK("Blansko")
|
|
|
MK("Breclav")
|
|
|
MK("Brno")
|
|
|
MK("Bruntál")
|
|
|
MK("Ceská Lípa")
|
|
|
MK("Ceské Budejovice")
|
|
|
MK("Ceskı Krumlov")
|
|
|
MK("Decín")
|
|
|
MK("Domazlice")
|
|
|
MK("Dubí")
|
|
|
MK("Frıdek-Místek")
|
|
|
MK("Havlíckuv Brod")
|
|
|
MK("Hodonín")
|
|
|
MK("Hradec Králové")
|
|
|
MK("Humpolec")
|
|
|
MK("Cheb")
|
|
|
MK("Chomutov")
|
|
|
MK("Chrudim")
|
|
|
MK("Jablonec nad Nisou")
|
|
|
MK("Jeseník")
|
|
@@ -1759,49 +1759,49 @@ MK("Rychnov nad Kneznou")
|
|
|
MK("Semily")
|
|
|
MK("Sokolov")
|
|
|
MK("Strakonice")
|
|
|
MK("Stredokluky")
|
|
|
MK("Sumperk")
|
|
|
MK("Svitavy")
|
|
|
MK("Tábor")
|
|
|
MK("Tachov")
|
|
|
MK("Teplice")
|
|
|
MK("Trebíc")
|
|
|
MK("Trutnov")
|
|
|
MK("Uherské Hradiste")
|
|
|
MK("Ústí nad Labem")
|
|
|
MK("Ústí nad Orlicí")
|
|
|
MK("Vsetín")
|
|
|
MK("Vyskov")
|
|
|
MK("Zdár nad Sázavou")
|
|
|
MK("Zlín")
|
|
|
MK("Znojmo")
|
|
|
;
|
|
|
|
|
|
static byte MakeCzechTownName(byte *buf, uint32 seed)
|
|
|
{
|
|
|
AppendPart(&buf, GETNUM(0, NUM_CZECH_1), czech_1);
|
|
|
return 0;
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#define NUM_SLOVAKISH_1 87
|
|
|
static const char slovakish_1[] =
|
|
|
MK("Bratislava")
|
|
|
MK("Banovce nad Bebravou")
|
|
|
MK("Banska Bystrica")
|
|
|
MK("Banska Stiavnica")
|
|
|
MK("Bardejov")
|
|
|
MK("Brezno")
|
|
|
MK("Brezova pod Bradlom")
|
|
|
MK("Bytca")
|
|
|
MK("Cadca")
|
|
|
MK("Cierna nad Tisou")
|
|
|
MK("Detva")
|
|
|
MK("Detva")
|
|
|
MK("Dolny Kubin")
|
|
|
MK("Dolny Kubin")
|
|
|
MK("Dunajska Streda")
|
|
|
MK("Gabcikovo")
|
|
|
MK("Galanta")
|
|
|
MK("Gbely")
|
|
@@ -1858,63 +1858,63 @@ MK("Stara Tura")
|
|
|
MK("Strazske")
|
|
|
MK("Stropkov")
|
|
|
MK("Stupava")
|
|
|
MK("Sturovo")
|
|
|
MK("Sulekovo")
|
|
|
MK("Topolcany")
|
|
|
MK("Trebisov")
|
|
|
MK("Trencin")
|
|
|
MK("Trnava")
|
|
|
MK("Turcianske Teplice")
|
|
|
MK("Tvrdosin")
|
|
|
MK("Vrable")
|
|
|
MK("Vranov nad Toplov")
|
|
|
MK("Zahorska Bystrica")
|
|
|
MK("Zdiar")
|
|
|
MK("Ziar nad Hronom")
|
|
|
MK("Zilina")
|
|
|
MK("Zlate Moravce")
|
|
|
MK("Zvolen")
|
|
|
;
|
|
|
|
|
|
static byte MakeSlovakishTownName(byte *buf, uint32 seed)
|
|
|
{
|
|
|
AppendPart(&buf, GETNUM(0, NUM_SLOVAKISH_1), slovakish_1);
|
|
|
return 0;
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
// Modifiers
|
|
|
#define NUM_HUNGARIAN_1 5
|
|
|
static const char hungarian_1[] =
|
|
|
static const char hungarian_1[] =
|
|
|
MK("Nagy-")
|
|
|
MK("Kis-")
|
|
|
MK("Felsõ-")
|
|
|
MK("Alsó-")
|
|
|
MK("Új-")
|
|
|
;
|
|
|
|
|
|
#define NUM_HUNGARIAN_2 54
|
|
|
static const char hungarian_2[] =
|
|
|
static const char hungarian_2[] =
|
|
|
// River modifiers
|
|
|
// 1 - 10
|
|
|
MK("Bodrog")
|
|
|
MK("Dráva")
|
|
|
MK("Duna")
|
|
|
MK("Hejõ")
|
|
|
MK("Hernád")
|
|
|
MK("Rába")
|
|
|
MK("Sajó")
|
|
|
MK("Szamos")
|
|
|
MK("Tisza")
|
|
|
MK("Zala")
|
|
|
// Lake modifiers
|
|
|
// 11 - 12
|
|
|
MK("Balaton")
|
|
|
MK("Fertõ")
|
|
|
// Mountain modifiers
|
|
|
// 13 - 14
|
|
|
MK("Bakony")
|
|
|
MK("Cserhát")
|
|
|
// Country modifiers
|
|
|
// 15 - 23
|
|
|
MK("Bihar")
|
|
|
MK("Hajdú")
|
|
@@ -1950,69 +1950,69 @@ static const char hungarian_2[] =
|
|
|
MK("Nemes")
|
|
|
MK("Püspök")
|
|
|
MK("Szent")
|
|
|
// Plant modifiers
|
|
|
// 41 - 42
|
|
|
MK("Almás")
|
|
|
MK("Szilvás")
|
|
|
// Standard stuff
|
|
|
// 43 - 54
|
|
|
MK("Agg")
|
|
|
MK("Aranyos")
|
|
|
MK("Békés")
|
|
|
MK("Egyházas")
|
|
|
MK("Gagy")
|
|
|
MK("Heves")
|
|
|
MK("Kapos")
|
|
|
MK("Tápió")
|
|
|
MK("Torna")
|
|
|
MK("Vas")
|
|
|
MK("Vámos")
|
|
|
MK("Vásáros")
|
|
|
;
|
|
|
|
|
|
#define NUM_HUNGARIAN_3 16
|
|
|
static const char hungarian_3[] =
|
|
|
static const char hungarian_3[] =
|
|
|
MK("apáti")
|
|
|
MK("bába")
|
|
|
MK("bikk")
|
|
|
MK("dob")
|
|
|
MK("fa")
|
|
|
MK("föld")
|
|
|
MK("hegyes")
|
|
|
MK("kak")
|
|
|
MK("kereszt")
|
|
|
MK("kürt")
|
|
|
MK("ladány")
|
|
|
MK("mérges")
|
|
|
MK("szalonta")
|
|
|
MK("telek")
|
|
|
MK("vas")
|
|
|
MK("völgy")
|
|
|
;
|
|
|
|
|
|
#define NUM_HUNGARIAN_4 5
|
|
|
static const char hungarian_4[] =
|
|
|
static const char hungarian_4[] =
|
|
|
MK("alja")
|
|
|
MK("egyháza")
|
|
|
MK("háza")
|
|
|
MK("úr")
|
|
|
MK("vár")
|
|
|
;
|
|
|
|
|
|
#define NUM_HUNGARIAN_REAL 35
|
|
|
static const char hungarian_real[] =
|
|
|
MK("Ajka")
|
|
|
MK("Aszód")
|
|
|
MK("Badacsony")
|
|
|
MK("Baja")
|
|
|
MK("Budapest")
|
|
|
MK("Debrecen")
|
|
|
MK("Eger")
|
|
|
MK("Fonyód")
|
|
|
MK("Gödöllõ")
|
|
|
MK("Gyõr")
|
|
|
MK("Gyula")
|
|
|
MK("Karcag")
|
|
|
MK("Kecskemét")
|
|
|
MK("Keszthely")
|
|
|
MK("Kisköre")
|
|
@@ -2033,49 +2033,49 @@ static const char hungarian_real[] =
|
|
|
MK("Szentes")
|
|
|
MK("Szolnok")
|
|
|
MK("Tihany")
|
|
|
MK("Tokaj")
|
|
|
MK("Vác")
|
|
|
MK("Záhony")
|
|
|
MK("Zirc")
|
|
|
;
|
|
|
|
|
|
static byte MakeHungarianTownName(byte *buf, uint32 seed)
|
|
|
{
|
|
|
int i;
|
|
|
|
|
|
if (GETNUM(12, 15) < 3) {
|
|
|
/* These are real names.. */
|
|
|
AppendPart(&buf, GETNUM(0, NUM_HUNGARIAN_REAL), hungarian_real);
|
|
|
} else {
|
|
|
/* These are the generated names.. Some of them exist, LOL */
|
|
|
/* Append the prefix if needed */
|
|
|
i = GETNUM(3, NUM_HUNGARIAN_1 * 3);
|
|
|
if (i < NUM_HUNGARIAN_1) AppendPart(&buf, i, hungarian_1);
|
|
|
|
|
|
AppendPart(&buf, GETNUM(3, NUM_HUNGARIAN_2), hungarian_2);
|
|
|
AppendPart(&buf, GETNUM(6, NUM_HUNGARIAN_3), hungarian_3);
|
|
|
|
|
|
|
|
|
i = GETNUM(10, NUM_HUNGARIAN_4 * 3);
|
|
|
if (i < NUM_HUNGARIAN_4) AppendPart(&buf, i, hungarian_4);
|
|
|
}
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
TownNameGenerator * const _town_name_generators[] = {
|
|
|
MakeEnglishTownName,
|
|
|
MakeFrenchTownName,
|
|
|
MakeGermanTownName,
|
|
|
MakeAmericanTownName,
|
|
|
MakeSpanishTownName,
|
|
|
MakeSillyTownName,
|
|
|
MakeSwedishTownName,
|
|
|
MakeDutchTownName,
|
|
|
MakeFinnishTownName,
|
|
|
MakePolishTownName,
|
|
|
MakeCzechTownName,
|
|
|
MakeSlovakishTownName,
|
|
|
MakeHungarianTownName,
|
|
|
MakeAustrianTownName
|
|
|
};
|
|
|
|
|
|
#define FIXNUM(x, y, z) (((((x) << 16) / (y)) + 1) << z)
|