private void DryRunCompileCommand(Command c, List<byte> theScript, bool compile, out bool newCompile)
{
newCompile = compile;
if (c.HexID < 0x100)
{
theScript.Add(Convert.ToByte(c.HexID));
}
else
{
theScript.Add(Byte.Parse(c.HexID.ToString().Substring(0, 2)));
theScript.Add(Byte.Parse(c.HexID.ToString().Substring(2, 2)));
}
for (int i = 0; i < c.NumberOfParameters; i++)
{
if (c.HexID == 0x89 && i == 0)
{
theScript.Add(0);
i++;
}
else if (c.HexID == 0x28)
{
newCompile = false;
for (int j = 0; j < 4; j++)
{
theScript.Add(0);
}
}
else if (c.HexID == 0x3C || c.HexID == 0x3D || c.HexID == 0x3E || c.HexID == 0x3F)
{
newCompile = false;
}
else
{
switch (c.ParameterLengths[i])
{
case 2:
{
for (int j = 0; j < 2; j++)
{
theScript.Add(0);
}
break;
}
case 4:
{
for (int j = 0; j < 4; j++)
{
theScript.Add(0);
}
break;
}
default:
{
theScript.Add(0);
break;
}
}
}
}
}