(svn r234) -Fix: added missing romanian.txt to VC6, VS.NET and Jamfile project file
authordarkvater
Mon, 13 Sep 2004 12:28:11 +0000
changeset 233 dd177a8c9f19
parent 232 c3d08de192ed
child 234 28314b800e76
(svn r234) -Fix: added missing romanian.txt to VC6, VS.NET and Jamfile project file
-Feature: Added romanian town names and currency (Magic_Pixel)
Jamfile.next
lang/english.txt
langs.dsp
langs.vcproj
namegen.c
settings.c
strings.c
ttd.h
--- a/Jamfile.next	Mon Sep 13 09:21:42 2004 +0000
+++ b/Jamfile.next	Mon Sep 13 12:28:11 2004 +0000
@@ -16,7 +16,7 @@
 	airport.c grfspecial.c terraform_gui.c ;
 
 
-LANGFILES = english.txt swedish.txt french.txt german.txt italian.txt slovak.txt hungarian.txt norwegian.txt danish.txt czech.txt galician.txt polish.txt;
+LANGFILES = english.txt swedish.txt french.txt german.txt italian.txt slovak.txt hungarian.txt norwegian.txt danish.txt czech.txt galician.txt polish.txt romanian.txt;
 
 ####################
 # On UNIX we use gcc
--- a/lang/english.txt	Mon Sep 13 09:21:42 2004 +0000
+++ b/lang/english.txt	Mon Sep 13 12:28:11 2004 +0000
@@ -856,6 +856,7 @@
 STR_TOWNNAME_SLOVAKISH					:Slovakish
 STR_TOWNNAME_HUNGARIAN					:Hungarian
 STR_TOWNNAME_AUSTRIAN					:Austrian
+STR_TOWNNAME_ROMANIAN					:Romanian
 ############ end of	townname region
 
 STR_CURR_POUNDS						:Pounds ({POUNDSIGN})
@@ -879,6 +880,7 @@
 STR_CURR_CZK							:Czech Koruna (CZK)
 STR_CURR_ISK							:Icelandic Krona (ISK)
 STR_CURR_NOK							:Norwegian Krone (NOK)
+STR_CURR_ROL							:Romanian Leu (Lei)
 STR_CURR_EUR							:Euro (€)
 
 STR_OPTIONS_LANG						:{BLACK}Language
--- a/langs.dsp	Mon Sep 13 09:21:42 2004 +0000
+++ b/langs.dsp	Mon Sep 13 12:28:11 2004 +0000
@@ -183,6 +183,17 @@
 # End Source File
 # Begin Source File
 
+SOURCE=.\lang\romanian.txt
+# Begin Custom Build
+InputPath=.\lang\romanian.txt
+
+"lang\romanian.lng" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+	strgen\debug\strgen.exe lang\romanian.txt
+
+# End Custom Build
+# End Source File
+# Begin Source File
+
 SOURCE=.\lang\slovak.txt
 # Begin Custom Build
 InputPath=.\lang\slovak.txt
--- a/langs.vcproj	Mon Sep 13 09:21:42 2004 +0000
+++ b/langs.vcproj	Mon Sep 13 12:28:11 2004 +0000
@@ -192,6 +192,18 @@
 			</FileConfiguration>
 		</File>
 		<File
+			RelativePath=".\lang\romanian.txt">
+			<FileConfiguration
+				Name="Debug|Win32">
+				<Tool
+					Name="VCCustomBuildTool"
+					Description="Generating romanian language file"
+					CommandLine="strgen\debug\strgen.exe &quot;$(InputPath)&quot;
+"
+					Outputs="lang\romanian.lng"/>
+			</FileConfiguration>
+		</File>
+		<File
 			RelativePath=".\lang\slovak.txt">
 			<FileConfiguration
 				Name="Debug|Win32">
--- a/namegen.c	Mon Sep 13 09:21:42 2004 +0000
+++ b/namegen.c	Mon Sep 13 12:28:11 2004 +0000
@@ -1783,8 +1783,110 @@
 	return 0;
 }
 
+#define NUM_ROMANIAN_1 94
+static const char romanian_1[]=
+MK("Adjud")
+MK("Alba Iulia")
+MK("Alexandria")
+MK("Babadag")
+MK("Bacău")
+MK("Baia Mare")
+MK("Băile Herculane")
+MK("Băilesti")
+MK("Bârlad")
+MK("Bicaz")
+MK("Bistrita")
+MK("Blaj")
+MK("Borsec")
+MK("Botosani")
+MK("Brăila")
+MK("Brasov")
+MK("Bucuresti")
+MK("Buftea")
+MK("Buzău")
+MK("Călărasi")
+MK("Caransebes")
+MK("Cernavodă")
+MK("Cluj-Napoca")
+MK("Constanta")
+MK("Covasna")
+MK("Craiova")
+MK("Dej")
+MK("Deva")
+MK("Dorohoi")
+MK("Dr.-Tr. Severin")
+MK("Drăgăsani")
+MK("Făgăras")
+MK("Fălticeni")
+MK("Fetesti")
+MK("Focsani")
+MK("Galati")
+MK("Gheorgheni")
+MK("Giurgiu")
+MK("Hârsova")
+MK("Hunedoara")
+MK("Husi")
+MK("Iasi")
+MK("Isaccea")
+MK("Lugoj")
+MK("Măcin")
+MK("Mangalia")
+MK("Medgidia")
+MK("Medias")
+MK("Miercurea Ciuc")
+MK("Mizil")
+MK("Motru")
+MK("Năsăud")
+MK("Năvodari")
+MK("Odobesti")
+MK("Oltenita")
+MK("Onesti")
+MK("Oradea")
+MK("Orsova")
+MK("Petrosani")
+MK("Piatra Neamt")
+MK("Pitesti")
+MK("Ploiesti")
+MK("Predeal")
+MK("Râmnicu Vâlcea")
+MK("Reghin")
+MK("Resita")
+MK("Roman")
+MK("Rosiorii de Vede")
+MK("Satu Mare")
+MK("Sebes")
+MK("Sfântu Gheorghe")
+MK("Sibiu")
+MK("Sighisoara")
+MK("Sinaia")
+MK("Slatina")
+MK("Slobozia")
+MK("Sovata")
+MK("Suceava")
+MK("Sulina")
+MK("Tăndărei")
+MK("Târgoviste")
+MK("Târgu Jiu")
+MK("Târgu Mures")
+MK("Tecuci")
+MK("Timisoara")
+MK("Tulcea")
+MK("Turda")
+MK("Turnu Măgurele")
+MK("Urziceni")
+MK("Vaslui")
+MK("Vatra Dornei")
+MK("Victoria")
+MK("Videle")
+MK("Zalău")
+;
 
-
+static byte MakeRomanianTownName(byte *buf, uint32 seed)
+{
+	AppendPart(&buf, GETNUM(0, NUM_ROMANIAN_1), romanian_1);
+	return 0;	
+}
+ 
 #define NUM_SLOVAKISH_1 87
 static const char slovakish_1[] =
 MK("Bratislava")
@@ -2075,7 +2177,8 @@
 	MakeCzechTownName,
 	MakeSlovakishTownName,
 	MakeHungarianTownName,
-	MakeAustrianTownName
+	MakeAustrianTownName,
+	MakeRomanianTownName
 };
 
 #define FIXNUM(x, y, z) (((((x) << 16) / (y)) + 1) << z)
--- a/settings.c	Mon Sep 13 09:21:42 2004 +0000
+++ b/settings.c	Mon Sep 13 12:28:11 2004 +0000
@@ -780,9 +780,9 @@
 static const SettingDesc gameopt_settings[] = {
 	{"diff_level",	SDT_UINT8,									(void*)9,		(void*)offsetof(GameOptions, diff_level), NULL},
 	{"diff_custom", SDT_INTLIST | SDT_UINT32 | (sizeof(GameDifficulty)/4) << 16, NULL, (void*)offsetof(GameOptions, diff), NULL},
-	{"currency",		SDT_UINT8 | SDT_ONEOFMANY,	(void*)21,	(void*)offsetof(GameOptions, currency),		"GBP|USD|FF|DM|YEN|PT|FT|ZL|ATS|BEF|DKK|FIM|GRD|CHF|NLG|ITL|SEK|RUR|CZK|ISK|NOK|EUR" },
+	{"currency",		SDT_UINT8 | SDT_ONEOFMANY,	(void*)22,	(void*)offsetof(GameOptions, currency),		"GBP|USD|FF|DM|YEN|PT|FT|ZL|ATS|BEF|DKK|FIM|GRD|CHF|NLG|ITL|SEK|RUR|CZK|ISK|NOK|ROL|EUR" },
 	{"distances",		SDT_UINT8 | SDT_ONEOFMANY,	(void*)1,		(void*)offsetof(GameOptions, kilometers), "imperial|metric" },
-	{"town_names",	SDT_UINT8 | SDT_ONEOFMANY,	(void*)0,		(void*)offsetof(GameOptions, town_name),	"english|french|german|american|latin|silly|swedish|dutch|finnish|polish|czech|slovakish|hungarian" },
+	{"town_names",	SDT_UINT8 | SDT_ONEOFMANY,	(void*)0,		(void*)offsetof(GameOptions, town_name),	"english|french|german|american|latin|silly|swedish|dutch|finnish|polish|czech|slovakish|hungarian|romanian" },
 	{"landscape",		SDT_UINT8 | SDT_ONEOFMANY,	(void*)0,		(void*)offsetof(GameOptions, landscape),	"normal|hilly|desert|candy" },
 	{"autosave",		SDT_UINT8 | SDT_ONEOFMANY,	(void*)1,		(void*)offsetof(GameOptions, autosave),		"off|monthly|quarterly|half year|yearly" },
 	{"road_side",		SDT_UINT8 | SDT_ONEOFMANY,	(void*)1,		(void*)offsetof(GameOptions, road_side),	"left|right" },
--- a/strings.c	Mon Sep 13 09:21:42 2004 +0000
+++ b/strings.c	Mon Sep 13 12:28:11 2004 +0000
@@ -72,6 +72,7 @@
 	{ 50,  ',', 0,              "",     " Kc" },
 	{ 130, '.', 0,              "",     " kr" },
 	{ 11,  '.', 0,              "",     " kr" },
+	{ 6,   '.', 0,              "",     " Lei" }, 
 	{ 2,   ',', CF_ISEURO,      "€",    "" },
 };
 
@@ -97,6 +98,7 @@
 	STR_CURR_CZK,
 	STR_CURR_ISK,
 	STR_CURR_NOK,
+	STR_CURR_ROL,
 	STR_CURR_EUR,
 	INVALID_STRING_ID
 };
@@ -663,13 +665,15 @@
 
 	buff[0] = _initial_name_letters[ (sizeof(_initial_name_letters) * (byte)x) >> 8];
 	buff[1] = '.';
-	buff += 2;
+	buff[2] = ' '; // Insert a space after initial and period "I. Firstname" instead of "I.Firstname"
+	buff += 3;
 
 	i = ((sizeof(_initial_name_letters) + 35) * (byte)(x >> 8)) >> 8;
 	if (i < sizeof(_initial_name_letters)) {
 		buff[0] = _initial_name_letters[i];
 		buff[1] = '.';
-		buff += 2;
+		buff[2] = ' '; // Insert a space after initial and period "I. J. Firstname" instead of "I.J.Firstname"
+		buff += 3;
 	}
 
 	base = 0;
--- a/ttd.h	Mon Sep 13 09:21:42 2004 +0000
+++ b/ttd.h	Mon Sep 13 12:28:11 2004 +0000
@@ -482,8 +482,9 @@
 	SPECSTR_TOWNNAME_CZECH,
 	SPECSTR_TOWNNAME_SLOVAKISH,
 	SPECSTR_TOWNNAME_HUNGARIAN,
-	SPECSTR_TOWNNAME_AUSTRIAN,
-	SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_AUSTRIAN,
+ 	SPECSTR_TOWNNAME_AUSTRIAN,
+  SPECSTR_TOWNNAME_ROMANIAN,
+  SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_ROMANIAN, 
 
 	// special strings for player names on the form "TownName transport".
 	SPECSTR_PLAYERNAME_START = 0x70EA,