rename expression operators

This commit is contained in:
Nahuel Rocchetti 2023-08-21 20:17:03 -03:00
parent 8df3087498
commit a4d4dacf5c
2 changed files with 6 additions and 6 deletions

View file

@ -21,13 +21,13 @@ namespace OpenTS2.SimAntics.Primitives
IsFlagSet,
SetFlag,
ClearFlag,
AddThenLessThan,
IncThenLessThan,
Modulo,
And,
GreaterThanOrEqualTo,
LessThanOrEqualTo,
NotEqualTo,
SubtractThenGreaterThan,
DecThenGreaterThan,
Or,
Xor,
Abs,
@ -98,7 +98,7 @@ namespace OpenTS2.SimAntics.Primitives
var finalClear = (int)lhs & clearBitVal;
ctx.SetData(lhsSource, lhsData, (short)(finalClear));
return VMReturnValue.ReturnTrue;
case Operator.AddThenLessThan:
case Operator.IncThenLessThan:
lhs = ctx.GetData(lhsSource, lhsData);
rhs = ctx.GetData(rhsSource, rhsData);
var lhsAdded = lhs + 1;
@ -126,7 +126,7 @@ namespace OpenTS2.SimAntics.Primitives
case Operator.NotEqualTo:
return ctx.GetData(lhsSource, lhsData) != ctx.GetData(rhsSource, rhsData) ?
VMReturnValue.ReturnTrue : VMReturnValue.ReturnFalse;
case Operator.SubtractThenGreaterThan:
case Operator.DecThenGreaterThan:
lhs = ctx.GetData(lhsSource, lhsData);
rhs = ctx.GetData(rhsSource, rhsData);
var lhsSubbed = lhs - 1;

View file

@ -53,7 +53,7 @@ namespace OpenTS2.SimAntics
case BHAVAsset.Node.TrueReturnValue:
return VMReturnValue.ReturnTrue;
case BHAVAsset.Node.ErrorReturnValue:
throw new Exception("SimAntics error goto.");
throw new Exception("Jumped to Error.");
default:
SetCurrentNode(returnTarget);
return RunCurrentFrame();
@ -99,7 +99,7 @@ namespace OpenTS2.SimAntics
case BHAVAsset.Node.TrueReturnValue:
return VMReturnValue.ReturnTrue;
case BHAVAsset.Node.ErrorReturnValue:
throw new Exception("SimAntics error goto.");
throw new Exception("Jumped to Error.");
default:
SetCurrentNode(returnTarget);
return RunCurrentFrame();