using System; using System.Drawing; using System.IO; using NTERA.Core; using NTERA.EmuEra.Game.EraEmu.Content; namespace NTERA.Interpreter { public class Engine : IScriptEngine { public IConsole Console { get; protected set; } public string EntrypointPath { get; protected set; } public Interpreter Interpreter { get; protected set; } public bool Initialize(IConsole console) { Console = console; EntrypointPath = @"M:\era\eraSemifullTest\erb\SYSTEM_TITLE.ERB"; //@"M:\era\eraSemifullTest\erb\TWTITLE.txt"; Interpreter = new Interpreter(console, File.ReadAllText(EntrypointPath)); return true; } public void Start() { Interpreter.Exec(); } public void InputString(string input) { throw new NotImplementedException(); } public void InputInteger(long input) { throw new NotImplementedException(); } public void InputSystemInteger(long input) { throw new NotImplementedException(); } public CroppedImage GetImage(string name) { var bitmap = new Bitmap(@"M:\era\eraSemifullTest\resources\bbb.png"); return new CroppedImage(name, bitmap, new Rectangle(Point.Empty, bitmap.Size), false); } } }