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/actorsprite.h | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'src/being/actorsprite.h') diff --git a/src/being/actorsprite.h b/src/being/actorsprite.h index db1e4a47d..709e1f27b 100644 --- a/src/being/actorsprite.h +++ b/src/being/actorsprite.h @@ -88,12 +88,9 @@ public: virtual Type getType() const A_WARN_UNUSED { return UNKNOWN; } - virtual bool draw(Graphics *const graphics, - const int offsetX, - const int offsetY) const override; - - virtual bool drawSpriteAt(Graphics *const graphics, - const int x, const int y) const; + void draw1(Graphics *const graphics, + const int offsetX, + const int offsetY) const; virtual void logic(); @@ -182,6 +179,19 @@ public: */ void removeActorSpriteListener(ActorSpriteListener *const listener); + int getActorX() const + { return getPixelX() - mapTileSize / 2; } + + int getActorY() const + { +#ifdef MANASERV_SUPPORT + return getPixelY() + ((Net::getNetworkType() == ServerInfo::MANASERV) + ? 15 : mapTileSize); +#else + return getPixelY() - mapTileSize; +#endif + } + protected: /** * Notify self that the stun mode has been updated. Invoked by -- cgit v1.2.3-70-g09d2