summaryrefslogtreecommitdiff
path: root/src/being/being.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-12 19:12:15 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-12 19:12:15 +0300
commit814e88e5ca69bc54837be27429dbf42dd41f7ac6 (patch)
tree301671c06b758239f9b05b3a0e4f2774e5ab3a9e /src/being/being.h
parent261b8ab980d442d0cf1b06df244388d65f431301 (diff)
downloadmv-814e88e5ca69bc54837be27429dbf42dd41f7ac6.tar.gz
mv-814e88e5ca69bc54837be27429dbf42dd41f7ac6.tar.bz2
mv-814e88e5ca69bc54837be27429dbf42dd41f7ac6.tar.xz
mv-814e88e5ca69bc54837be27429dbf42dd41f7ac6.zip
Move being action into separate file.
Diffstat (limited to 'src/being/being.h')
-rw-r--r--src/being/being.h26
1 files changed, 6 insertions, 20 deletions
diff --git a/src/being/being.h b/src/being/being.h
index aec735215..52a88bd2e 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -29,6 +29,7 @@
#include "listeners/configlistener.h"
+#include "being/beingaction.h"
#include "being/beingdirection.h"
#include "being/beingflag.h"
#include "being/gender.h"
@@ -85,22 +86,6 @@ class Being : public ActorSprite, public ConfigListener
friend class BeingEquipBackend;
friend class LocalPlayer;
- /**
- * Action the being is currently performing
- * WARNING: Has to be in sync with the same enum in the Being class
- * of the server!
- */
- enum Action
- {
- STAND = 0,
- MOVE,
- ATTACK,
- SIT,
- DEAD,
- HURT,
- SPAWN
- };
-
enum AttackType
{
HIT = 0x00,
@@ -469,19 +454,20 @@ class Being : public ActorSprite, public ConfigListener
/**
* Sets the current action.
*/
- virtual void setAction(const Action &action, const int attackType);
+ virtual void setAction(const BeingAction::Action &action,
+ const int attackType);
/**
* Get the being's action currently performed.
*/
- Action getCurrentAction() const A_WARN_UNUSED
+ BeingAction::Action getCurrentAction() const A_WARN_UNUSED
{ return mAction; }
/**
* Returns whether this being is still alive.
*/
bool isAlive() const A_WARN_UNUSED
- { return mAction != DEAD; }
+ { return mAction != BeingAction::DEAD; }
/**
* Returns the current direction.
@@ -968,7 +954,7 @@ class Being : public ActorSprite, public ConfigListener
int mLastAttackX;
int mLastAttackY;
Gender mGender;
- Action mAction; /**< Action the being is performing */
+ BeingAction::Action mAction;
uint16_t mSubType; /**< Subtype (graphical view, basically) */
uint8_t mDirection; /**< Facing direction */
uint8_t mDirectionDelayed; /**< Facing direction */