diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..b3ee6a5 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,26 @@ +{ + "version": "0.2.0", + "configurations": [ + { + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md + "name": ".NET Core Launch (console)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/source/Vignette.Desktop/bin/Debug/net7.0/Vignette.Desktop.dll", + "args": [], + "cwd": "${workspaceFolder}/source/Vignette.Desktop", + // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console + "console": "internalConsole", + "stopAtEntry": false + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..63adaee --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,41 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/source/Vignette.Desktop/Vignette.Desktop.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}/source/Vignette.Desktop/Vignette.Desktop.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "watch", + "command": "dotnet", + "type": "process", + "args": [ + "watch", + "run", + "--project", + "${workspaceFolder}/source/Vignette.Desktop/Vignette.Desktop.csproj" + ], + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file diff --git a/source/Vignette.Desktop/Program.cs b/source/Vignette.Desktop/Program.cs new file mode 100644 index 0000000..df58c82 --- /dev/null +++ b/source/Vignette.Desktop/Program.cs @@ -0,0 +1,7 @@ +// Copyright (c) Cosyne +// Licensed under GPL 3.0 with SDK Exception. See LICENSE for details. + +using Sekai; +using Vignette; + +Host.Run(new HostOptions { Name = "Vignette" }); diff --git a/source/Vignette/VignetteGame.cs b/source/Vignette/VignetteGame.cs new file mode 100644 index 0000000..884fc58 --- /dev/null +++ b/source/Vignette/VignetteGame.cs @@ -0,0 +1,34 @@ +// Copyright (c) Cosyne +// Licensed under GPL 3.0 with SDK Exception. See LICENSE for details. + +using System; +using Sekai; +using Vignette.Graphics; + +namespace Vignette; + +public sealed class VignetteGame : Game +{ + private Renderer renderer = null!; + private readonly Window root = new(); + + public override void Load() + { + renderer = new(Graphics); + } + + public override void Draw() + { + root.Draw(renderer); + } + + public override void Update(TimeSpan elapsed) + { + root.Update(elapsed); + } + + public override void Unload() + { + root.Clear(); + } +}