private static string TranslateMove(MoveCommand cmd)
{
switch (cmd.code)
{
case 1: return "Move Down";
case 2: return "Move Left";
case 3: return "Move Right";
case 4: return "Move Up";
case 5: return "Move Lower Left";
case 6: return "Move Lower Right";
case 7: return "Move Upper Left";
case 8: return "Move Upper Right";
case 9: return "Move at Random";
case 10: return "Move toward Player";
case 11: return "Move away from Player";
case 12: return "1 Step Forward";
case 13: return "1 Step Backward";
case 14:
int x = cmd.parameters[0];
int y = cmd.parameters[1];
string oper1 = x >= 0 ? "+" : "";
string oper2 = y >= 0 ? "+" : "";
return String.Format("Jump: {0}{1}, {2}{3}", oper1, x, oper2, y);
case 15: return String.Format("Wait: {0} frame(s)", cmd.parameters[0]);
case 16: return "Turn Down";
case 17: return "Turn Left";
case 18: return "Turn Right";
case 19: return "Turn Up";
case 20: return "Turn 90° Right";
case 21: return "Turn 90° Left";
case 22: return "Turn 180°";
case 23: return "Turn 90° Right or Left";
case 24: return "Turn at Random";
case 25: return "Turn toward Player";
case 26: return "Turn away from Player";
case 27: return String.Format("Switch ON: [{0}]", Project.Switches[cmd.parameters[0]]);
case 28: return String.Format("Switch OFF: [{0}]", Project.Switches[cmd.parameters[0]]);
case 29: return String.Format("Change Speed: {0}", cmd.parameters[0]);
case 30: return String.Format("Change Frequency: {0}", cmd.parameters[0]);
case 31: return "Move Animation ON";
case 32: return "Move Animation OFF";
case 33: return "Stop Animation ON";
case 34: return "Stop Animation OFF";
case 35: return "Direction Fix ON";
case 36: return "Direction Fix OFF";
case 37: return "Through ON";
case 38: return "Through OFF";
case 39: return "Always on Top ON";
case 40: return "Always on Top OFF";
case 41:
var p = cmd.parameters;
return String.Format("Graphic: '{0}', {1}, {2}, {3}", p[0], p[1], p[2], p[3]);
case 42: return String.Format("Change Opacity: {0}", cmd.parameters[0]);
case 43: return String.Format("Change Blending: {0}", new[] { "Normal", "Add", "Sub" }[cmd.parameters[0]]);
case 44: return String.Format("SE: {0}", cmd.parameters[0]);
case 45: return String.Format("Script: {0}", cmd.parameters[0]);
default: return "";
}
}