public TaiyouExecutionError(TaiyouCommand commandOrigin, string pErrorTitle, string pErrorDescription) { ScriptOfOrigin = commandOrigin.ScriptCaller; CommandTitle = commandOrigin.Title; ErrorTitle = pErrorTitle; ErrorDescription = pErrorDescription; }
public TaiyouLine(string Line, string pScriptOfOrigin, string pOriginalLineCode) { string CommandCode = Line.Substring(0, 3); // Set the Arguments string Arguments = Line.Remove(0, 3).Split(','); ScriptOfOrigin = pScriptOfOrigin; OriginalLineCode = pOriginalLineCode; // Switch Case the TGEUC Interpretation switch (CommandCode) { case "001": FunctionCall = new Command.WriteLine(Arguments, ScriptOfOrigin, this); break; case "002": FunctionCall = new Command.CreateVar(Arguments, ScriptOfOrigin, this); break; case "003": FunctionCall = new Command.IntegerOperation(Arguments, ScriptOfOrigin, this); break; case "004": FunctionCall = new Command.EventHandler(Arguments, ScriptOfOrigin, this); break; case "005": FunctionCall = new Command.Jump(Arguments, ScriptOfOrigin, this); break; case "006": FunctionCall = new Command.SetOption(Arguments, ScriptOfOrigin, this); break; case "007": FunctionCall = new Command.JumpIf(Arguments, ScriptOfOrigin, this); break; case "008": FunctionCall = new Command.SetVarValue(Arguments, ScriptOfOrigin, this); break; case "009": FunctionCall = new Command.Halt(Arguments, ScriptOfOrigin, this); break; case "00A": FunctionCall = new Command.HaltExecution(Arguments, ScriptOfOrigin, this); break; case "00B": FunctionCall = new Command.HaltIfEqual(Arguments, ScriptOfOrigin, this); break; case "00C": FunctionCall = new Command.SetPlayerState(Arguments, ScriptOfOrigin, this); break; default: Console.WriteLine("Taiyou.Interpreter : Unknow TSUP (" + CommandCode + ")"); throw new ArgumentOutOfRangeException("Taiyou.Interpreter : Unknow TSUP (" + CommandCode + ")"); } }