summaryrefslogtreecommitdiff
path: root/src/strings.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-09-22 23:55:34 +0000
committerrubidium <rubidium@openttd.org>2007-09-22 23:55:34 +0000
commit240285b8d85be6ef852639073e5e2625e61b71b0 (patch)
tree5340ffd36488542b738acc4e6c6c80a223189d8a /src/strings.cpp
parentaa020847af7b31bbbcb665b3ef9463c26b6bc339 (diff)
downloadopenttd-240285b8d85be6ef852639073e5e2625e61b71b0.tar.xz
(svn r11145) -Codechange: add support for "decoding" TTDPs string codes wrt to registers 0x100 to 0x10F.
Diffstat (limited to 'src/strings.cpp')
-rw-r--r--src/strings.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/strings.cpp b/src/strings.cpp
index 6916d2aaa..a82bdd15a 100644
--- a/src/strings.cpp
+++ b/src/strings.cpp
@@ -531,6 +531,12 @@ static char* FormatString(char* buff, const char* str, const int64* argv, uint c
uint modifier = 0;
while ((b = Utf8Consume(&str)) != '\0') {
+ if (SCC_NEWGRF_FIRST <= b && b <= SCC_NEWGRF_LAST) {
+ /* We need to pass some stuff as it might be modified; oh boy. */
+ b = RemapNewGRFStringControlCode(b, &buff, &str, (int64*)argv);
+ if (b == 0) continue;
+ }
+
switch (b) {
case SCC_SETX: // {SETX}
if (buff + Utf8CharLen(SCC_SETX) + 1 < last) {