- all menu items scriptified, but not yet active.

This commit is contained in:
Christoph Oelckers 2017-02-11 16:11:48 +01:00
commit 947b625c50
27 changed files with 1469 additions and 164 deletions

View file

@ -2456,7 +2456,7 @@ FxExpression *FxAssign::Resolve(FCompileContext &ctx)
ExpEmit FxAssign::Emit(VMFunctionBuilder *build)
{
static const BYTE loadops[] = { OP_LK, OP_LKF, OP_LKS, OP_LKP };
assert(ValueType->GetRegType() == Right->ValueType->GetRegType());
assert(Base->ValueType->GetRegType() == Right->ValueType->GetRegType());
ExpEmit pointer = Base->Emit(build);
Address = pointer;
@ -2974,6 +2974,12 @@ FxExpression *FxMulDiv::Resolve(FCompileContext& ctx)
delete this;
return nullptr;
}
if (!left->ValueType || !right->ValueType)
{
ScriptPosition.Message(MSG_ERROR, "ValueType not set");
delete this;
return nullptr;
}
if (left->IsVector() || right->IsVector())
{
@ -3552,6 +3558,16 @@ FxExpression *FxCompareEq::Resolve(FCompileContext& ctx)
goto error;
}
}
else if (left->IsPointer() && static_cast<PPointer*>(left->ValueType)->PointedType == right->ValueType)
{
bool writable;
if (!right->RequestAddress(ctx, &writable)) goto error;
}
else if (right->IsPointer() && static_cast<PPointer*>(right->ValueType)->PointedType == left->ValueType)
{
bool writable;
if (!left->RequestAddress(ctx, &writable)) goto error;
}
else
{
goto error;