Added a bunch of logs for debugging

This commit is contained in:
Antoine Pilote
2023-09-27 19:52:09 -04:00
parent 02fc2c8d08
commit 51fc92f523
6 changed files with 13 additions and 3 deletions

View File

@@ -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

View File

@@ -11,7 +11,7 @@
#include <src/Rendering/RenderList.h>
#include <src/Rendering/Renderer.h>
#include <dependencies/GLEW/include/GL/glew.h>
#include <glad/glad.h>
#include "src/Scene/Components/CapsuleColliderComponent.h"
#include <src/Scene/Components/CylinderColliderComponent.h>

View File

@@ -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;

View File

@@ -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)))
{

View File

@@ -20,7 +20,6 @@ namespace Nuake
std::string WadName = "";
std::vector<ConvertedTexture> ConvertedTextures;
unsigned char host_quakepal[768] =
{
// marked: colormap colors: cb = (colormap & 0xF0);cb += (cb >= 128 && cb < 224) ? 4 : 12;

View File

@@ -104,6 +104,7 @@ namespace Nuake
InitImgui();
Logger::Log("ImGui initialized ", "renderer");
return 0;
}