Merge branch 'master' into jgrpp
# Conflicts: # os/macosx/notarize.sh # src/3rdparty/CMakeLists.txt # src/3rdparty/squirrel/squirrel/sqcompiler.cpp # src/3rdparty/squirrel/squirrel/sqdebug.cpp # src/3rdparty/squirrel/squirrel/sqvm.cpp # src/console_cmds.cpp # src/core/span_type.hpp # src/crashlog.cpp # src/currency.h # src/date_gui.cpp # src/driver.cpp # src/fios.cpp # src/genworld_gui.cpp # src/hotkeys.cpp # src/misc_gui.cpp # src/music/os2_m.cpp # src/network/core/os_abstraction.h # src/network/network_server.cpp # src/newgrf.cpp # src/newgrf_config.h # src/newgrf_text.cpp # src/openttd.cpp # src/os/macosx/font_osx.cpp # src/os/macosx/misc_osx.cpp # src/os/os2/CMakeLists.txt # src/os/os2/os2.cpp # src/os/unix/CMakeLists.txt # src/os/windows/font_win32.cpp # src/os/windows/win32_main.cpp # src/saveload/saveload.cpp # src/script/api/script_text.cpp # src/settings.cpp # src/settings_gui.cpp # src/stdafx.h # src/strings.cpp # src/timetable_gui.cpp # src/town_gui.cpp # src/train_cmd.cpp # src/video/dedicated_v.cpp # src/video/video_driver.cpp # src/video/win32_v.cpp # src/viewport.cpp # src/waypoint_gui.cpp # src/widgets/dropdown_type.h # src/window.cpp # src/window_gui.h
This commit is contained in:
@@ -1305,21 +1305,15 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
|
||||
break;
|
||||
}
|
||||
|
||||
case SCC_SET_COLOUR: {// {SET_COLOUR}
|
||||
int64 tc = args->GetInt64(SCC_SET_COLOUR);
|
||||
if (tc >= 0 && tc < TC_END) {
|
||||
buff += Utf8Encode(buff, SCC_BLUE + tc);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case SCC_REVISION: // {REV}
|
||||
buff = strecpy(buff, _openttd_revision, last);
|
||||
break;
|
||||
|
||||
case SCC_RAW_STRING_POINTER: { // {RAW_STRING}
|
||||
const char *raw_string = (const char *)(size_t)args->GetInt64(SCC_RAW_STRING_POINTER);
|
||||
if (game_script && std::find(_game_script_raw_strings.begin(), _game_script_raw_strings.end(), raw_string) == _game_script_raw_strings.end()) {
|
||||
/* raw_string can be(come) nullptr when the parameter is out of range and 0 is returned instead. */
|
||||
if (raw_string == nullptr ||
|
||||
(game_script && std::find(_game_script_raw_strings.begin(), _game_script_raw_strings.end(), raw_string) == _game_script_raw_strings.end())) {
|
||||
buff = strecat(buff, "(invalid RAW_STRING parameter)", last);
|
||||
break;
|
||||
}
|
||||
@@ -2047,6 +2041,14 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
|
||||
break;
|
||||
}
|
||||
|
||||
case SCC_COLOUR: {// {COLOUR}
|
||||
int64 tc = args->GetInt64(SCC_COLOUR);
|
||||
if (tc >= 0 && tc < TC_END) {
|
||||
buff += Utf8Encode(buff, SCC_BLUE + tc);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case SCC_CONSUME_ARG:
|
||||
// do nothing
|
||||
break;
|
||||
@@ -2315,7 +2317,7 @@ bool ReadLanguagePack(const LanguageMetadata *lang)
|
||||
SetCurrentGrfLangID(_current_language->newgrflangid);
|
||||
|
||||
#ifdef _WIN32
|
||||
extern void Win32SetCurrentLocaleName(const char *iso_code);
|
||||
extern void Win32SetCurrentLocaleName(std::string iso_code);
|
||||
Win32SetCurrentLocaleName(_current_language->isocode);
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user