summaryrefslogtreecommitdiff
path: root/src/resources/beinginfo.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-29 14:30:20 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-29 14:30:20 +0300
commit0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 (patch)
tree6259593b8436178ad8d981a96a8fd71eab9e04cc /src/resources/beinginfo.h
parent01773c71a4698c6f01fe70d864f922bda65506cb (diff)
downloadplus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.gz
plus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.bz2
plus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.xz
plus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.zip
Add strong typed int type BeingId.
Diffstat (limited to 'src/resources/beinginfo.h')
-rw-r--r--src/resources/beinginfo.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/resources/beinginfo.h b/src/resources/beinginfo.h
index 43c711524..a30c150af 100644
--- a/src/resources/beinginfo.h
+++ b/src/resources/beinginfo.h
@@ -25,6 +25,8 @@
#include "enums/being/targetcursorsize.h"
+#include "enums/simpletypes/beingid.h"
+
#include "resources/beingmenuitem.h"
#include "resources/cursor.h"
#include "resources/soundinfo.h"
@@ -189,10 +191,10 @@ class BeingInfo final
void setDeadSortOffsetY(const int n)
{ mDeadSortOffsetY = n; }
- uint16_t getAvatarId() const A_WARN_UNUSED
+ BeingId getAvatarId() const A_WARN_UNUSED
{ return mAvatarId; }
- void setAvatarId(const uint16_t id)
+ void setAvatarId(const BeingId id)
{ mAvatarId = id; }
int getWidth() const A_WARN_UNUSED
@@ -341,7 +343,7 @@ class BeingInfo final
int mMaxHP;
int mSortOffsetY;
int mDeadSortOffsetY;
- uint16_t mAvatarId;
+ BeingId mAvatarId;
int mWidth;
int mHeight;
int mStartFollowDist;
@@ -365,7 +367,7 @@ class BeingInfo final
bool mTargetSelection;
};
-typedef std::map<int, BeingInfo*> BeingInfos;
+typedef std::map<BeingId, BeingInfo*> BeingInfos;
typedef BeingInfos::iterator BeingInfoIterator;
#endif // RESOURCES_BEINGINFO_H