From 4c35aa61a7cdb9897bd0ef5e2f7624a5eccaa687 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 27 Nov 2013 22:08:14 +0300 Subject: Remove some virtual methods in actorsprite and being. --- src/being/being.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/being/being.cpp') 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; -- cgit v1.2.3-60-g2f50