summaryrefslogtreecommitdiff
path: root/src/resources/spritedef.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-25 15:15:54 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-25 15:15:54 +0300
commit2198ecc98ecc5e94f2856795065d198557387ade (patch)
tree873858ffceb4b6e62f441597860224b9fa3a6207 /src/resources/spritedef.cpp
parent75c5b3d32afdb34b824daafaa6d4300b9a8ec06b (diff)
downloadmv-2198ecc98ecc5e94f2856795065d198557387ade.tar.gz
mv-2198ecc98ecc5e94f2856795065d198557387ade.tar.bz2
mv-2198ecc98ecc5e94f2856795065d198557387ade.tar.xz
mv-2198ecc98ecc5e94f2856795065d198557387ade.zip
Add more profiler labels.
Diffstat (limited to 'src/resources/spritedef.cpp')
-rw-r--r--src/resources/spritedef.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp
index 528151537..267dfaab0 100644
--- a/src/resources/spritedef.cpp
+++ b/src/resources/spritedef.cpp
@@ -81,6 +81,7 @@ unsigned SpriteDef::findNumber(const unsigned num) const
SpriteDef *SpriteDef::load(const std::string &animationFile,
const int variant, const bool prot)
{
+ BLOCK_START("SpriteDef::load")
const size_t pos = animationFile.find('|');
std::string palettes;
if (pos != std::string::npos)
@@ -95,6 +96,7 @@ SpriteDef *SpriteDef::load(const std::string &animationFile,
const std::string errorFile = paths.getStringValue("sprites").append(
paths.getStringValue("spriteErrorFile"));
+ BLOCK_END("SpriteDef::load")
if (animationFile != errorFile)
return load(errorFile, 0, prot);
else
@@ -112,6 +114,7 @@ SpriteDef *SpriteDef::load(const std::string &animationFile,
def->incRef();
def->setProtected(true);
}
+ BLOCK_END("SpriteDef::load")
return def;
}
@@ -177,6 +180,7 @@ void SpriteDef::substituteActions()
void SpriteDef::loadSprite(const XmlNodePtr spriteNode, const int variant,
const std::string &palettes)
{
+ BLOCK_START("SpriteDef::loadSprite")
// Get the variant
const int variantCount = XML::getProperty(spriteNode, "variants", 0);
int variant_offset = 0;
@@ -196,6 +200,7 @@ void SpriteDef::loadSprite(const XmlNodePtr spriteNode, const int variant,
else if (xmlNameEqual(node, "include"))
includeSprite(node, variant);
}
+ BLOCK_END("SpriteDef::loadSprite")
}
void SpriteDef::loadImageSet(const XmlNodePtr node,