Merge branch 'enhanced_viewport_overlay-sx' into jgrpp
This commit is contained in:
@@ -49,9 +49,9 @@ const LanguageMetadata *_current_language = NULL; ///< The currently loaded lang
|
||||
|
||||
TextDirection _current_text_dir; ///< Text direction of the currently selected language.
|
||||
|
||||
#ifdef WITH_ICU
|
||||
#ifdef WITH_ICU_SORT
|
||||
Collator *_current_collator = NULL; ///< Collator for the language currently in use.
|
||||
#endif /* WITH_ICU */
|
||||
#endif /* WITH_ICU_SORT */
|
||||
|
||||
static uint64 _global_string_params_data[20]; ///< Global array of string parameters. To access, use #SetDParam.
|
||||
static WChar _global_string_params_type[20]; ///< Type of parameters stored in #_decode_parameters
|
||||
@@ -1334,7 +1334,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
|
||||
if (c == NULL) break;
|
||||
|
||||
if (c->name != NULL) {
|
||||
int64 args_array[] = {(uint64)(size_t)c->name};
|
||||
int64 args_array[] = {(int64)(size_t)c->name};
|
||||
StringParameters tmp_params(args_array);
|
||||
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
|
||||
} else {
|
||||
@@ -1360,7 +1360,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
|
||||
case SCC_DEPOT_NAME: { // {DEPOT}
|
||||
VehicleType vt = (VehicleType)args->GetInt32(SCC_DEPOT_NAME);
|
||||
if (vt == VEH_AIRCRAFT) {
|
||||
uint64 args_array[] = {args->GetInt32()};
|
||||
uint64 args_array[] = {(uint64)args->GetInt32()};
|
||||
WChar types_array[] = {SCC_STATION_NAME};
|
||||
StringParameters tmp_params(args_array, 1, types_array);
|
||||
buff = GetStringWithArgs(buff, STR_FORMAT_DEPOT_NAME_AIRCRAFT, &tmp_params, last);
|
||||
@@ -1369,7 +1369,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
|
||||
|
||||
const Depot *d = Depot::Get(args->GetInt32());
|
||||
if (d->name != NULL) {
|
||||
int64 args_array[] = {(uint64)(size_t)d->name};
|
||||
int64 args_array[] = {(int64)(size_t)d->name};
|
||||
StringParameters tmp_params(args_array);
|
||||
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
|
||||
} else {
|
||||
@@ -1385,7 +1385,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
|
||||
if (e == NULL) break;
|
||||
|
||||
if (e->name != NULL && e->IsEnabled()) {
|
||||
int64 args_array[] = {(uint64)(size_t)e->name};
|
||||
int64 args_array[] = {(int64)(size_t)e->name};
|
||||
StringParameters tmp_params(args_array);
|
||||
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
|
||||
} else {
|
||||
@@ -1400,7 +1400,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
|
||||
if (g == NULL) break;
|
||||
|
||||
if (g->name != NULL) {
|
||||
int64 args_array[] = {(uint64)(size_t)g->name};
|
||||
int64 args_array[] = {(int64)(size_t)g->name};
|
||||
StringParameters tmp_params(args_array);
|
||||
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
|
||||
} else {
|
||||
@@ -1437,7 +1437,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
|
||||
if (c == NULL) break;
|
||||
|
||||
if (c->president_name != NULL) {
|
||||
int64 args_array[] = {(uint64)(size_t)c->president_name};
|
||||
int64 args_array[] = {(int64)(size_t)c->president_name};
|
||||
StringParameters tmp_params(args_array);
|
||||
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
|
||||
} else {
|
||||
@@ -1462,7 +1462,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
|
||||
}
|
||||
|
||||
if (st->name != NULL) {
|
||||
int64 args_array[] = {(uint64)(size_t)st->name};
|
||||
int64 args_array[] = {(int64)(size_t)st->name};
|
||||
StringParameters tmp_params(args_array);
|
||||
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
|
||||
} else {
|
||||
@@ -1491,7 +1491,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
|
||||
if (t == NULL) break;
|
||||
|
||||
if (t->name != NULL) {
|
||||
int64 args_array[] = {(uint64)(size_t)t->name};
|
||||
int64 args_array[] = {(int64)(size_t)t->name};
|
||||
StringParameters tmp_params(args_array);
|
||||
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
|
||||
} else {
|
||||
@@ -1505,7 +1505,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
|
||||
if (wp == NULL) break;
|
||||
|
||||
if (wp->name != NULL) {
|
||||
int64 args_array[] = {(uint64)(size_t)wp->name};
|
||||
int64 args_array[] = {(int64)(size_t)wp->name};
|
||||
StringParameters tmp_params(args_array);
|
||||
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
|
||||
} else {
|
||||
@@ -1523,7 +1523,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
|
||||
if (v == NULL) break;
|
||||
|
||||
if (v->name != NULL) {
|
||||
int64 args_array[] = {(uint64)(size_t)v->name};
|
||||
int64 args_array[] = {(int64)(size_t)v->name};
|
||||
StringParameters tmp_params(args_array);
|
||||
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
|
||||
} else {
|
||||
@@ -1549,7 +1549,7 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
|
||||
if (si == NULL) break;
|
||||
|
||||
if (si->name != NULL) {
|
||||
int64 args_array[] = {(uint64)(size_t)si->name};
|
||||
int64 args_array[] = {(int64)(size_t)si->name};
|
||||
StringParameters tmp_params(args_array);
|
||||
buff = GetStringWithArgs(buff, STR_JUST_RAW_STRING, &tmp_params, last);
|
||||
} else {
|
||||
@@ -1849,7 +1849,7 @@ bool ReadLanguagePack(const LanguageMetadata *lang)
|
||||
strecpy(_config_language_file, c_file, lastof(_config_language_file));
|
||||
SetCurrentGrfLangID(_current_language->newgrflangid);
|
||||
|
||||
#ifdef WITH_ICU
|
||||
#ifdef WITH_ICU_SORT
|
||||
/* Delete previous collator. */
|
||||
if (_current_collator != NULL) {
|
||||
delete _current_collator;
|
||||
@@ -1866,7 +1866,7 @@ bool ReadLanguagePack(const LanguageMetadata *lang)
|
||||
delete _current_collator;
|
||||
_current_collator = NULL;
|
||||
}
|
||||
#endif /* WITH_ICU */
|
||||
#endif /* WITH_ICU_SORT */
|
||||
|
||||
/* Some lists need to be sorted again after a language change. */
|
||||
ReconsiderGameScriptLanguage();
|
||||
@@ -2191,7 +2191,7 @@ void CheckForMissingGlyphs(bool base_font, MissingGlyphSearcher *searcher)
|
||||
/* Update the font with cache */
|
||||
LoadStringWidthTable(searcher->Monospace());
|
||||
|
||||
#if !defined(WITH_ICU)
|
||||
#if !defined(WITH_ICU_LAYOUT)
|
||||
/*
|
||||
* For right-to-left languages we need the ICU library. If
|
||||
* we do not have support for that library we warn the user
|
||||
@@ -2211,5 +2211,5 @@ void CheckForMissingGlyphs(bool base_font, MissingGlyphSearcher *searcher)
|
||||
SetDParamStr(0, err_str);
|
||||
ShowErrorMessage(STR_JUST_RAW_STRING, INVALID_STRING_ID, WL_ERROR);
|
||||
}
|
||||
#endif
|
||||
#endif /* !WITH_ICU_LAYOUT */
|
||||
}
|
||||
|
Reference in New Issue
Block a user