mirror of
https://github.com/Stone-Red-Code/RemSox.git
synced 2026-09-04 00:56:19 +02:00
Reorganize project structure
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
using RemSox.Kernel.Processing;
|
||||
using RemSox.Kernel.Utils;
|
||||
|
||||
using YesNt.Interpreter.Runtime;
|
||||
|
||||
namespace RemSox.Kernel.Processes;
|
||||
|
||||
public class YesNtInterpreterProcess() : Process("YesNtInterpreter")
|
||||
{
|
||||
private YesNtInterpreter interpreter = null!;
|
||||
|
||||
internal override void Start(string[] args)
|
||||
{
|
||||
// TODO: eventually we want to load these from a file instead of hardcoding them here
|
||||
args = [
|
||||
"win_create \"Test\" 320 240",
|
||||
"global winId = %win_last_id",
|
||||
"win_flush ${winId}",
|
||||
"print ${winId}",
|
||||
"label test:",
|
||||
"goto test"
|
||||
];
|
||||
interpreter = new();
|
||||
|
||||
new YesNtWindowStatements(this).Register(interpreter);
|
||||
|
||||
interpreter.Prepare([.. args]);
|
||||
}
|
||||
|
||||
internal override void Tick()
|
||||
{
|
||||
if (interpreter.IsRunning)
|
||||
{
|
||||
_ = interpreter.Step();
|
||||
}
|
||||
else
|
||||
{
|
||||
RequestStop();
|
||||
}
|
||||
}
|
||||
|
||||
internal override void Stop()
|
||||
{
|
||||
interpreter.Stop();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user