diff --git a/src/strings.cpp b/src/strings.cpp index 196cf15458..58dcc92520 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -57,6 +57,8 @@ static uint64 _global_string_params_data[20]; ///< Global array of string pa static WChar _global_string_params_type[20]; ///< Type of parameters stored in #_global_string_params StringParameters _global_string_params(_global_string_params_data, 20, _global_string_params_type); +std::string _temp_special_strings[16]; + /** Reset the type array. */ void StringParameters::ClearTypeInformation() { @@ -240,6 +242,9 @@ char *GetStringWithArgs(char *buffr, StringID string, StringParameters *args, co if (index >= 0xE4 && !game_script) { return GetSpecialNameString(buffr, index - 0xE4, args, last); } + if (index < lengthof(_temp_special_strings) && !game_script) { + return FormatString(buffr, _temp_special_strings[index].c_str(), args, last, case_index); + } break; case TEXT_TAB_OLD_CUSTOM: diff --git a/src/strings_type.h b/src/strings_type.h index 7ad0c71265..b7b350e35b 100644 --- a/src/strings_type.h +++ b/src/strings_type.h @@ -51,6 +51,8 @@ static const uint TAB_SIZE_GAMESCRIPT = TAB_SIZE * 32; /** Number of strings for NewGRFs */ static const uint TAB_SIZE_NEWGRF = TAB_SIZE * 256; +extern std::string _temp_special_strings[16]; + /** Special string constants */ enum SpecialStrings { @@ -86,6 +88,8 @@ enum SpecialStrings { SPECSTR_SILLY_NAME = 0x70E5, SPECSTR_ANDCO_NAME = 0x70E6, SPECSTR_PRESIDENT_NAME = 0x70E7, + + SPECSTR_TEMP_START = 0x7000, }; #endif /* STRINGS_TYPE_H */