From 0ed5cecbf329a52ca7168871316e6037ce6f7357 Mon Sep 17 00:00:00 2001 From: Kah Wei Date: Tue, 13 Sep 2022 15:18:56 +0800 Subject: [PATCH] Fixed ECS references in various files in SHADE_Managed --- SHADE.sln | 1 + SHADE_Application/SHADE_Application.vcxproj | 7 +++- SHADE_Application/premake5.lua | 5 ++- SHADE_Engine/SHADE_Engine.vcxproj | 4 +- SHADE_Engine/premake5.lua | 2 +- SHADE_Engine/src/Scripting/SHScriptEngine.h | 4 +- SHADE_Managed/premake5.lua | 3 +- SHADE_Managed/src/Components/Component.cxx | 6 +-- SHADE_Managed/src/Components/Component.hxx | 32 +++++++-------- SHADE_Managed/src/Engine/ECS.cxx | 2 +- SHADE_Managed/src/Engine/ECS.h++ | 4 +- SHADE_Managed/src/Engine/ECS.hxx | 2 +- SHADE_Managed/src/Engine/Entity.hxx | 2 +- SHADE_Managed/src/Engine/GameObject.cxx | 43 +++++++++----------- SHADE_Managed/src/Engine/GameObject.hxx | 44 ++++++++++----------- SHADE_Managed/src/Scripts/ScriptStore.cxx | 13 +++--- SHADE_Managed/src/Utility/Convert.cxx | 4 -- SHADE_Managed/src/Utility/Convert.hxx | 8 +--- SHADE_Managed/src/Utility/Debug.cxx | 23 +++++------ 19 files changed, 100 insertions(+), 109 deletions(-) diff --git a/SHADE.sln b/SHADE.sln index fadd2bea..fedf0fbb 100644 --- a/SHADE.sln +++ b/SHADE.sln @@ -34,6 +34,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SHADE_Managed", "SHADE_Mana {88F1A057-74BE-FB62-9DD7-E90A890331F1} = {88F1A057-74BE-FB62-9DD7-E90A890331F1} {C0FF640D-2C14-8DBE-F595-301E616989EF} = {C0FF640D-2C14-8DBE-F595-301E616989EF} {8EAD431C-7A4F-6EF2-630A-82464F4BF542} = {8EAD431C-7A4F-6EF2-630A-82464F4BF542} + {3F92E998-2BF5-783D-D47A-B1F3C0BC44C0} = {3F92E998-2BF5-783D-D47A-B1F3C0BC44C0} EndProjectSection EndProject Global diff --git a/SHADE_Application/SHADE_Application.vcxproj b/SHADE_Application/SHADE_Application.vcxproj index 11bbb48f..3d7011b4 100644 --- a/SHADE_Application/SHADE_Application.vcxproj +++ b/SHADE_Application/SHADE_Application.vcxproj @@ -64,7 +64,7 @@ EditAndContinue Disabled false - MultiThreadedDebug + MultiThreadedDebugDLL true stdcpplatest @@ -86,7 +86,7 @@ true false true - MultiThreaded + MultiThreadedDLL true stdcpplatest @@ -114,6 +114,9 @@ {3F92E998-2BF5-783D-D47A-B1F3C0BC44C0} + + {16DB1400-829B-9036-4BD6-D9B3B755D512} + diff --git a/SHADE_Application/premake5.lua b/SHADE_Application/premake5.lua index c10b1002..c46115b3 100644 --- a/SHADE_Application/premake5.lua +++ b/SHADE_Application/premake5.lua @@ -7,7 +7,7 @@ project "SHADE_Application" systemversion "latest" pchheader "SBpch.h" pchsource "%{prj.location}/src/SBpch.cpp" - staticruntime "on" + staticruntime "off" entrypoint "wWinMainCRTStartup" system ("windows") @@ -33,7 +33,8 @@ project "SHADE_Application" links { - "SHADE_Engine" + "SHADE_Engine", + "SHADE_Managed" } postbuildcommands diff --git a/SHADE_Engine/SHADE_Engine.vcxproj b/SHADE_Engine/SHADE_Engine.vcxproj index ca421c40..62beed9f 100644 --- a/SHADE_Engine/SHADE_Engine.vcxproj +++ b/SHADE_Engine/SHADE_Engine.vcxproj @@ -64,7 +64,7 @@ EditAndContinue Disabled false - MultiThreadedDebug + MultiThreadedDebugDLL true stdcpplatest @@ -91,7 +91,7 @@ true false true - MultiThreaded + MultiThreadedDLL true stdcpplatest diff --git a/SHADE_Engine/premake5.lua b/SHADE_Engine/premake5.lua index 39866d72..0eb5b93d 100644 --- a/SHADE_Engine/premake5.lua +++ b/SHADE_Engine/premake5.lua @@ -7,7 +7,7 @@ project "SHADE_Engine" systemversion "latest" pchheader "SHpch.h" pchsource "%{prj.location}/src/SHpch.cpp" - staticruntime "on" + staticruntime "off" files { diff --git a/SHADE_Engine/src/Scripting/SHScriptEngine.h b/SHADE_Engine/src/Scripting/SHScriptEngine.h index 8182da5a..91533c0f 100644 --- a/SHADE_Engine/src/Scripting/SHScriptEngine.h +++ b/SHADE_Engine/src/Scripting/SHScriptEngine.h @@ -16,8 +16,8 @@ of DigiPen Institute of Technology is prohibited. // Project Headers #include "SHDotNetRuntime.h" -#include "Engine/ECS_Base/SHECSMacros.h" -#include "Engine/ECS_Base/Entity/SHEntity.h" +#include "ECS_Base/SHECSMacros.h" +#include "ECS_Base/Entity/SHEntity.h" namespace SHADE { diff --git a/SHADE_Managed/premake5.lua b/SHADE_Managed/premake5.lua index 137e950e..835bea1a 100644 --- a/SHADE_Managed/premake5.lua +++ b/SHADE_Managed/premake5.lua @@ -9,7 +9,7 @@ project "SHADE_Managed" systemversion "latest" pchheader "SHpch.h" pchsource "%{prj.location}/src/SHpch.cpp" - staticruntime "on" + staticruntime "off" files { @@ -51,6 +51,7 @@ project "SHADE_Managed" "yaml-cpp", "imgui", "spdlog", + "SHADE_Engine" } warnings 'Extra' diff --git a/SHADE_Managed/src/Components/Component.cxx b/SHADE_Managed/src/Components/Component.cxx index ccb056c2..a6afc5cc 100644 --- a/SHADE_Managed/src/Components/Component.cxx +++ b/SHADE_Managed/src/Components/Component.cxx @@ -28,17 +28,17 @@ namespace SHADE generic T BaseComponent::AddComponent() { - return ECS::AddComponent(owner.GetNativeEntity()); + return ECS::AddComponent(owner.GetEntity()); } generic T BaseComponent::GetComponent() { - return ECS::GetComponent(owner.GetNativeEntity()); + return ECS::GetComponent(owner.GetEntity()); } generic void BaseComponent::RemoveComponent() { - ECS::RemoveComponent(owner.GetNativeEntity()); + ECS::RemoveComponent(owner.GetEntity()); } /*---------------------------------------------------------------------------------*/ diff --git a/SHADE_Managed/src/Components/Component.hxx b/SHADE_Managed/src/Components/Component.hxx index 4f8e5bab..670e4e21 100644 --- a/SHADE_Managed/src/Components/Component.hxx +++ b/SHADE_Managed/src/Components/Component.hxx @@ -15,7 +15,7 @@ of DigiPen Institute of Technology is prohibited. #pragma once // External Dependencies -#include "Engine/ECS_Base/Components/SHComponent.h" +#include "ECS_Base/Components/SHComponent.h" // Project Includes #include "Engine/Entity.hxx" #include "Scripts/Script.hxx" @@ -71,34 +71,34 @@ namespace SHADE /* Script Access Functions */ /*-----------------------------------------------------------------------------*/ /// - /// Adds a PlushieScript of the specified type to this GameObject. + /// Adds a Script of the specified type to this GameObject. /// - /// Type of PlushieScript to add. - /// Reference to the created PlushieScript. - generic where T : ref class, PlushieScript + /// Type of Script to add. + /// Reference to the created Script. + generic where T : ref class, Script T AddScript(); /// - /// Retrieves a PlushieScript of the specified type from this GameObject. - /// If multiple PlushieScripts of the same specified type are added on the same + /// Retrieves a Script of the specified type from this GameObject. + /// If multiple Scripts of the same specified type are added on the same /// GameObject, this will retrieve the first one added. /// - /// Type of PlushieScript to add. - /// Reference to the PlushieScript to retrieve. - generic where T : ref class, PlushieScript + /// Type of Script to add. + /// Reference to the Script to retrieve. + generic where T : ref class, Script T GetScript(); /// - /// Retrieves a immutable list of PlushieScripts of the specified type from this + /// Retrieves a immutable list of Scripts of the specified type from this /// GameObject. /// - /// Type of PlushieScripts to Get. - /// Immutable list of PlushieScripts of the specified type. - generic where T : ref class, PlushieScript + /// Type of Scripts to Get. + /// Immutable list of Scripts of the specified type. + generic where T : ref class, Script System::Collections::Generic::IEnumerable^ GetScripts(); /// - /// Removes all PlushieScripts of the specified type from this GameObject. + /// Removes all Scripts of the specified type from this GameObject. /// /// Type of PLushieScripts to remove. - generic where T : ref class, PlushieScript + generic where T : ref class, Script void RemoveScript(); protected: diff --git a/SHADE_Managed/src/Engine/ECS.cxx b/SHADE_Managed/src/Engine/ECS.cxx index 5d63afc8..a6ea0b96 100644 --- a/SHADE_Managed/src/Engine/ECS.cxx +++ b/SHADE_Managed/src/Engine/ECS.cxx @@ -20,7 +20,7 @@ of DigiPen Institute of Technology is prohibited. #include #include // External Dependencies -#include "Engine/ECS_Base/System/SHEntityManager.h" +#include "ECS_Base/System/SHEntityManager.h" // Project Headers #include "Utility/Convert.hxx" #include "Utility/Debug.hxx" diff --git a/SHADE_Managed/src/Engine/ECS.h++ b/SHADE_Managed/src/Engine/ECS.h++ index b411c8bd..e5ede5f2 100644 --- a/SHADE_Managed/src/Engine/ECS.h++ +++ b/SHADE_Managed/src/Engine/ECS.h++ @@ -17,8 +17,8 @@ of DigiPen Institute of Technology is prohibited. // Primary Include #include "ECS.hxx" // External Dependencies -#include "Engine/ECS_Base/System/SHComponentManager.h" -#include "Engine/ECS_Base/System/SHEntityManager.h" +#include "ECS_Base/System/SHComponentManager.h" +#include "ECS_Base/System/SHEntityManager.h" namespace SHADE { diff --git a/SHADE_Managed/src/Engine/ECS.hxx b/SHADE_Managed/src/Engine/ECS.hxx index c0c95aff..72c88e11 100644 --- a/SHADE_Managed/src/Engine/ECS.hxx +++ b/SHADE_Managed/src/Engine/ECS.hxx @@ -15,7 +15,7 @@ of DigiPen Institute of Technology is prohibited. #pragma once // External Dependencies -#include "Engine/ECS_Base/System/SHComponentManager.h" +#include "ECS_Base/System/SHComponentManager.h" // Project Includes #include "Components/Component.hxx" diff --git a/SHADE_Managed/src/Engine/Entity.hxx b/SHADE_Managed/src/Engine/Entity.hxx index 525522c2..7be9340b 100644 --- a/SHADE_Managed/src/Engine/Entity.hxx +++ b/SHADE_Managed/src/Engine/Entity.hxx @@ -15,7 +15,7 @@ of DigiPen Institute of Technology is prohibited. #pragma once // External Dependencies -#include "Engine/ECS_Base/Entity/SHEntity.h" +#include "ECS_Base/Entity/SHEntity.h" namespace SHADE { diff --git a/SHADE_Managed/src/Engine/GameObject.cxx b/SHADE_Managed/src/Engine/GameObject.cxx index 3fe1c92f..de4c614e 100644 --- a/SHADE_Managed/src/Engine/GameObject.cxx +++ b/SHADE_Managed/src/Engine/GameObject.cxx @@ -16,8 +16,10 @@ of DigiPen Institute of Technology is prohibited. // Primary Header #include "GameObject.hxx" // External Dependencies -#include "Engine/ECS_Base/System/SHEntityManager.h" +#include "ECS_Base/System/SHEntityManager.h" // Project Headers +#include "ECS.hxx" +#include "Scripts/ScriptStore.hxx" namespace SHADE { @@ -74,36 +76,31 @@ namespace SHADE generic T GameObject::AddComponent() { - throw gcnew System::NotImplementedException(); - //return ECS::AddComponent(GetNativeEntity()); + return ECS::AddComponent(entity); } generic T GameObject::GetComponent() { - throw gcnew System::NotImplementedException(); - //return ECS::GetComponent(GetNativeEntity()); + return ECS::GetComponent(entity); } generic T GameObject::GetComponentInChildren() { - throw gcnew System::NotImplementedException(); - //return ECS::GetComponentInChildren(GetNativeEntity()); + return ECS::GetComponentInChildren(entity); } generic T GameObject::EnsureComponent() { - throw gcnew System::NotImplementedException(); - //return ECS::EnsureComponent(GetNativeEntity()); + return ECS::EnsureComponent(entity); } generic void GameObject::RemoveComponent() { - throw gcnew System::NotImplementedException(); - //ECS::RemoveComponent(GetNativeEntity()); + ECS::RemoveComponent(entity); } /*---------------------------------------------------------------------------------*/ @@ -112,36 +109,31 @@ namespace SHADE generic T GameObject::AddScript() { - throw gcnew System::NotImplementedException(); - //return ScriptStore::AddScript(entity); + return ScriptStore::AddScript(entity); } generic T GameObject::GetScript() { - throw gcnew System::NotImplementedException(); - //return ScriptStore::GetScript(entity); + return ScriptStore::GetScript(entity); } generic T GameObject::GetScriptInChildren() { - throw gcnew System::NotImplementedException(); - //return ScriptStore::GetScriptInChildren(entity); + return ScriptStore::GetScriptInChildren(entity); } generic System::Collections::Generic::IEnumerable^ GameObject::GetScripts() { - throw gcnew System::NotImplementedException(); - //return ScriptStore::GetScripts(entity); + return ScriptStore::GetScripts(entity); } generic void GameObject::RemoveScript() { - throw gcnew System::NotImplementedException(); - //ScriptStore::RemoveScript(entity); + ScriptStore::RemoveScript(entity); } /*---------------------------------------------------------------------------------*/ @@ -158,10 +150,13 @@ namespace SHADE /*---------------------------------------------------------------------------------*/ /* Getters */ /*---------------------------------------------------------------------------------*/ - SHEntity GameObject::GetNativeEntity() + SHEntity& GameObject::GetNativeEntity() { - throw gcnew System::NotImplementedException(); - //return Convert::ToNative(entity); + SHEntity* nativeEntity = SHEntityManager::GetEntityByID(entity); + if (nativeEntity == nullptr) + throw gcnew System::InvalidOperationException("[GameObject] Unable to obtain native Entity for GameObject."); + + return *nativeEntity; } /*---------------------------------------------------------------------------------*/ diff --git a/SHADE_Managed/src/Engine/GameObject.hxx b/SHADE_Managed/src/Engine/GameObject.hxx index 0b030354..780b2957 100644 --- a/SHADE_Managed/src/Engine/GameObject.hxx +++ b/SHADE_Managed/src/Engine/GameObject.hxx @@ -22,7 +22,7 @@ namespace SHADE /*---------------------------------------------------------------------------------*/ /* Forward Declarations */ /*---------------------------------------------------------------------------------*/ - ref class PlushieScript; + ref class Script; ref class BaseComponent; /*---------------------------------------------------------------------------------*/ @@ -158,43 +158,43 @@ namespace SHADE /* Script Access Functions */ /*-----------------------------------------------------------------------------*/ /// - /// Adds a PlushieScript of the specified type to this GameObject. + /// Adds a Script of the specified type to this GameObject. /// - /// Type of PlushieScript to add. - /// Reference to the created PlushieScript. - generic where T : ref class, PlushieScript + /// Type of Script to add. + /// Reference to the created Script. + generic where T : ref class, Script T AddScript(); /// - /// Retrieves a PlushieScript of the specified type from this GameObject. - /// If multiple PlushieScripts of the same specified type are added on the same + /// Retrieves a Script of the specified type from this GameObject. + /// If multiple Scripts of the same specified type are added on the same /// GameObject, this will retrieve the first one added. /// - /// Type of PlushieScript to retrieve. - /// Reference to the PlushieScript to retrieve. - generic where T : ref class, PlushieScript + /// Type of Script to retrieve. + /// Reference to the Script to retrieve. + generic where T : ref class, Script T GetScript(); /// - /// Retrieves a PlushieScript of the specified type from child GameObjects. - /// If multiple PlushieScripts of the same specified type are added on the same + /// Retrieves a Script of the specified type from child GameObjects. + /// If multiple Scripts of the same specified type are added on the same /// child GameObject, this will retrieve the first one added. /// - /// Type of PlushieScript to retrieve. - /// Reference to the PlushieScript to retrieve. - generic where T : ref class, PlushieScript + /// Type of Script to retrieve. + /// Reference to the Script to retrieve. + generic where T : ref class, Script T GetScriptInChildren(); /// - /// Retrieves a immutable list of PlushieScripts of the specified type from this + /// Retrieves a immutable list of Scripts of the specified type from this /// GameObject. /// - /// Type of PlushieScripts to retrieve. - /// Immutable list of PlushieScripts of the specified type. - generic where T : ref class, PlushieScript + /// Type of Scripts to retrieve. + /// Immutable list of Scripts of the specified type. + generic where T : ref class, Script System::Collections::Generic::IEnumerable^ GetScripts(); /// - /// Removes all PlushieScripts of the specified type from this GameObject. + /// Removes all Scripts of the specified type from this GameObject. /// /// Type of PLushieScripts to remove. - generic where T : ref class, PlushieScript + generic where T : ref class, Script void RemoveScript(); internal: @@ -229,7 +229,7 @@ namespace SHADE /// Retrieves the native Entity object that this GameObject represents. /// /// Native Entity object that this GameObject represents. - SHEntity GetNativeEntity(); + SHEntity& GetNativeEntity(); private: /*-----------------------------------------------------------------------------*/ diff --git a/SHADE_Managed/src/Scripts/ScriptStore.cxx b/SHADE_Managed/src/Scripts/ScriptStore.cxx index 54572559..8a574084 100644 --- a/SHADE_Managed/src/Scripts/ScriptStore.cxx +++ b/SHADE_Managed/src/Scripts/ScriptStore.cxx @@ -21,7 +21,6 @@ of DigiPen Institute of Technology is prohibited. // Project Headers #include "Utility/Debug.hxx" #include "Utility/Convert.hxx" -#include "Tools/SHLogger.h" #include "Script.hxx" #include "Engine/Entity.hxx" @@ -88,7 +87,7 @@ namespace SHADE oss << "[ScriptStore] No Script named " << Convert::ToNative(scriptName) << " found!"; - SHLOG_ERROR(oss.str()); + Debug::LogError(oss.str()); return false; } @@ -104,7 +103,7 @@ namespace SHADE std::ostringstream oss; oss << "[ScriptStore] Failed to add Script named \"" << Convert::ToNative(scriptName) << "\" to Entity #" << entity << "! (" << Convert::ToNative(e->GetType()->Name) << ")"; - SHLOG_ERROR(oss.str()); + Debug::LogError(oss.str()); return false; } return true; @@ -593,7 +592,7 @@ namespace SHADE /* Where */ bool predicateFunc(Pair^ pair) { - return pair->type->IsSubclassOf(PlushieScript::typeid) && !pair->type->IsAbstract; + return pair->type->IsSubclassOf(Script::typeid) && !pair->type->IsAbstract; } /* Select */ @@ -616,7 +615,7 @@ namespace SHADE Func^ resultSelector = gcnew Func(resultSelectorFunc); IEnumerable^ selectManyResult = Enumerable::SelectMany(assemblies, collectionSelector, resultSelector); - /* Where: Are concrete PlushieScripts */ + /* Where: Are concrete Scripts */ Func^ predicate = gcnew Func(predicateFunc); IEnumerable^ whereResult = Enumerable::Where(selectManyResult, predicate); @@ -628,7 +627,7 @@ namespace SHADE std::ostringstream oss; oss << "[ScriptStore] Successfully retrieved references to " << Enumerable::Count(scriptTypeList) << " Script(s) from currently loaded assemblies."; - SHLOG_INFO(oss.str()); + Debug::Log(oss.str()); } void ScriptStore::getGenericMethods() @@ -636,7 +635,7 @@ namespace SHADE addScriptMethod = ScriptStore::typeid->GetMethod("AddScript"); if (addScriptMethod == nullptr) { - SHLOG_ERROR("[ScriptStore] Failed to get MethodInfo of \"AddScript()\". Adding of scripts from native code will fail."); + Debug::LogError("[ScriptStore] Failed to get MethodInfo of \"AddScript()\". Adding of scripts from native code will fail."); } } diff --git a/SHADE_Managed/src/Utility/Convert.cxx b/SHADE_Managed/src/Utility/Convert.cxx index e9b0c732..2c0b7e65 100644 --- a/SHADE_Managed/src/Utility/Convert.cxx +++ b/SHADE_Managed/src/Utility/Convert.cxx @@ -25,10 +25,6 @@ namespace SHADE /*---------------------------------------------------------------------------------*/ /* ECS Conversions */ /*---------------------------------------------------------------------------------*/ - SHEntity Convert::ToNative(Entity rawId) - { - return *SHEntityManager::GetEntityByID(rawId); - } Entity Convert::ToCLI(SHEntity entity) { return static_cast(entity.GetEID()); diff --git a/SHADE_Managed/src/Utility/Convert.hxx b/SHADE_Managed/src/Utility/Convert.hxx index 1281ebb4..241e5863 100644 --- a/SHADE_Managed/src/Utility/Convert.hxx +++ b/SHADE_Managed/src/Utility/Convert.hxx @@ -15,7 +15,7 @@ of DigiPen Institute of Technology is prohibited. #pragma once // External Dependencies -#include "Engine/ECS_Base/Entity/SHEntity.h" +#include "ECS_Base/Entity/SHEntity.h" // Project Includes #include "Engine/Entity.hxx" @@ -37,12 +37,6 @@ namespace SHADE /* ECS Conversions */ /*-----------------------------------------------------------------------------*/ /// - /// Converts from a managed Entity (UInt32) to a native Entity. - /// - /// Raw ID of an Entity. - /// Native representation of the specified Entity. - static SHEntity ToNative(Entity rawId); - /// /// Converts from a native Entity to a managed Entity (UInt32). /// /// Native Entity to convert from. diff --git a/SHADE_Managed/src/Utility/Debug.cxx b/SHADE_Managed/src/Utility/Debug.cxx index bba0136f..e9234e94 100644 --- a/SHADE_Managed/src/Utility/Debug.cxx +++ b/SHADE_Managed/src/Utility/Debug.cxx @@ -22,6 +22,7 @@ of DigiPen Institute of Technology is prohibited. #include "Tools/SHLogger.h" // Project Headers #include "Convert.hxx" +#include "SHLog.h" namespace SHADE { @@ -30,11 +31,11 @@ namespace SHADE /*---------------------------------------------------------------------------------*/ void Debug::Log(const std::string& str) { - SHLOG_INFO(str); + SHLog::Info(str); } void Debug::Log(System::String^ str) { - SHLOG_INFO(Convert::ToNative(str)); + SHLog::Info(Convert::ToNative(str)); } void Debug::Log(System::String^ str, Object^ owner) @@ -49,15 +50,15 @@ namespace SHADE { std::ostringstream oss; oss << "[" << throwerName << "] " << Convert::ToNative(str); - SHLOG_INFO(oss.str()); + SHLog::Info(oss.str()); } void Debug::LogWarning(const std::string& str) { - SHLOG_WARNING(str); + SHLog::Warning(str); } void Debug::LogWarning(System::String^ str) { - SHLOG_WARNING(Convert::ToNative(str)); + SHLog::Warning(Convert::ToNative(str)); } void Debug::LogWarning(System::String^ str, Object^ thrower) { @@ -72,15 +73,15 @@ namespace SHADE { std::ostringstream oss; oss << "[" << throwerName << "] " << Convert::ToNative(str); - SHLOG_WARNING(oss.str()); + SHLog::Warning(oss.str()); } void Debug::LogError(const std::string& str) { - SHLOG_ERROR(str); + SHLog::Error(str); } void Debug::LogError(System::String^ str) { - SHLOG_ERROR(Convert::ToNative(str)); + SHLog::Error(Convert::ToNative(str)); } void Debug::LogError(System::String^ str, Object^ thrower) { @@ -90,7 +91,7 @@ namespace SHADE { std::ostringstream oss; oss << "[" << throwerName << "] -> " << Convert::ToNative(str); - SHLOG_ERROR(oss.str()); + SHLog::Error(oss.str()); } void Debug::LogError(System::String^ str, System::String^ throwerName) { @@ -113,12 +114,12 @@ namespace SHADE { std::ostringstream oss; oss << "[" << throwerName << "] Unhandled exception: " << Convert::ToNative(exception->ToString()); - SHLOG_ERROR(oss.str()); + SHLog::Error(oss.str()); } void Debug::LogExceptionNative(const std::exception& exception, const std::string& throwerName) { std::ostringstream oss; oss << "[" << throwerName << "] Unhandled exception: " << exception.what(); - SHLOG_ERROR(oss.str()); + SHLog::Error(oss.str()); } }