diff --git a/Nuake/dependencies/freetype_p5.lua b/Nuake/dependencies/freetype_p5.lua index 453cdcad..937fb89f 100644 --- a/Nuake/dependencies/freetype_p5.lua +++ b/Nuake/dependencies/freetype_p5.lua @@ -72,5 +72,6 @@ project "Freetype" symbols "on" filter "configurations:Release" + files { "freetype/src/base/ftdebug.c" } runtime "Release" optimize "on" \ No newline at end of file diff --git a/Nuake/src/Scene/Systems/TransformSystem.cpp b/Nuake/src/Scene/Systems/TransformSystem.cpp index 8532a995..11ab3049 100644 --- a/Nuake/src/Scene/Systems/TransformSystem.cpp +++ b/Nuake/src/Scene/Systems/TransformSystem.cpp @@ -40,9 +40,7 @@ namespace Nuake { for (auto e : camView) { auto [transform, camera] = camView.get(e); - // Matrix4 cameraTransform = camera.CameraInstance->GetTransformRotation(); - } auto transformView = m_Scene->m_Registry.view(); @@ -63,6 +61,8 @@ namespace Nuake { globalPosition += transformComponent.Translation; globalRotation += transformComponent.Rotation; globalScale *= transformComponent.Scale; + + parentComponent = parentComponent.Parent.GetComponent(); } transform.GlobalTranslation = globalPosition + transform.Translation; diff --git a/Nuake/src/UI/Font/Font.h b/Nuake/src/UI/Font/Font.h index e0f59529..763f96d3 100644 --- a/Nuake/src/UI/Font/Font.h +++ b/Nuake/src/UI/Font/Font.h @@ -67,12 +67,13 @@ namespace Nuake ~Font() { - if (ft) - { - if (font) - msdfgen::destroyFont(font); - msdfgen::deinitializeFreetype(ft); - } + if (!ft) + return; + + if (font) + msdfgen::destroyFont(font); + + msdfgen::deinitializeFreetype(ft); } bool load(const char* fontFilename) diff --git a/Nuake/src/Vendors/msdfgen/ext/import-font.cpp b/Nuake/src/Vendors/msdfgen/ext/import-font.cpp index 6f67d902..b73f18c5 100644 --- a/Nuake/src/Vendors/msdfgen/ext/import-font.cpp +++ b/Nuake/src/Vendors/msdfgen/ext/import-font.cpp @@ -123,6 +123,7 @@ FontHandle * loadFont(FreetypeHandle *library, const char *filename) { return NULL; FontHandle *handle = new FontHandle; FT_Error error = FT_New_Face(library->library, filename, 0, &handle->face); + if (error) { delete handle; return NULL;