1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- 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";
- 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);
- }
- }
- }
|