Merge branch 'master' of https://github.com/ZDoom/gzdoom into gzdoom-update-4-12-1
This commit is contained in:
commit
112c6cbccf
90 changed files with 1227 additions and 834 deletions
|
|
@ -12564,7 +12564,14 @@ FxExpression *FxLocalVariableDeclaration::Resolve(FCompileContext &ctx)
|
|||
{
|
||||
if (Init->IsStruct())
|
||||
{
|
||||
ValueType = NewPointer(ValueType);
|
||||
bool writable = true;
|
||||
|
||||
if(ctx.Version >= MakeVersion(4, 12, 0))
|
||||
{
|
||||
Init->RequestAddress(ctx, &writable);
|
||||
}
|
||||
|
||||
ValueType = NewPointer(ValueType, !writable);
|
||||
Init = new FxTypeCast(Init, ValueType, false);
|
||||
SAFE_RESOLVE(Init, ctx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -282,9 +282,9 @@ DEFINE_ACTION_FUNCTION(FStringStruct, DeleteLastCharacter)
|
|||
|
||||
static void LocalizeString(const FString &label, bool prefixed, FString *result)
|
||||
{
|
||||
if (!prefixed) *result = GStrings(label);
|
||||
if (!prefixed) *result = GStrings.GetString(label);
|
||||
else if (label[0] != '$') *result = label;
|
||||
else *result = GStrings(&label[1]);
|
||||
else *result = GStrings.GetString(&label[1]);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(FStringTable, Localize, LocalizeString)
|
||||
|
|
|
|||
|
|
@ -670,7 +670,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(FFont, GetBottomAlignOffset, GetBottomAlignOffset)
|
|||
|
||||
static int StringWidth(FFont *font, const FString &str, int localize)
|
||||
{
|
||||
const char *txt = (localize && str[0] == '$') ? GStrings(&str[1]) : str.GetChars();
|
||||
const char *txt = (localize && str[0] == '$') ? GStrings.GetString(&str[1]) : str.GetChars();
|
||||
return font->StringWidth(txt);
|
||||
}
|
||||
|
||||
|
|
@ -684,7 +684,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(FFont, StringWidth, StringWidth)
|
|||
|
||||
static int GetMaxAscender(FFont* font, const FString& str, int localize)
|
||||
{
|
||||
const char* txt = (localize && str[0] == '$') ? GStrings(&str[1]) : str.GetChars();
|
||||
const char* txt = (localize && str[0] == '$') ? GStrings.GetString(&str[1]) : str.GetChars();
|
||||
return font->GetMaxAscender(txt);
|
||||
}
|
||||
|
||||
|
|
@ -698,7 +698,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(FFont, GetMaxAscender, GetMaxAscender)
|
|||
|
||||
static int CanPrint(FFont *font, const FString &str, int localize)
|
||||
{
|
||||
const char *txt = (localize && str[0] == '$') ? GStrings(&str[1]) : str.GetChars();
|
||||
const char *txt = (localize && str[0] == '$') ? GStrings.GetString(&str[1]) : str.GetChars();
|
||||
return font->CanPrint(txt);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue