|
@@ -37,14 +37,15 @@
|
|
|
#include "smallmap_gui.h"
|
|
|
#include "debug.h"
|
|
|
|
|
|
#include "table/strings.h"
|
|
|
#include "table/control_codes.h"
|
|
|
|
|
|
DynamicLanguages _dynlang; ///< Language information of the program.
|
|
|
uint64 _decode_parameters[20]; ///< Global array of string parameters. To access, use #SetDParam.
|
|
|
DynamicLanguages _dynlang; ///< Language information of the program.
|
|
|
TextDirection _current_text_dir; ///< Text direction of the currently selected language
|
|
|
uint64 _decode_parameters[20]; ///< Global array of string parameters. To access, use #SetDParam.
|
|
|
|
|
|
static char *StationGetSpecialString(char *buff, int x, const char *last);
|
|
|
static char *GetSpecialTownNameString(char *buff, int ind, uint32 seed, const char *last);
|
|
|
static char *GetSpecialNameString(char *buff, int ind, int64 *argv, const char *last);
|
|
|
|
|
|
static char *FormatString(char *buff, const char *str, int64 *argv, uint casei, const char *last);
|
|
@@ -1382,13 +1383,13 @@ bool ReadLanguagePack(int lang_index)
|
|
|
_langpack_offs = langpack_offs;
|
|
|
|
|
|
const char *c_file = strrchr(_dynlang.ent[lang_index].file, PATHSEPCHAR) + 1;
|
|
|
strecpy(_dynlang.curr_file, c_file, lastof(_dynlang.curr_file));
|
|
|
|
|
|
_dynlang.curr = lang_index;
|
|
|
_dynlang.text_dir = (TextDirection)lang_pack->text_dir;
|
|
|
_current_text_dir = (TextDirection)lang_pack->text_dir;
|
|
|
SetCurrentGrfLangID(_langpack->newgrflangid);
|
|
|
InitializeSortedCargoSpecs();
|
|
|
SortIndustryTypes();
|
|
|
BuildIndustriesLegend();
|
|
|
SortNetworkLanguages();
|
|
|
return true;
|
|
@@ -1698,13 +1699,13 @@ void CheckForMissingGlyphsInLoadedLangua
|
|
|
* otherwise we end up with a lot of artefacts. The colour
|
|
|
* 'character' might change in the future, so for safety
|
|
|
* we just Utf8 Encode it into the string, which takes
|
|
|
* exactly three characters, so it replaces the "XXX" with
|
|
|
* the colour marker.
|
|
|
*/
|
|
|
if (_dynlang.text_dir != TD_LTR) {
|
|
|
if (_current_text_dir != TD_LTR) {
|
|
|
static char *err_str = strdup("XXXThis version of OpenTTD does not support right-to-left languages. Recompile with icu enabled.");
|
|
|
Utf8Encode(err_str, SCC_YELLOW);
|
|
|
SetDParamStr(0, err_str);
|
|
|
ShowErrorMessage(STR_JUST_RAW_STRING, INVALID_STRING_ID, WL_ERROR);
|
|
|
}
|
|
|
#endif
|