summaryrefslogtreecommitdiff
path: root/src/being/actorsprite.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-11-27 22:08:14 +0300
committerAndrei Karas <akaras@inbox.ru>2013-11-28 18:30:52 +0300
commit4c35aa61a7cdb9897bd0ef5e2f7624a5eccaa687 (patch)
tree5f22bc4e9829f72f3439655f4ffa54770689de82 /src/being/actorsprite.h
parent192af63cd2d63e06172c1d42ed096af33188fd61 (diff)
downloadmanaverse-4c35aa61a7cdb9897bd0ef5e2f7624a5eccaa687.tar.gz
manaverse-4c35aa61a7cdb9897bd0ef5e2f7624a5eccaa687.tar.bz2
manaverse-4c35aa61a7cdb9897bd0ef5e2f7624a5eccaa687.tar.xz
manaverse-4c35aa61a7cdb9897bd0ef5e2f7624a5eccaa687.zip
Remove some virtual methods in actorsprite and being.
Diffstat (limited to 'src/being/actorsprite.h')
-rw-r--r--src/being/actorsprite.h22
1 files changed, 16 insertions, 6 deletions
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