summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-20 19:38:54 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-20 19:38:54 +0300
commit5bb61caa784254b1d9c2ccd791feba2bbb2f3023 (patch)
treead327417a7f6be30fd0b033cc7bff2ffb325249e /src
parentfbd8b8f2c7d511247c32a62cdeec2089df261688 (diff)
downloadmanaverse-5bb61caa784254b1d9c2ccd791feba2bbb2f3023.tar.gz
manaverse-5bb61caa784254b1d9c2ccd791feba2bbb2f3023.tar.bz2
manaverse-5bb61caa784254b1d9c2ccd791feba2bbb2f3023.tar.xz
manaverse-5bb61caa784254b1d9c2ccd791feba2bbb2f3023.zip
In localplayer rename InvertDirection into MoveType.
Diffstat (limited to 'src')
-rw-r--r--src/actionmanager.cpp2
-rw-r--r--src/being/localplayer.cpp30
-rw-r--r--src/being/localplayer.h16
-rw-r--r--src/gui/popups/statuspopup.cpp2
-rw-r--r--src/gui/windows/statuswindow.cpp2
5 files changed, 26 insertions, 26 deletions
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp
index 7155e3c2c..a816743f2 100644
--- a/src/actionmanager.cpp
+++ b/src/actionmanager.cpp
@@ -499,7 +499,7 @@ impHandler0(setHome)
impHandler0(changeMoveType)
{
- callYellowBar(invertDirection);
+ callYellowBar(moveType);
}
impHandler0(changeAttackWeaponType)
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 93d542803..3cd724018 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -112,7 +112,7 @@ LocalPlayer::LocalPlayer(const int id, const uint16_t subtype) :
AttributeListener(),
StatListener(),
mGMLevel(0),
- mInvertDirection(0),
+ mMoveType(0),
mCrazyMoveType(config.getIntValue("crazyMoveType")),
mCrazyMoveState(0),
mAttackWeaponType(config.getIntValue("attackWeaponType")),
@@ -568,7 +568,7 @@ void LocalPlayer::setDestination(const int x, const int y)
// Only send a new message to the server when destination changes
if (x != mDest.x || y != mDest.y)
{
- if (mInvertDirection != 1)
+ if (mMoveType != 1)
{
Net::getPlayerHandler()->setDestination(x, y, mDirection);
Being::setDestination(x, y);
@@ -1237,7 +1237,7 @@ void LocalPlayer::moveToHome()
}
}
-static const unsigned invertDirectionSize = 5;
+static const unsigned moveTypeSize = 5;
void LocalPlayer::changeMode(unsigned *restrict const var,
const unsigned limit,
@@ -1272,14 +1272,14 @@ void LocalPlayer::changeMode(unsigned *restrict const var,
debugMsg(str.substr(4));
}
-void LocalPlayer::invertDirection(const bool forward)
+void LocalPlayer::moveType(const bool forward)
{
mMoveState = 0;
- changeMode(&mInvertDirection, invertDirectionSize, "invertMoveDirection",
- &LocalPlayer::getInvertDirectionString, 0, false, forward);
+ changeMode(&mMoveType, moveTypeSize, "invertMoveDirection",
+ &LocalPlayer::getMoveTypeString, 0, false, forward);
}
-static const char *const invertDirectionStrings[] =
+static const char *const moveTypeStrings[] =
{
// TRANSLATORS: move type in status bar
N_("(D) default moves"),
@@ -1295,10 +1295,10 @@ static const char *const invertDirectionStrings[] =
N_("(?) unknown move")
};
-std::string LocalPlayer::getInvertDirectionString()
+std::string LocalPlayer::getMoveTypeString()
{
- return gettext(getVarItem(&invertDirectionStrings[0],
- mInvertDirection, invertDirectionSize));
+ return gettext(getVarItem(&moveTypeStrings[0],
+ mMoveType, moveTypeSize));
}
static const unsigned crazyMoveTypeSize = 11;
@@ -2671,8 +2671,8 @@ void LocalPlayer::specialMove(const unsigned char direction)
if (direction && (mNavigateX || mNavigateY))
navigateClean();
- if (direction && (mInvertDirection >= 2
- && mInvertDirection <= 4)
+ if (direction && (mMoveType >= 2
+ && mMoveType <= 4)
&& !mIsServerBuggy)
{
if (mAction == BeingAction::MOVE)
@@ -2680,9 +2680,9 @@ void LocalPlayer::specialMove(const unsigned char direction)
int max;
- if (mInvertDirection == 2)
+ if (mMoveType == 2)
max = 5;
- else if (mInvertDirection == 4)
+ else if (mMoveType == 4)
max = 1;
else
max = 3;
@@ -3724,7 +3724,7 @@ void LocalPlayer::checkNewName(Being *const being)
void LocalPlayer::resetYellowBar()
{
- mInvertDirection = 0;
+ mMoveType = 0;
mCrazyMoveType = config.resetIntValue("crazyMoveType");
mMoveToTargetType = config.resetIntValue("moveToTargetType");
mFollowMode = config.resetIntValue("followMode");
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index 920a242e8..453781e2b 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -186,13 +186,13 @@ class LocalPlayer final : public Being,
bool isPathSetByMouse() const A_WARN_UNUSED
{ return mPathSetByMouse; }
- int getInvertDirection() const A_WARN_UNUSED
- { return mInvertDirection; }
+ int getMoveType() const A_WARN_UNUSED
+ { return mMoveType; }
- void setInvertDirection(const int n)
- { mInvertDirection = n; }
+ void setMoveType(const int n)
+ { mMoveType = n; }
- void invertDirection(const bool forward);
+ void moveType(const bool forward);
int getAttackWeaponType() const A_WARN_UNUSED
{ return mAttackWeaponType; }
@@ -451,7 +451,7 @@ class LocalPlayer final : public Being,
void setTestParticle(const std::string &fileName,
const bool updateHash = true);
- std::string getInvertDirectionString();
+ std::string getMoveTypeString();
std::string getCrazyMoveTypeString();
@@ -538,7 +538,7 @@ class LocalPlayer final : public Being,
int mGMLevel;
// move type
- unsigned int mInvertDirection;
+ unsigned int mMoveType;
// crazy move type
unsigned int mCrazyMoveType;
// crazy move state
@@ -547,7 +547,7 @@ class LocalPlayer final : public Being,
unsigned int mAttackWeaponType;
// quick drop counter
unsigned int mQuickDropCounter;
- // move state. used if mInvertDirection == 2
+ // move state. used if mMoveType == 2
unsigned int mMoveState;
// pick up type 1x1, normal aka 2x1, forward aka 2x3, 3x3, 3x3 + 1
unsigned int mPickUpType;
diff --git a/src/gui/popups/statuspopup.cpp b/src/gui/popups/statuspopup.cpp
index f2f934d1b..688898afe 100644
--- a/src/gui/popups/statuspopup.cpp
+++ b/src/gui/popups/statuspopup.cpp
@@ -138,7 +138,7 @@ void StatusPopup::updateLabels() const
if (!player_node || !viewport)
return;
- setLabelText(0, player_node->getInvertDirectionString(),
+ setLabelText(0, player_node->getMoveTypeString(),
InputAction::INVERT_DIRECTION);
setLabelText(1, player_node->getCrazyMoveTypeString(),
InputAction::CHANGE_CRAZY_MOVES_TYPE);
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index bf2e92e0b..029bfff1a 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -641,7 +641,7 @@ void StatusWindow::updateStatusBar(ProgressBar *const bar,
if (!player_node || !viewport)
return;
- bar->setText(translateLetter2(player_node->getInvertDirectionString())
+ bar->setText(translateLetter2(player_node->getMoveTypeString())
.append(translateLetter2(player_node->getCrazyMoveTypeString()))
.append(translateLetter2(player_node->getMoveToTargetTypeString()))
.append(translateLetter2(player_node->getFollowModeString()))