Changeset - r18057:b38ed67c47dd
[Not reviewed]
master
0 1 0
frosch - 13 years ago 2011-09-03 16:10:42
frosch@openttd.org
(svn r22882) -Fix [FS#4758]: [NewGRF] DCxx text references via the textstack are not allowed, but caused crash.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/newgrf_text.cpp
Show inline comments
 
@@ -54,13 +54,13 @@ StringID TTDPStringIDToOTTDStringIDMappi
 
		STR_TONS,       STR_LITERS,     STR_TONS,       STR_ITEMS,
 
		STR_BAGS,       STR_LITERS,     STR_TONS,       STR_ITEMS,
 
		STR_TONS,       STR_ITEMS,      STR_LITERS,     STR_ITEMS
 
	};
 

	
 
	/* A string straight from a NewGRF; no need to remap this as it's already mapped. */
 
	if (IsInsideMM(str, 0xD000, 0xD7FF) || IsInsideMM(str, 0xDC00, 0xDCFF)) return str;
 
	if (IsInsideMM(str, 0xD000, 0xD7FF)) return str;
 

	
 
#define TEXTID_TO_STRINGID(begin, end, stringid) if (str >= begin && str <= end) return str + (stringid - begin)
 
	/* We have some changes in our cargo strings, resulting in some missing. */
 
	TEXTID_TO_STRINGID(0x000E, 0x002D, STR_CARGO_PLURAL_NOTHING);
 
	TEXTID_TO_STRINGID(0x002E, 0x004D, STR_CARGO_SINGULAR_NOTHING);
 
	if (str >= 0x004E && str <= 0x006D) return units_volume[str - 0x004E];
0 comments (0 inline, 0 general)