diff --git a/CMakePresets.json b/CMakePresets.json index f4bc98b..65935dd 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -1,4 +1,4 @@ -{ +{ "version": 3, "configurePresets": [ { @@ -97,5 +97,13 @@ } } } + ], + "buildPresets": [ + { + "name": "x64-release", + "description": "", + "displayName": "", + "configurePreset": "x64-release" + } ] -} +} \ No newline at end of file diff --git a/YuppleMayham/CMakeLists.txt b/YuppleMayham/CMakeLists.txt index 66249ac..35eba0d 100644 --- a/YuppleMayham/CMakeLists.txt +++ b/YuppleMayham/CMakeLists.txt @@ -13,7 +13,11 @@ include_directories(SYSTEM "C:/sdks/sol2-3.3.0/single/single/include") include_directories(SYSTEM "c:/sdks/lua-5.4.6/include") include_directories(SYSTEM "C:/sdks/freetype-2.13.2/include") link_directories(SYSTEM "C:/sdks/freetype-2.13.2/objs") -link_directories(SYSTEM "c:/sdks/tinyxml2-10.0.0/debug/lib") +if (CMAKE_BUILD_TYPE STREQUAL "Debug") + link_directories(SYSTEM "c:/sdks/tinyxml2-10.0.0/debug/lib") +else() + link_directories(SYSTEM "c:/sdks/tinyxml2-10.0.0/release/lib") +endif() link_directories(SYSTEM "c:/sdks/lua-5.4.6/lib") include_directories("${PROJECT_SOURCE_DIR}/YuppleMayham/include") diff --git a/YuppleMayham/src/gameplay/game.cpp b/YuppleMayham/src/gameplay/game.cpp index a3eb82f..2ae9055 100644 --- a/YuppleMayham/src/gameplay/game.cpp +++ b/YuppleMayham/src/gameplay/game.cpp @@ -28,7 +28,7 @@ bool Game::init() #if _DEBUG LOG_LEVEL(DEBUG); -#elif +#else LOG_LEVEL(INFO); #endif diff --git a/YuppleMayham/src/gameplay/gameactor.cpp b/YuppleMayham/src/gameplay/gameactor.cpp index 6788407..9d60f87 100644 --- a/YuppleMayham/src/gameplay/gameactor.cpp +++ b/YuppleMayham/src/gameplay/gameactor.cpp @@ -51,9 +51,9 @@ void GameActor::update(double deltaTime) { Entity::update(deltaTime); - for (auto& component : components) + for (const auto& component : components) component->update(); - for (auto& weapon : weapons) + for (const auto& weapon : weapons) weapon->update(deltaTime); if (eventManager) @@ -78,7 +78,7 @@ void GameActor::draw() // regular loop through components, but if the component returns true to kill, we erase it. // Components are always assumed to be smart pointers! - for (auto& component : components) + for (const auto& component : components) { component->bind(); component->render(); diff --git a/YuppleMayham/src/gameplay/scene.cpp b/YuppleMayham/src/gameplay/scene.cpp index 47c3c33..5ab57fe 100644 --- a/YuppleMayham/src/gameplay/scene.cpp +++ b/YuppleMayham/src/gameplay/scene.cpp @@ -17,6 +17,8 @@ #include "utility/raycaster.h" #include "utility/debugdraw.h" +#include + #include // Scene xml files, should contain a node called that holds the sprite location @@ -126,6 +128,7 @@ std::shared_ptr Scene::getPlayer() const void Scene::update(double deltaTime) { + ZoneScoped; for (const auto& [id, e] : entities) { e->update(deltaTime); @@ -138,6 +141,7 @@ void Scene::update(double deltaTime) void Scene::render(std::shared_ptr renderer) { + ZoneScoped; renderer->clear(); renderer->setProjAndViewMatrix(camera->getProjectionMatrix(), camera->getViewMatrix()); diff --git a/YuppleMayham/src/main.cpp b/YuppleMayham/src/main.cpp index 6feb5ad..e40e6b4 100644 --- a/YuppleMayham/src/main.cpp +++ b/YuppleMayham/src/main.cpp @@ -2,6 +2,7 @@ #include #include +#include // TODO: Fix circular dependency issues, mostly with input.h needing gameactor.h and command.h #include "gameplay/game.h"