From a6f9488ae4285b7904755d0913a6134a95d43c28 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 23 Sep 2011 19:27:15 +0000 Subject: [PATCH] (svn r22957) -Codechange: SPECSTR_PLAYERNAME is actually the company name, which is derived from the town name + ' Transport'. So make sure the last constant is in sync with the town name table --- src/company_cmd.cpp | 2 +- src/saveload/strings_sl.cpp | 4 ++-- src/strings_type.h | 13 ++++--------- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index 46c310e826..f5bdd473de 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -349,7 +349,7 @@ static void GenerateCompanyName(Company *c) StringID str; uint32 strp; if (t->name == NULL && IsInsideMM(t->townnametype, SPECSTR_TOWNNAME_START, SPECSTR_TOWNNAME_LAST + 1)) { - str = t->townnametype - SPECSTR_TOWNNAME_START + SPECSTR_PLAYERNAME_START; + str = t->townnametype - SPECSTR_TOWNNAME_START + SPECSTR_COMPANY_NAME_START; strp = t->townnameparts; verify_name:; diff --git a/src/saveload/strings_sl.cpp b/src/saveload/strings_sl.cpp index 00180978b5..b1cc50d460 100644 --- a/src/saveload/strings_sl.cpp +++ b/src/saveload/strings_sl.cpp @@ -29,8 +29,8 @@ StringID RemapOldStringID(StringID s) switch (s) { case 0x0006: return STR_SV_EMPTY; case 0x7000: return STR_SV_UNNAMED; - case 0x70E4: return SPECSTR_PLAYERNAME_ENGLISH; - case 0x70E9: return SPECSTR_PLAYERNAME_ENGLISH; + case 0x70E4: return SPECSTR_COMPANY_NAME_START; + case 0x70E9: return SPECSTR_COMPANY_NAME_START; case 0x8864: return STR_SV_TRAIN_NAME; case 0x902B: return STR_SV_ROAD_VEHICLE_NAME; case 0x9830: return STR_SV_SHIP_NAME; diff --git a/src/strings_type.h b/src/strings_type.h index 1dea474f91..35f22e5fc2 100644 --- a/src/strings_type.h +++ b/src/strings_type.h @@ -54,16 +54,11 @@ enum SpecialStrings { SPECSTR_TOWNNAME_CATALAN, SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_CATALAN, - /* special strings for player names on the form "TownName transport". */ - SPECSTR_PLAYERNAME_START = 0x70EA, - SPECSTR_PLAYERNAME_ENGLISH = SPECSTR_PLAYERNAME_START, - SPECSTR_PLAYERNAME_FRENCH, - SPECSTR_PLAYERNAME_GERMAN, - SPECSTR_PLAYERNAME_AMERICAN, - SPECSTR_PLAYERNAME_LATIN, - SPECSTR_PLAYERNAME_SILLY, - SPECSTR_PLAYERNAME_LAST = SPECSTR_PLAYERNAME_SILLY, + /* special strings for company names on the form "TownName transport". */ + SPECSTR_COMPANY_NAME_START = 0x70EA, + SPECSTR_COMPANY_NAME_LAST = SPECSTR_COMPANY_NAME_START + SPECSTR_TOWNNAME_LAST - SPECSTR_TOWNNAME_START, + SPECSTR_SILLY_NAME = 0x70E5, SPECSTR_ANDCO_NAME = 0x70E6, SPECSTR_PRESIDENT_NAME = 0x70E7,