diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-11-06 21:13:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-11-07 12:46:08 +0300 |
commit | d812d9fac7bae4eff66a5ce8275be19d0ca77a32 (patch) | |
tree | 7f9619d23a44202a76282849bb1284773302309f /src/text.cpp | |
parent | 1bcaac517036751a8fee9ff3d6561f5866e6969e (diff) | |
download | manaverse-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.gz manaverse-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.bz2 manaverse-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.xz manaverse-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.zip |
Add own profiler and profiler info to some code.
Diffstat (limited to 'src/text.cpp')
-rw-r--r-- | src/text.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/text.cpp b/src/text.cpp index 41b2b01ca..cf15590fe 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -125,6 +125,7 @@ void Text::adviseXY(const int x, const int y) void Text::draw(gcn::Graphics *const graphics, const int xOff, const int yOff) { + BLOCK_START("Text::draw") if (mIsSpeech) { static_cast<Graphics*>(graphics)->drawImageRect( @@ -135,6 +136,7 @@ void Text::draw(gcn::Graphics *const graphics, const int xOff, const int yOff) TextRenderer::renderText(graphics, mText, mX - xOff, mY - yOff, gcn::Graphics::LEFT, *mColor, mFont, !mIsSpeech, true); + BLOCK_END("Text::draw") } FlashText::FlashText(const std::string &text, const int x, const int y, @@ -148,10 +150,15 @@ FlashText::FlashText(const std::string &text, const int x, const int y, void FlashText::draw(gcn::Graphics *const graphics, const int xOff, const int yOff) { + BLOCK_START("FlashText::draw") if (mTime) { if ((--mTime & 4) == 0) + { + BLOCK_END("FlashText::draw") return; + } } Text::draw(graphics, xOff, yOff); + BLOCK_END("FlashText::draw") } |