summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-10-04 10:00:06 -0600
committerJared Adams <jaxad0127@gmail.com>2009-10-04 10:00:06 -0600
commitdcb412dfc87c08f40d3b6841da1b60578665e328 (patch)
tree862187d8b1c5ee993c027ca8831299d0a28ea00a /src/being.cpp
parentd9c38594fcd8c653b95ac6bf8cf525ae21a13195 (diff)
downloadmana-client-dcb412dfc87c08f40d3b6841da1b60578665e328.tar.gz
mana-client-dcb412dfc87c08f40d3b6841da1b60578665e328.tar.bz2
mana-client-dcb412dfc87c08f40d3b6841da1b60578665e328.tar.xz
mana-client-dcb412dfc87c08f40d3b6841da1b60578665e328.zip
Do some refactoring of Being code
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 43f0fdef..34f68581 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -83,7 +83,6 @@ Being::Being(int id, int job, Map *map):
mText(0),
mStunMode(0),
mAlpha(1.0f),
- mNumberOfLayers(0),
mStatusParticleEffects(&mStunParticleEffects, false),
mChildParticleEffects(&mStatusParticleEffects, false),
mMustResetParticles(false),
@@ -903,6 +902,11 @@ void Being::showName()
gcn::Graphics::CENTER, mNameColor);
}
+int Being::getNumberOfLayers() const
+{
+ return mSprites.size();
+}
+
void Being::load()
{
// Hairstyles are encoded as negative numbers. Count how far negative
@@ -914,15 +918,3 @@ void Being::load()
mNumberOfHairstyles = hairstyles;
}
-
-void Being::_updateNumberOfLayers()
-{
- SpriteConstIterator si = mSprites.begin();
- mNumberOfLayers = 0;
- while (si != mSprites.end())
- {
- if (*si)
- mNumberOfLayers++;
- si++;
- }
-}