forked from mirror/OpenTTD
(svn r4493) Newgrf : Action 04. Beginning of implementation.
Some TODOs left, but the core is there. Thanks to Peter1138 for code, advice and patience And to Patchman for letting us define a lot of langids :)
This commit is contained in:
11
strings.c
11
strings.c
@@ -16,6 +16,7 @@
|
||||
#include "waypoint.h"
|
||||
#include "industry.h"
|
||||
#include "variables.h"
|
||||
#include "newgrf_text.h"
|
||||
|
||||
char _userstring[128];
|
||||
|
||||
@@ -178,6 +179,15 @@ char *GetStringWithArgs(char *buffr, uint string, const int32 *argv)
|
||||
case 15:
|
||||
return GetName(index, buffr);
|
||||
|
||||
case 28:
|
||||
return GetGRFString(buffr, index);
|
||||
|
||||
case 29:
|
||||
return GetGRFString(buffr, index + 0x800);
|
||||
|
||||
case 30:
|
||||
return GetGRFString(buffr, index + 0x1000);
|
||||
|
||||
case 31:
|
||||
// dynamic strings. These are NOT to be passed through the formatter,
|
||||
// but passed through verbatim.
|
||||
@@ -1153,6 +1163,7 @@ bool ReadLanguagePack(int lang_index)
|
||||
ttd_strlcpy(_dynlang.curr_file, _dynlang.ent[lang_index].file, sizeof(_dynlang.curr_file));
|
||||
|
||||
_dynlang.curr = lang_index;
|
||||
SetCurrentGrfLangID(_langpack->isocode);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user