(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 b264dd2a8d
commit 9ad09627ad
7 changed files with 54 additions and 20 deletions

View File

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