From e67b90c6a8375d11eee4e753ed8809b917b62208 Mon Sep 17 00:00:00 2001 From: Kah Wei Date: Wed, 14 Sep 2022 20:07:13 +0800 Subject: [PATCH] Added calls to SHScriptEngine in SBApplication --- SHADE_Application/src/Application/SBApplication.cpp | 12 ++++++++---- SHADE_Engine/src/Scripting/SHScriptEngine.h | 3 ++- SHADE_Managed/premake5.lua | 2 -- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/SHADE_Application/src/Application/SBApplication.cpp b/SHADE_Application/src/Application/SBApplication.cpp index 0cb1ecd1..aa0f5a9b 100644 --- a/SHADE_Application/src/Application/SBApplication.cpp +++ b/SHADE_Application/src/Application/SBApplication.cpp @@ -6,12 +6,12 @@ #include "Scenes/SBEditorScene.h" #endif // SHEDITOR -#include "Tools/SHLogger.h" - #include #include #include +#include "Scripting/SHScriptEngine.h" + namespace Sandbox { bool paused = false; @@ -23,14 +23,15 @@ namespace Sandbox _In_ INT nCmdShow ) { - SHLOG_TITLE("Initialising SBApplication") - + window.Create(hInstance, hPrevInstance, lpCmdLine, nCmdShow); #ifdef SHEDITOR #else #endif + // Set up scripting + SHADE::SHScriptEngine::Init(); } void SBApplication::Update(void) @@ -47,6 +48,9 @@ namespace Sandbox void SBApplication::Exit(void) { + // Shutdown scripting + SHADE::SHScriptEngine::Exit(); + #ifdef SHEDITOR #else #endif diff --git a/SHADE_Engine/src/Scripting/SHScriptEngine.h b/SHADE_Engine/src/Scripting/SHScriptEngine.h index a375c864..5114125c 100644 --- a/SHADE_Engine/src/Scripting/SHScriptEngine.h +++ b/SHADE_Engine/src/Scripting/SHScriptEngine.h @@ -18,6 +18,7 @@ of DigiPen Institute of Technology is prohibited. #include "SHDotNetRuntime.h" #include "ECS_Base/SHECSMacros.h" #include "ECS_Base/Entity/SHEntity.h" +#include "SH_API.h" namespace SHADE { @@ -25,7 +26,7 @@ namespace SHADE /// Manages initialisation of the DotNetRuntime and interfacing with CLR code written /// and executed on .NET. /// - class SHScriptEngine + class SH_API SHScriptEngine { public: /*-----------------------------------------------------------------------------*/ diff --git a/SHADE_Managed/premake5.lua b/SHADE_Managed/premake5.lua index b68fadb6..0cbf0288 100644 --- a/SHADE_Managed/premake5.lua +++ b/SHADE_Managed/premake5.lua @@ -38,7 +38,6 @@ project "SHADE_Managed" { "yaml-cpp", "imgui", - "spdlog", "SHADE_Engine" } @@ -56,7 +55,6 @@ project "SHADE_Managed" { "yaml-cpp", "imgui", - "spdlog", "SHADE_Engine" }