diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/avatardb.cpp | 5 | ||||
-rw-r--r-- | src/resources/beinginfo.cpp | 8 | ||||
-rw-r--r-- | src/resources/beinginfo.h | 18 |
3 files changed, 26 insertions, 5 deletions
diff --git a/src/resources/avatardb.cpp b/src/resources/avatardb.cpp index e18eff5c2..39b1184fb 100644 --- a/src/resources/avatardb.cpp +++ b/src/resources/avatardb.cpp @@ -73,6 +73,11 @@ void AvatarDB::load() currentInfo->setTargetOffsetY(XML::getProperty(avatarNode, "targetOffsetY", 0)); + currentInfo->setWidth(XML::getProperty(avatarNode, + "width", 0)); + currentInfo->setHeight(XML::getProperty(avatarNode, + "height", 0)); + SpriteDisplay display; // iterate <sprite>s and <sound>s diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp index 914a00d1a..b1d6c1d0c 100644 --- a/src/resources/beinginfo.cpp +++ b/src/resources/beinginfo.cpp @@ -49,11 +49,13 @@ BeingInfo::BeingInfo() : mTargetOffsetX(0), mTargetOffsetY(0), mMaxHP(0), - mStaticMaxHP(false), - mTargetSelection(true), mSortOffsetY(0), mDeadSortOffsetY(31), - mAvatarId(0) + mAvatarId(0), + mWidth(0), + mHeight(0), + mStaticMaxHP(false), + mTargetSelection(true) { SpriteDisplay display; display.sprites.push_back(SpriteReference::Empty); diff --git a/src/resources/beinginfo.h b/src/resources/beinginfo.h index 9bf5417fa..36c78f53b 100644 --- a/src/resources/beinginfo.h +++ b/src/resources/beinginfo.h @@ -195,6 +195,18 @@ class BeingInfo final void setAvatarId(const uint16_t id) { mAvatarId = id; } + int getWidth() const + { return mWidth; } + + int getHeight() const + { return mHeight; } + + void setWidth(const int n) + { mWidth = n; } + + void setHeight(const int n) + { mHeight = n; } + static void init(); static void clear(); @@ -211,11 +223,13 @@ class BeingInfo final int mTargetOffsetX; int mTargetOffsetY; int mMaxHP; - bool mStaticMaxHP; - bool mTargetSelection; int mSortOffsetY; int mDeadSortOffsetY; uint16_t mAvatarId; + int mWidth; + int mHeight; + bool mStaticMaxHP; + bool mTargetSelection; }; typedef std::map<int, BeingInfo*> BeingInfos; |