Created basic entry point and application

This commit is contained in:
Simon Lübeß
2020-11-01 15:41:12 +01:00
parent 1adb665422
commit bf796a2a25
7 changed files with 46 additions and 32 deletions
-2
View File
@@ -2,5 +2,3 @@ FileVersion = 1
[Project] [Project]
Name = "GlitchyEngine" Name = "GlitchyEngine"
TargetType = "BeefLib"
StartupObject = "GlitchyEngine.Program"
+10
View File
@@ -0,0 +1,10 @@
namespace GlitchyEngine
{
public class Application
{
public void Run()
{
while(true) {}
}
}
}
+21
View File
@@ -0,0 +1,21 @@
using System;
namespace GlitchyEngine
{
class Program
{
[LinkName("CreateApplication")]
static extern Application CreateApplication();
public static int Main(String[] args)
{
var app = CreateApplication();
app.Run();
delete app;
return 0;
}
}
}
-12
View File
@@ -1,12 +0,0 @@
using System;
namespace GlitchyEngine
{
public static class Test
{
public static void Print()
{
Console.WriteLine("Hello from the Glitchy Engine!");
}
}
}
+1 -2
View File
@@ -3,5 +3,4 @@ Dependencies = {corlib = "*", GlitchyEngine = "*"}
[Project] [Project]
Name = "Sandbox" Name = "Sandbox"
TargetType = "BeefGUIApplication" StartupObject = "GlitchyEngine.Program"
StartupObject = "Sandbox.Program"
-16
View File
@@ -1,16 +0,0 @@
using System;
namespace Sandbox
{
class Program
{
public static int Main(String[] args)
{
GlitchyEngine.Test.Print();
Console.Read();
return 0;
}
}
}
+14
View File
@@ -0,0 +1,14 @@
using System;
using GlitchyEngine;
namespace Sandbox
{
class SandboxApp : Application
{
[Export, LinkName("CreateApplication")]
public static Application CreateApplication()
{
return new SandboxApp();
}
}
}