Added tracy for debugging. further optimizations
This commit is contained in:
parent
95fa07b183
commit
f7f68e500b
6 changed files with 24 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
{
|
||||
"version": 3,
|
||||
"configurePresets": [
|
||||
{
|
||||
|
|
@ -97,5 +97,13 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "x64-release",
|
||||
"description": "",
|
||||
"displayName": "",
|
||||
"configurePreset": "x64-release"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ bool Game::init()
|
|||
|
||||
#if _DEBUG
|
||||
LOG_LEVEL(DEBUG);
|
||||
#elif
|
||||
#else
|
||||
LOG_LEVEL(INFO);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@
|
|||
#include "utility/raycaster.h"
|
||||
#include "utility/debugdraw.h"
|
||||
|
||||
#include <tracy/Tracy.hpp>
|
||||
|
||||
#include <execution>
|
||||
|
||||
// Scene xml files, should contain a node called <player> that holds the sprite location
|
||||
|
|
@ -126,6 +128,7 @@ std::shared_ptr<GameActor> 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> renderer)
|
||||
{
|
||||
ZoneScoped;
|
||||
renderer->clear();
|
||||
|
||||
renderer->setProjAndViewMatrix(camera->getProjectionMatrix(), camera->getViewMatrix());
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include <SDL_image.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <tracy/Tracy.hpp>
|
||||
|
||||
// TODO: Fix circular dependency issues, mostly with input.h needing gameactor.h and command.h
|
||||
#include "gameplay/game.h"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue