summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-22 20:58:13 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-22 20:58:13 +0300
commit8ad99cc3f4dd98f0b73a2ece9323f01099a81e80 (patch)
tree33115940e6efabec34efb71e0be6b6d7dfd7e4df /src/game.cpp
parent04f47f060f94ec0e2dfc3cccf62cff167e0ecd68 (diff)
downloadmanaplus-8ad99cc3f4dd98f0b73a2ece9323f01099a81e80.tar.gz
manaplus-8ad99cc3f4dd98f0b73a2ece9323f01099a81e80.tar.bz2
manaplus-8ad99cc3f4dd98f0b73a2ece9323f01099a81e80.tar.xz
manaplus-8ad99cc3f4dd98f0b73a2ece9323f01099a81e80.zip
Add profiler lines into some functions.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 63bafe187..2535f539d 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -794,8 +794,12 @@ void Game::resetAdjustLevel()
void Game::handleMove()
{
+ BLOCK_START("Game::handleMove")
if (!player_node)
+ {
+ BLOCK_END("Game::handleMove")
return;
+ }
// Moving player around
if (player_node->isAlive()
@@ -806,7 +810,10 @@ void Game::handleMove()
{
NpcDialog *const dialog = NpcDialog::getActive();
if (dialog)
+ {
+ BLOCK_END("Game::handleMove")
return;
+ }
// Ignore input if either "ignore" key is pressed
// Stops the character moving about if the user's window manager
@@ -814,6 +821,7 @@ void Game::handleMove()
if (inputManager.isActionActive(InputAction::IGNORE_INPUT_1) ||
inputManager.isActionActive(InputAction::IGNORE_INPUT_2))
{
+ BLOCK_END("Game::handleMove")
return;
}
@@ -859,6 +867,7 @@ void Game::handleMove()
if (!inputManager.isActionActive(InputAction::EMOTE) || direction == 0)
moveInDirection(direction);
}
+ BLOCK_END("Game::handleMove")
}
void Game::moveInDirection(const unsigned char direction)