(svn r27754) -Codechange: Add GetStringTab(), GetStringIndex() and MakeStringID() to access the structure of StringIDs.

This commit is contained in:
frosch
2017-02-26 19:39:58 +00:00
parent d5c6760c85
commit 02967c3c08
7 changed files with 54 additions and 20 deletions

View File

@@ -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;
}
}