summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-27 21:39:10 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-27 21:39:10 +0300
commitf2dba51be00b6c67b6d1b8924cac8019a3bcd000 (patch)
treebc40b96606b74c80e60fb21064b1e8883dee2db6 /src/being
parent420664f4025b261674e0cdea503d43fb95beae38 (diff)
downloadmanaverse-f2dba51be00b6c67b6d1b8924cac8019a3bcd000.tar.gz
manaverse-f2dba51be00b6c67b6d1b8924cac8019a3bcd000.tar.bz2
manaverse-f2dba51be00b6c67b6d1b8924cac8019a3bcd000.tar.xz
manaverse-f2dba51be00b6c67b6d1b8924cac8019a3bcd000.zip
Add strong typed bool type Move.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp9
-rw-r--r--src/being/being.h4
2 files changed, 8 insertions, 5 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 9c820f0c5..a4ffbbf3f 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -117,7 +117,7 @@ bool Being::mShowLevel = false;
bool Being::mShowPlayersStatus = false;
bool Being::mEnableReorderSprites = true;
bool Being::mHideErased = false;
-bool Being::mMoveNames = false;
+Move Being::mMoveNames = Move_false;
bool Being::mUseDiagonal = true;
int Being::mAwayEffect = -1;
@@ -457,8 +457,9 @@ void Being::setPosition(const Vector &pos)
if (mText)
{
- mText->adviseXY(static_cast<int>(pos.x), static_cast<int>(pos.y)
- - getHeight() - mText->getHeight() - 6, mMoveNames);
+ mText->adviseXY(static_cast<int>(pos.x),
+ static_cast<int>(pos.y) - getHeight() - mText->getHeight() - 6,
+ mMoveNames);
}
}
@@ -2333,7 +2334,7 @@ void Being::reReadConfig()
mShowPlayersStatus = config.getBoolValue("showPlayersStatus");
mEnableReorderSprites = config.getBoolValue("enableReorderSprites");
mHideErased = config.getBoolValue("hideErased");
- mMoveNames = config.getBoolValue("moveNames");
+ mMoveNames = fromBool(config.getBoolValue("moveNames"), Move);
mUseDiagonal = config.getBoolValue("useDiagonalSpeed");
mUpdateConfigTime = cur_time;
diff --git a/src/being/being.h b/src/being/being.h
index 6fb26b620..03a69b986 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -23,6 +23,8 @@
#ifndef BEING_BEING_H
#define BEING_BEING_H
+#include "enums/simpletypes/move.h"
+
#include "resources/beinginfo.h"
#include "position.h"
@@ -1079,7 +1081,7 @@ class Being notfinal : public ActorSprite,
static bool mShowPlayersStatus;
static bool mEnableReorderSprites;
static bool mHideErased;
- static bool mMoveNames;
+ static Move mMoveNames;
static bool mUseDiagonal;
static int mAwayEffect;