diff options
author | peter1138 <peter1138@openttd.org> | 2007-03-22 23:19:40 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-03-22 23:19:40 +0000 |
commit | 99319163455495cea0cd57ceb386a1960b051bfa (patch) | |
tree | 6a5889d1da669a907cf785ed15397ef5c50d00a8 /src/strings.cpp | |
parent | c5cc1ff3823b58373366c71310b34fb2a568c032 (diff) | |
download | openttd-99319163455495cea0cd57ceb386a1960b051bfa.tar.xz |
(svn r9411) -Codechange: Add support for loading of newcargo data.
Diffstat (limited to 'src/strings.cpp')
-rw-r--r-- | src/strings.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/strings.cpp b/src/strings.cpp index 977cdaa40..d7f3ecfd6 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -585,9 +585,15 @@ static char* FormatString(char* buff, const char* str, const int32* argv, uint c } default: - buff = FormatCommaNumber(buff, GetInt32(&argv), last); - buff = strecpy(buff, " ", last); - buff = strecpy(buff, GetStringPtr(cargo_str), last); + if (cargo_str >= 0xE000 && cargo_str < 0xF800) { + /* NewGRF strings from Action 4 use a different format here, + * of e.g. "x tonnes of coal", so process accordingly. */ + buff = GetStringWithArgs(buff, cargo_str, argv++, last); + } else { + buff = FormatCommaNumber(buff, GetInt32(&argv), last); + buff = strecpy(buff, " ", last); + buff = strecpy(buff, GetStringPtr(cargo_str), last); + } break; } } break; |