summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/company_sl.cpp5
-rw-r--r--src/saveload/strings_sl.cpp3
-rw-r--r--src/saveload/town_sl.cpp3
3 files changed, 7 insertions, 4 deletions
diff --git a/src/saveload/company_sl.cpp b/src/saveload/company_sl.cpp
index 6ac22c268..ff02167d3 100644
--- a/src/saveload/company_sl.cpp
+++ b/src/saveload/company_sl.cpp
@@ -16,6 +16,7 @@
#include "../tunnelbridge_map.h"
#include "../tunnelbridge.h"
#include "../station_base.h"
+#include "../strings_func.h"
#include "saveload.h"
@@ -501,11 +502,11 @@ static void Check_PLYR()
/* We do not load old custom names */
if (IsSavegameVersionBefore(84)) {
- if (GB(cprops->name_1, 11, 5) == 15) {
+ if (GetStringTab(cprops->name_1) == 15) {
cprops->name_1 = STR_GAME_SAVELOAD_NOT_AVAILABLE;
}
- if (GB(cprops->president_name_1, 11, 5) == 15) {
+ if (GetStringTab(cprops->president_name_1) == 15) {
cprops->president_name_1 = STR_GAME_SAVELOAD_NOT_AVAILABLE;
}
}
diff --git a/src/saveload/strings_sl.cpp b/src/saveload/strings_sl.cpp
index 73f2a1e2e..c9fb91546 100644
--- a/src/saveload/strings_sl.cpp
+++ b/src/saveload/strings_sl.cpp
@@ -11,6 +11,7 @@
#include "../stdafx.h"
#include "../string_func.h"
+#include "../strings_func.h"
#include "saveload_internal.h"
#include "table/strings.h"
@@ -60,7 +61,7 @@ char *_old_name_array = NULL;
char *CopyFromOldName(StringID id)
{
/* Is this name an (old) custom name? */
- if (GB(id, 11, 5) != 15) return NULL;
+ if (GetStringTab(id) != 15) 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 7db6a7aa6..8a9f879bb 100644
--- a/src/saveload/town_sl.cpp
+++ b/src/saveload/town_sl.cpp
@@ -14,6 +14,7 @@
#include "../town.h"
#include "../landscape.h"
#include "../subsidy_func.h"
+#include "../strings_func.h"
#include "saveload.h"
#include "newgrf_sl.h"
@@ -285,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) && GB(t->townnametype, 11, 5) != 15) {
+ if (t->townnamegrfid == 0 && !IsInsideMM(t->townnametype, SPECSTR_TOWNNAME_START, SPECSTR_TOWNNAME_LAST + 1) && GetStringTab(t->townnametype) != 15) {
SlErrorCorrupt("Invalid town name generator");
}