mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-31 09:20:59 +00:00
- partial backend update from GZDoom.
This commit is contained in:
parent
486da6922d
commit
3ec8a96ddf
10 changed files with 58 additions and 12 deletions
|
@ -1850,7 +1850,7 @@ FxExpression *FxMinusSign::Resolve(FCompileContext& ctx)
|
|||
|
||||
ExpEmit FxMinusSign::Emit(VMFunctionBuilder *build)
|
||||
{
|
||||
assert(ValueType == Operand->ValueType);
|
||||
//assert(ValueType == Operand->ValueType);
|
||||
ExpEmit from = Operand->Emit(build);
|
||||
ExpEmit to;
|
||||
assert(from.Konst == 0);
|
||||
|
@ -2777,7 +2777,7 @@ FxExpression *FxAddSub::Resolve(FCompileContext& ctx)
|
|||
else if (left->IsVector() && right->IsVector())
|
||||
{
|
||||
// a vector2 can be added to or subtracted from a vector 3 but it needs to be the right operand.
|
||||
if (left->ValueType == right->ValueType || (left->IsVector3() && right->IsVector2()))
|
||||
if (((left->IsVector3() || left->IsVector2()) && right->IsVector2()) || (left->IsVector3() && right->IsVector3()))
|
||||
{
|
||||
ValueType = left->ValueType;
|
||||
}
|
||||
|
@ -3522,7 +3522,8 @@ FxExpression *FxCompareEq::Resolve(FCompileContext& ctx)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
if (left->ValueType != right->ValueType) // identical types are always comparable, if they can be placed in a register, so we can save most checks if this is the case.
|
||||
// identical types are always comparable, if they can be placed in a register, so we can save most checks if this is the case.
|
||||
if (left->ValueType != right->ValueType && !(left->IsVector2() && right->IsVector2()) && !(left->IsVector3() && right->IsVector3()))
|
||||
{
|
||||
FxExpression *x;
|
||||
if (left->IsNumeric() && right->ValueType == TypeString && (x = StringConstToChar(right)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue