summaryrefslogtreecommitdiff
path: root/src/text.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-11-06 21:13:16 +0300
committerAndrei Karas <akaras@inbox.ru>2012-11-07 12:46:08 +0300
commitd812d9fac7bae4eff66a5ce8275be19d0ca77a32 (patch)
tree7f9619d23a44202a76282849bb1284773302309f /src/text.cpp
parent1bcaac517036751a8fee9ff3d6561f5866e6969e (diff)
downloadplus-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.gz
plus-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.bz2
plus-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.xz
plus-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.zip
Add own profiler and profiler info to some code.
Diffstat (limited to 'src/text.cpp')
-rw-r--r--src/text.cpp7
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")
}