summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorChuck Miller <shadowmil@gmail.com>2010-01-15 23:35:30 -0500
committerChuck Miller <shadowmil@gmail.com>2010-01-15 23:38:07 -0500
commitb278542da029c629736be8605a9b4d85a6f2b902 (patch)
treee935cf888be4e88d5f471654a27fbdf512ab537b /src/being.cpp
parentc5e241b276bcbf725309360edc2bdf033f49e98e (diff)
downloadmana-b278542da029c629736be8605a9b4d85a6f2b902.tar.gz
mana-b278542da029c629736be8605a9b4d85a6f2b902.tar.bz2
mana-b278542da029c629736be8605a9b4d85a6f2b902.tar.xz
mana-b278542da029c629736be8605a9b4d85a6f2b902.zip
Fixes drawing sprite in the playerbox widget.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 613e692a..45a621e4 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -664,6 +664,20 @@ void Being::draw(Graphics *graphics, int offsetX, int offsetY) const
}
}
+void Being::drawSpriteAt(Graphics *graphics, int x, int y) const
+{
+ const int px = x - 16;
+ const int py = y - 32;
+
+ for (SpriteConstIterator it = mSprites.begin(); it != mSprites.end(); it++)
+ if (*it)
+ {
+ if ((*it)->getAlpha() != mAlpha)
+ (*it)->setAlpha(mAlpha);
+ (*it)->draw(graphics, px, py);
+ }
+}
+
void Being::drawEmotion(Graphics *graphics, int offsetX, int offsetY)
{
if (!mEmotion)