summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2017-02-26 19:40:53 +0000
committerfrosch <frosch@openttd.org>2017-02-26 19:40:53 +0000
commita56e2bccd0bbeac71e3fa4c406ae5ec5f8e578a8 (patch)
tree921d348a0938d086c0b7036bedc1e84df7264316 /src/saveload
parentf4da8ece0ce02d6fe3dac6f8adc147e8a3d095a3 (diff)
downloadopenttd-a56e2bccd0bbeac71e3fa4c406ae5ec5f8e578a8.tar.xz
(svn r27756) -Codechange: Add StringTab enum
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/company_sl.cpp4
-rw-r--r--src/saveload/strings_sl.cpp2
-rw-r--r--src/saveload/town_sl.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/saveload/company_sl.cpp b/src/saveload/company_sl.cpp
index ff02167d3..2ad975990 100644
--- a/src/saveload/company_sl.cpp
+++ b/src/saveload/company_sl.cpp
@@ -502,11 +502,11 @@ static void Check_PLYR()
/* We do not load old custom names */
if (IsSavegameVersionBefore(84)) {
- if (GetStringTab(cprops->name_1) == 15) {
+ if (GetStringTab(cprops->name_1) == TEXT_TAB_OLD_CUSTOM) {
cprops->name_1 = STR_GAME_SAVELOAD_NOT_AVAILABLE;
}
- if (GetStringTab(cprops->president_name_1) == 15) {
+ if (GetStringTab(cprops->president_name_1) == TEXT_TAB_OLD_CUSTOM) {
cprops->president_name_1 = STR_GAME_SAVELOAD_NOT_AVAILABLE;
}
}
diff --git a/src/saveload/strings_sl.cpp b/src/saveload/strings_sl.cpp
index c9fb91546..aa2fdd3e6 100644
--- a/src/saveload/strings_sl.cpp
+++ b/src/saveload/strings_sl.cpp
@@ -61,7 +61,7 @@ char *_old_name_array = NULL;
char *CopyFromOldName(StringID id)
{
/* Is this name an (old) custom name? */
- if (GetStringTab(id) != 15) return NULL;
+ if (GetStringTab(id) != TEXT_TAB_OLD_CUSTOM) return NULL;
if (IsSavegameVersionBefore(37)) {
/* Allow for expansion when converted to UTF-8. */
diff --git a/src/saveload/town_sl.cpp b/src/saveload/town_sl.cpp
index 8a9f879bb..3af5171b8 100644
--- a/src/saveload/town_sl.cpp
+++ b/src/saveload/town_sl.cpp
@@ -286,7 +286,7 @@ static void Load_TOWN()
SlObject(&t->received[i], _town_received_desc);
}
- if (t->townnamegrfid == 0 && !IsInsideMM(t->townnametype, SPECSTR_TOWNNAME_START, SPECSTR_TOWNNAME_LAST + 1) && GetStringTab(t->townnametype) != 15) {
+ if (t->townnamegrfid == 0 && !IsInsideMM(t->townnametype, SPECSTR_TOWNNAME_START, SPECSTR_TOWNNAME_LAST + 1) && GetStringTab(t->townnametype) != TEXT_TAB_OLD_CUSTOM) {
SlErrorCorrupt("Invalid town name generator");
}