summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-13 23:09:44 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-13 23:09:44 +0300
commit1c7c54e8102f1f449ffe7dfaa3a041915079d290 (patch)
tree3da90ea7e18d4c4a6fe2f0eb4c76718dc3e489f5 /src/being
parent467455bf7907411918d8fb6f4113eb95df443a29 (diff)
downloadplus-1c7c54e8102f1f449ffe7dfaa3a041915079d290.tar.gz
plus-1c7c54e8102f1f449ffe7dfaa3a041915079d290.tar.bz2
plus-1c7c54e8102f1f449ffe7dfaa3a041915079d290.tar.xz
plus-1c7c54e8102f1f449ffe7dfaa3a041915079d290.zip
fix code style.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/actortype.h2
-rw-r--r--src/being/being.cpp1
-rw-r--r--src/being/being.h3
-rw-r--r--src/being/beingaction.h2
-rw-r--r--src/being/beingdirection.h2
-rw-r--r--src/being/beingflag.h2
-rw-r--r--src/being/compoundsprite.cpp2
-rw-r--r--src/being/compoundsprite.h3
-rw-r--r--src/being/localplayer.cpp16
-rw-r--r--src/being/localplayer.h1
-rw-r--r--src/being/pickup.h2
11 files changed, 22 insertions, 14 deletions
diff --git a/src/being/actortype.h b/src/being/actortype.h
index 794dae5f2..f57d6662b 100644
--- a/src/being/actortype.h
+++ b/src/being/actortype.h
@@ -35,6 +35,6 @@ namespace ActorType
PET,
AVATAR
};
-}
+} // namespace ActorType
#endif // BEING_ACTORTYPE_H
diff --git a/src/being/being.cpp b/src/being/being.cpp
index a2be3a071..0d72585f1 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -36,6 +36,7 @@
#include "being/attributes.h"
#include "being/beingaction.h"
#include "being/beingcacheentry.h"
+#include "being/beingflag.h"
#include "being/beingspeech.h"
#include "being/playerrelations.h"
diff --git a/src/being/being.h b/src/being/being.h
index e01c7b08e..87949479c 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -31,9 +31,10 @@
#include "being/beingaction.h"
#include "being/beingdirection.h"
-#include "being/beingflag.h"
#include "being/gender.h"
+#include "being/actorsprite.h"
+
#include <map>
#include "localconsts.h"
diff --git a/src/being/beingaction.h b/src/being/beingaction.h
index a6bc47b28..91bd7de27 100644
--- a/src/being/beingaction.h
+++ b/src/being/beingaction.h
@@ -40,6 +40,6 @@ namespace BeingAction
HURT,
SPAWN
};
-} // BeingAction
+} // namespace BeingAction
#endif // BEING_BEINGACTION_H
diff --git a/src/being/beingdirection.h b/src/being/beingdirection.h
index 7d17b788f..6e4d394ed 100644
--- a/src/being/beingdirection.h
+++ b/src/being/beingdirection.h
@@ -35,6 +35,6 @@ namespace BeingDirection
UP = 4,
RIGHT = 8
};
-}
+} // namespace BeingDirection
#endif // BEING_BEINGDIRECTION_H
diff --git a/src/being/beingflag.h b/src/being/beingflag.h
index 9c9a76ef4..029283c7c 100644
--- a/src/being/beingflag.h
+++ b/src/being/beingflag.h
@@ -33,5 +33,5 @@ namespace BeingFlag
GENDER_MALE = 128,
SPECIAL = 128 + 64
};
-}
+} // namespace BeingFlag
#endif // BEING_BEINGFLAG_H
diff --git a/src/being/compoundsprite.cpp b/src/being/compoundsprite.cpp
index 4e496730d..d355deafc 100644
--- a/src/being/compoundsprite.cpp
+++ b/src/being/compoundsprite.cpp
@@ -30,6 +30,8 @@
#include "sdlshared.h"
+#include "being/compounditem.h"
+
#include "resources/map/map.h"
#include "resources/map/mapconsts.h"
diff --git a/src/being/compoundsprite.h b/src/being/compoundsprite.h
index 7e983ad2d..b36da2d1f 100644
--- a/src/being/compoundsprite.h
+++ b/src/being/compoundsprite.h
@@ -24,13 +24,12 @@
#include "sprite.h"
-#include "being/compounditem.h"
-
#include <list>
#include <vector>
#include "localconsts.h"
+class CompoundItem;
class Image;
class CompoundSprite : public Sprite
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 9ba8b236b..8d921d8dd 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -36,6 +36,7 @@
#include "resources/map/walklayer.h"
#include "being/attributes.h"
+#include "being/beingflag.h"
#include "being/pickup.h"
#include "being/playerinfo.h"
#include "being/playerrelations.h"
@@ -763,7 +764,8 @@ void LocalPlayer::attack(Being *const target, const bool keep,
mActionTime = tick_time;
- if (target->getType() != ActorType::PLAYER || checAttackPermissions(target))
+ if (target->getType() != ActorType::PLAYER
+ || checAttackPermissions(target))
{
setAction(BeingAction::ATTACK);
@@ -2284,28 +2286,32 @@ void LocalPlayer::crazyMoveA()
// if (client->limitPackets(PACKET_DIRECTION))
{
setDirection(BeingDirection::DOWN);
- Net::getPlayerHandler()->setDirection(BeingDirection::DOWN);
+ Net::getPlayerHandler()->setDirection(
+ BeingDirection::DOWN);
}
break;
case 'u':
// if (client->limitPackets(PACKET_DIRECTION))
{
setDirection(BeingDirection::UP);
- Net::getPlayerHandler()->setDirection(BeingDirection::UP);
+ Net::getPlayerHandler()->setDirection(
+ BeingDirection::UP);
}
break;
case 'l':
// if (client->limitPackets(PACKET_DIRECTION))
{
setDirection(BeingDirection::LEFT);
- Net::getPlayerHandler()->setDirection(BeingDirection::LEFT);
+ Net::getPlayerHandler()->setDirection(
+ BeingDirection::LEFT);
}
break;
case 'r':
// if (client->limitPackets(PACKET_DIRECTION))
{
setDirection(BeingDirection::RIGHT);
- Net::getPlayerHandler()->setDirection(BeingDirection::RIGHT);
+ Net::getPlayerHandler()->setDirection(
+ BeingDirection::RIGHT);
}
break;
case 'L':
diff --git a/src/being/localplayer.h b/src/being/localplayer.h
index ee57dc96a..d327ee19a 100644
--- a/src/being/localplayer.h
+++ b/src/being/localplayer.h
@@ -27,7 +27,6 @@
#include "gui/userpalette.h"
-#include "listeners/actionlistener.h"
#include "listeners/actorspritelistener.h"
#include "listeners/attributelistener.h"
#include "listeners/statlistener.h"
diff --git a/src/being/pickup.h b/src/being/pickup.h
index b15070e58..dfa35fe20 100644
--- a/src/being/pickup.h
+++ b/src/being/pickup.h
@@ -40,6 +40,6 @@ namespace Pickup
STACK_FULL,
DROP_STEAL
};
-}
+} // namespace Pickup
#endif // BEING_PICKUP_H