--- a/src/newgrf_text.cpp Wed Jan 09 18:11:12 2008 +0000
+++ b/src/newgrf_text.cpp Sun Feb 03 20:17:54 2008 +0000
@@ -13,15 +13,16 @@
#include "debug.h"
#include "openttd.h"
#include "variables.h"
-#include "table/strings.h"
#include "newgrf.h"
#include "newgrf_text.h"
-#include "table/control_codes.h"
#include "strings_func.h"
#include "core/alloc_func.hpp"
#include "newgrf_storage.h"
#include "string_func.h"
+#include "table/strings.h"
+#include "table/control_codes.h"
+
#define GRFTAB 28
#define TABSIZE 11
@@ -292,6 +293,9 @@
case 0xB6: d += Utf8Encode(d, SCC_BUS); break;
case 0xB7: d += Utf8Encode(d, SCC_PLANE); break;
case 0xB8: d += Utf8Encode(d, SCC_SHIP); break;
+ case 0xB9: d += Utf8Encode(d, SCC_SUPERSCRIPT_M1); break;
+ case 0xBC: d += Utf8Encode(d, SCC_SMALLUPARROW); break;
+ case 0xBD: d += Utf8Encode(d, SCC_SMALLDOWNARROW); break;
default:
/* Validate any unhandled character */
if (!IsValidChar(c, CS_ALPHANUMERAL)) c = '?';
@@ -401,7 +405,7 @@
}
-char *GetGRFString(char *buff, uint16 stringid, const char* last)
+const char *GetGRFStringPtr(uint16 stringid)
{
const GRFText *default_text = NULL;
const GRFText *search_text;
@@ -414,7 +418,7 @@
/*Search the list of lang-strings of this stringid for current lang */
for (search_text = _grf_text[stringid].textholder; search_text != NULL; search_text = search_text->next) {
if (search_text->langid == _currentLangID) {
- return strecpy(buff, search_text->text, last);
+ return search_text->text;
}
/* If the current string is English or American, set it as the
@@ -425,10 +429,10 @@
}
/* If there is a fallback string, return that */
- if (default_text != NULL) return strecpy(buff, default_text->text, last);
+ if (default_text != NULL) return default_text->text;
/* Use the default string ID if the fallback string isn't available */
- return GetString(buff, _grf_text[stringid].def_string, last);
+ return GetStringPtr(_grf_text[stringid].def_string);
}
/**