From 51fc92f523aad5a18055ad43293170ded8e3608b Mon Sep 17 00:00:00 2001 From: Antoine Pilote Date: Wed, 27 Sep 2023 19:52:09 -0400 Subject: [PATCH] Added a bunch of logs for debugging --- Editor/Editor.cpp | 5 ++++- Editor/src/Misc/GizmoDrawer.cpp | 2 +- Editor/src/Windows/EditorInterface.cpp | 5 +++++ Nuake/src/Resource/Project.cpp | 2 ++ Nuake/src/Scene/Systems/WadConverter.cpp | 1 - Nuake/src/Window.cpp | 1 + 6 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Editor/Editor.cpp b/Editor/Editor.cpp index 65dcfab5..ddee641d 100644 --- a/Editor/Editor.cpp +++ b/Editor/Editor.cpp @@ -131,13 +131,16 @@ int ApplicationMain(int argc, char* argv[]) } WindowTheming::SetWindowDarkMode(window); + Logger::Log("Creating editor ", "window", CRITICAL); // Initialize Editor Nuake::EditorInterface editor; + Logger::Log("Created editor ", "window", CRITICAL); // Load project in argument if (!launchSettings.projectPath.empty()) { - editor.LoadProject(launchSettings.projectPath); + Logger::Log("Loading project", "window", CRITICAL); + editor.LoadProject(launchSettings.projectPath); } // Start application main loop diff --git a/Editor/src/Misc/GizmoDrawer.cpp b/Editor/src/Misc/GizmoDrawer.cpp index 55b058b0..d1a84654 100644 --- a/Editor/src/Misc/GizmoDrawer.cpp +++ b/Editor/src/Misc/GizmoDrawer.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include "src/Scene/Components/CapsuleColliderComponent.h" #include diff --git a/Editor/src/Windows/EditorInterface.cpp b/Editor/src/Windows/EditorInterface.cpp index 1e790a5f..e763f029 100644 --- a/Editor/src/Windows/EditorInterface.cpp +++ b/Editor/src/Windows/EditorInterface.cpp @@ -61,12 +61,15 @@ namespace Nuake { EditorInterface::EditorInterface() { + Logger::Log("Creating editor windows", "window", CRITICAL); filesystem = new FileSystemUI(this); _WelcomeWindow = new WelcomeWindow(this); _audioWindow = new AudioWindow(); + Logger::Log("Building fonts", "window", CRITICAL); BuildFonts(); + Logger::Log("Loading imgui from mem", "window", CRITICAL); using namespace Nuake::StaticResources; ImGui::LoadIniSettingsFromMemory((const char*)StaticResources::Resources_default_layout_ini); } @@ -1853,8 +1856,10 @@ namespace Nuake { auto project = Project::New(); auto projectFileData = FileSystem::ReadFile(projectPath, true); + Logger::Log("Reading file project: " + projectFileData, "window", CRITICAL); try { + Logger::Log("Starting deserializing", "window", CRITICAL); project->Deserialize(json::parse(projectFileData)); project->FullPath = projectPath; diff --git a/Nuake/src/Resource/Project.cpp b/Nuake/src/Resource/Project.cpp index 9dcec5ca..d457506c 100644 --- a/Nuake/src/Resource/Project.cpp +++ b/Nuake/src/Resource/Project.cpp @@ -105,6 +105,7 @@ namespace Nuake bool Project::Deserialize(const json& j) { + Logger::Log("Starting deserializing project", "window", CRITICAL); if (!j.contains("Name") || !j.contains("Description")) return false; @@ -137,6 +138,7 @@ namespace Nuake if (!FileSystem::FileExists(scenePath)) return true; + Logger::Log("Starting deserializing scene", "window", CRITICAL); std::string sceneContent = FileSystem::ReadFile(scenePath, false); if (!DefaultScene->Deserialize(nlohmann::json::parse(sceneContent))) { diff --git a/Nuake/src/Scene/Systems/WadConverter.cpp b/Nuake/src/Scene/Systems/WadConverter.cpp index de043f3e..d17635ef 100644 --- a/Nuake/src/Scene/Systems/WadConverter.cpp +++ b/Nuake/src/Scene/Systems/WadConverter.cpp @@ -20,7 +20,6 @@ namespace Nuake std::string WadName = ""; std::vector ConvertedTextures; - unsigned char host_quakepal[768] = { // marked: colormap colors: cb = (colormap & 0xF0);cb += (cb >= 128 && cb < 224) ? 4 : 12; diff --git a/Nuake/src/Window.cpp b/Nuake/src/Window.cpp index ba33d337..a247e6d7 100644 --- a/Nuake/src/Window.cpp +++ b/Nuake/src/Window.cpp @@ -104,6 +104,7 @@ namespace Nuake InitImgui(); + Logger::Log("ImGui initialized ", "renderer"); return 0; }