Changeset - r22638:25031cce3180
[Not reviewed]
master
0 2 0
peter1138 - 7 years ago 2017-04-09 21:58:07
peter1138@openttd.org
(svn r27851) -Fix [FS#6555]: StringID truncation to 16 bits broke string remapping test.
2 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/newgrf_text.cpp
Show inline comments
 
@@ -691,7 +691,7 @@ StringID AddGRFString(uint32 grfid, uint
 
	}
 
	AddGRFTextToList(&_grf_text[id].textholder, newtext);
 

	
 
	grfmsg(3, "Added 0x%X: grfid %08X string 0x%X lang 0x%X string '%s'", id, grfid, stringid, newtext->langid, newtext->text);
 
	grfmsg(3, "Added 0x%X: grfid %08X string 0x%X lang 0x%X string '%s' (%X)", id, grfid, stringid, newtext->langid, newtext->text, MakeStringID(TEXT_TAB_NEWGRF_START, id));
 

	
 
	return MakeStringID(TEXT_TAB_NEWGRF_START, id);
 
}
 
@@ -699,7 +699,7 @@ StringID AddGRFString(uint32 grfid, uint
 
/**
 
 * Returns the index for this stringid associated with its grfID
 
 */
 
StringID GetGRFStringID(uint32 grfid, uint16 stringid)
 
StringID GetGRFStringID(uint32 grfid, StringID stringid)
 
{
 
	for (uint id = 0; id < _num_grf_texts; id++) {
 
		if (_grf_text[id].grfid == grfid && _grf_text[id].stringid == stringid) {
src/newgrf_text.h
Show inline comments
 
@@ -21,7 +21,7 @@
 
static const WChar NFO_UTF8_IDENTIFIER = 0x00DE;
 

	
 
StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, bool new_scheme, bool allow_newlines, const char *text_to_add, StringID def_string);
 
StringID GetGRFStringID(uint32 grfid, uint16 stringid);
 
StringID GetGRFStringID(uint32 grfid, StringID stringid);
 
const char *GetGRFStringFromGRFText(const struct GRFText *text);
 
const char *GetGRFStringPtr(uint16 stringid);
 
void CleanUpStrings();
0 comments (0 inline, 0 general)