1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 09:29:10 +00:00

(svn r11145) -Codechange: add support for "decoding" TTDPs string codes wrt to registers 0x100 to 0x10F.

This commit is contained in:
rubidium
2007-09-22 23:55:34 +00:00
parent aa020847af
commit 240285b8d8
7 changed files with 201 additions and 12 deletions

View File

@@ -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) {