summaryrefslogtreecommitdiff
path: root/src/newgrf_text.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-11-05 13:34:39 +0000
committerrubidium <rubidium@openttd.org>2010-11-05 13:34:39 +0000
commita6f4769ec7f811fa9d1806028eeb413a7b2310ac (patch)
tree13f5e459b6972c2b6145acb55f59dbd37ab8e054 /src/newgrf_text.cpp
parentf368d0c4492669e302bada17bcb0be20e9342d43 (diff)
downloadopenttd-a6f4769ec7f811fa9d1806028eeb413a7b2310ac.tar.xz
(svn r21085) -Feature-ish: [NewGRF] Implement stringcode 9A 0C (station name)
Diffstat (limited to 'src/newgrf_text.cpp')
-rw-r--r--src/newgrf_text.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/newgrf_text.cpp b/src/newgrf_text.cpp
index b47f1f960..e0b713982 100644
--- a/src/newgrf_text.cpp
+++ b/src/newgrf_text.cpp
@@ -306,6 +306,9 @@ char *TranslateTTDPatchCodes(uint32 grfid, const char *str)
case 0x0B:
d += Utf8Encode(d, SCC_NEWGRF_PRINT_HEX_QWORD);
break;
+ case 0x0C:
+ d += Utf8Encode(d, SCC_NEWGRF_PRINT_WORD_STATION_NAME);
+ break;
default:
grfmsg(1, "missing handler for extended format code");
@@ -717,6 +720,7 @@ uint RemapNewGRFStringControlCode(uint scc, char *buf_start, char **buff, const
case SCC_NEWGRF_PRINT_HEX_WORD:
case SCC_NEWGRF_PRINT_WORD_SPEED:
case SCC_NEWGRF_PRINT_WORD_VOLUME:
+ case SCC_NEWGRF_PRINT_WORD_STATION_NAME:
case SCC_NEWGRF_PRINT_UNSIGNED_WORD: *argv = _newgrf_textrefstack->PopUnsignedWord(); break;
case SCC_NEWGRF_PRINT_DATE:
@@ -767,6 +771,9 @@ uint RemapNewGRFStringControlCode(uint scc, char *buf_start, char **buff, const
case SCC_NEWGRF_PRINT_WORD_VOLUME:
return SCC_VOLUME;
+ case SCC_NEWGRF_PRINT_WORD_STATION_NAME:
+ return SCC_STATION_NAME;
+
case SCC_NEWGRF_DISCARD_WORD:
case SCC_NEWGRF_ROTATE_TOP_4_WORDS:
case SCC_NEWGRF_PUSH_WORD: