summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-09-07 20:58:59 +0300
committerAndrei Karas <akaras@inbox.ru>2018-09-07 20:58:59 +0300
commit32b9e2070b3cf44b6b38ab0c0383b85e87852d50 (patch)
tree352d7a4c3dcb8fbffadeb127cee0090aa98d073a /src/game.cpp
parentabfc18794cbd9119c110f32e39ea48a00e5b9214 (diff)
downloadmv-32b9e2070b3cf44b6b38ab0c0383b85e87852d50.tar.gz
mv-32b9e2070b3cf44b6b38ab0c0383b85e87852d50.tar.bz2
mv-32b9e2070b3cf44b6b38ab0c0383b85e87852d50.tar.xz
mv-32b9e2070b3cf44b6b38ab0c0383b85e87852d50.zip
Add basic performance counters.
Add in debug window new tab with this counters.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index bfbaba353..eadfda7f6 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -125,6 +125,7 @@
#include "utils/delete2.h"
#include "utils/foreach.h"
#include "utils/gettext.h"
+#include "utils/perfstat.h"
#include "utils/pnglib.h"
#include "utils/sdlcheckutils.h"
#include "utils/timer.h"
@@ -1092,6 +1093,7 @@ void Game::changeMap(const std::string &mapPath)
{
BLOCK_START("Game::changeMap")
+ skipPerfFrames = 3;
resetAdjustLevel();
ResourceManager::cleanProtected();
@@ -1182,6 +1184,7 @@ void Game::changeMap(const std::string &mapPath)
localPlayer->recreateItemParticles();
gameHandler->mapLoadedEvent();
+ Perf::init();
BLOCK_END("Game::changeMap")
}