- backend update from GZDoom.

This commit is contained in:
Christoph Oelckers 2021-05-17 20:33:40 +02:00
parent 4d226d19e7
commit eae97ded1b
4 changed files with 21 additions and 13 deletions

View File

@ -513,6 +513,26 @@ size_t FStringTable::ProcessEscapes (char *iptr)
c = '\r';
else if (c == 't')
c = '\t';
else if (c == 'x')
{
c = 0;
for (int i = 0; i < 2; i++)
{
char cc = *iptr++;
if (cc >= '0' && cc <= '9')
c = (c << 4) + cc - '0';
else if (cc >= 'a' && cc <= 'f')
c = (c << 4) + 10 + cc - 'a';
else if (cc >= 'A' && cc <= 'F')
c = (c << 4) + 10 + cc - 'A';
else
{
iptr--;
break;
}
}
if (c == 0) continue;
}
else if (c == '\n')
continue;
}

View File

@ -2170,7 +2170,6 @@ FxExpression *FxPreIncrDecr::Resolve(FCompileContext &ctx)
ExpEmit FxPreIncrDecr::Emit(VMFunctionBuilder *build)
{
assert(Token == TK_Incr || Token == TK_Decr);
assert(ValueType == Base->ValueType && IsNumeric());
int zero = build->GetConstantInt(0);
int regtype = ValueType->GetRegType();
@ -2257,7 +2256,6 @@ FxExpression *FxPostIncrDecr::Resolve(FCompileContext &ctx)
ExpEmit FxPostIncrDecr::Emit(VMFunctionBuilder *build)
{
assert(Token == TK_Incr || Token == TK_Decr);
assert(ValueType == Base->ValueType && IsNumeric());
int zero = build->GetConstantInt(0);
int regtype = ValueType->GetRegType();
@ -5261,7 +5259,6 @@ FxExpression *FxMinMax::Resolve(FCompileContext &ctx)
else
{
ExpVal value = static_cast<FxConstant *>(choices[j])->GetValue();
assert(value.Type == ValueType);
if (Type == NAME_Min)
{
if (value.Type->GetRegType() == REGT_FLOAT)

View File

@ -577,10 +577,6 @@ void DStatusBarCore::DrawGraphic(FGameTexture* tex, double x, double y, int flag
x += orgx;
y += orgy;
}
if (clipwidth != -1)
{
int a = 0;
}
DrawTexture(twod, tex, x, y,
DTA_TopOffset, 0,
DTA_LeftOffset, 0,

View File

@ -331,13 +331,8 @@ FString ExtractFileBase (const char *path, bool include_extension)
}
#endif
if (!include_extension)
if (!include_extension && (dot = strrchr(src, '.')))
{
dot = src;
while (*dot && *dot != '.')
{
dot++;
}
return FString(src, dot - src);
}
else