Statement MatrixOperations()
{
_opCode = ReadByte();
switch (_opCode & 0x1F)
{
case 1:
var a = GetVarOrDirectByte(OpCodeParameter.Param1);
var b = GetVarOrDirectByte(OpCodeParameter.Param2);
return new MethodInvocation("SetBoxFlags").AddArguments(a, b).ToStatement();
case 2:
a = GetVarOrDirectByte(OpCodeParameter.Param1);
b = GetVarOrDirectByte(OpCodeParameter.Param2);
return new MethodInvocation("SetBoxScale").AddArguments(a, b).ToStatement();
case 3:
a = GetVarOrDirectByte(OpCodeParameter.Param1);
b = GetVarOrDirectByte(OpCodeParameter.Param2);
return new MethodInvocation("SetBoxScaleSlot").AddArguments(a, b).ToStatement();
case 4:
return new MethodInvocation("CreateBoxMatrix").ToStatement();
default:
throw new NotImplementedException(string.Format("MatrixOperations subopcode {0} not implemented", _opCode & 0x1F));
}
}
}