Changeset - r16473:ab4ba67dd531
[Not reviewed]
master
0 2 0
rubidium - 14 years ago 2010-11-16 12:35:16
rubidium@openttd.org
(svn r21207) -Codechange: replace the magic 0x00DE constant with something less magic
2 files changed with 6 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/newgrf_text.cpp
Show inline comments
 
@@ -21,6 +21,7 @@
 
#include "newgrf.h"
 
#include "strings_func.h"
 
#include "newgrf_storage.h"
 
#include "newgrf_text.h"
 
#include "string_func.h"
 
#include "date_type.h"
 
#include "debug.h"
 
@@ -232,8 +233,7 @@ char *TranslateTTDPatchCodes(uint32 grfi
 
	WChar c;
 
	size_t len = Utf8Decode(&c, str);
 

	
 
	if (c == 0x00DE) {
 
		/* The thorn ('þ') indicates a unicode string to TTDPatch */
 
	if (c == NFO_UTF8_IDENTIFIER) {
 
		unicode = true;
 
		str += len;
 
	}
src/newgrf_text.h
Show inline comments
 
@@ -12,8 +12,12 @@
 
#ifndef NEWGRF_TEXT_H
 
#define NEWGRF_TEXT_H
 

	
 
#include "string_type.h"
 
#include "strings_type.h"
 

	
 
/** This character, the thorn ('þ'), indicates a unicode string to NFO. */
 
static const WChar NFO_UTF8_IDENTIFIER = 0x00DE;
 

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