diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-11-27 22:08:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-11-28 18:30:52 +0300 |
commit | 4c35aa61a7cdb9897bd0ef5e2f7624a5eccaa687 (patch) | |
tree | 5f22bc4e9829f72f3439655f4ffa54770689de82 /src/being/being.cpp | |
parent | 192af63cd2d63e06172c1d42ed096af33188fd61 (diff) | |
download | manaplus-4c35aa61a7cdb9897bd0ef5e2f7624a5eccaa687.tar.gz manaplus-4c35aa61a7cdb9897bd0ef5e2f7624a5eccaa687.tar.bz2 manaplus-4c35aa61a7cdb9897bd0ef5e2f7624a5eccaa687.tar.xz manaplus-4c35aa61a7cdb9897bd0ef5e2f7624a5eccaa687.zip |
Remove some virtual methods in actorsprite and being.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r-- | src/being/being.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index be8db4058..0f47011c1 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -2253,7 +2253,12 @@ bool Being::draw(Graphics *const graphics, { bool res = true; if (!mErased) - res = ActorSprite::draw(graphics, offsetX, offsetY); + { + const int px = getActorX() + offsetX; + const int py = getActorY() + offsetY; + ActorSprite::draw1(graphics, px, py); + res = drawSpriteAt(graphics, px, py); + } return res; } @@ -2296,10 +2301,7 @@ void Being::drawSpritesSDL(Graphics *const graphics, bool Being::drawSpriteAt(Graphics *const graphics, const int x, const int y) const { - bool res = true; - - if (!mErased) - res = ActorSprite::drawSpriteAt(graphics, x, y); + bool res = CompoundSprite::draw(graphics, x, y); if (!userPalette) return res; |