summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-13 22:56:33 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-13 22:56:33 +0100
commit59f441730d8dbd7574b2fe4c9a430be256449cab (patch)
treefe01d073652e9c0615828afc0d99ac6ee35b75fd /src/being.cpp
parent7d5c6124e9c9cf447286eaa58afe17adf6c1a81d (diff)
downloadmana-client-59f441730d8dbd7574b2fe4c9a430be256449cab.tar.gz
mana-client-59f441730d8dbd7574b2fe4c9a430be256449cab.tar.bz2
mana-client-59f441730d8dbd7574b2fe4c9a430be256449cab.tar.xz
mana-client-59f441730d8dbd7574b2fe4c9a430be256449cab.zip
Code style reformatting
Got rid of "void" in functions that take no arguments and removed the newline after the return type of a method in many places.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp49
1 files changed, 17 insertions, 32 deletions
diff --git a/src/being.cpp b/src/being.cpp
index a9f5c973..7641de35 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -21,8 +21,6 @@
#include "being.h"
-#include <cassert>
-
#include "animatedsprite.h"
#include "equipment.h"
#include "game.h"
@@ -47,6 +45,8 @@
#include "utils/xml.h"
+#include <cassert>
+
#define BEING_EFFECTS_FILE "effects.xml"
#define HAIR_FILE "hair.xml"
@@ -291,8 +291,7 @@ void Being::setDirection(Uint8 direction)
}
}
-SpriteDirection
-Being::getSpriteDirection() const
+SpriteDirection Being::getSpriteDirection() const
{
SpriteDirection dir;
@@ -441,8 +440,7 @@ Being::Type Being::getType() const
return UNKNOWN;
}
-void
-Being::setStatusEffectBlock(int offset, Uint16 newEffects)
+void Being::setStatusEffectBlock(int offset, Uint16 newEffects)
{
for (int i = 0; i < STATUS_EFFECTS; i++) {
int index = StatusEffect::blockEffectIndexToEffectIndex(offset + i);
@@ -452,8 +450,7 @@ Being::setStatusEffectBlock(int offset, Uint16 newEffects)
}
}
-void
-Being::handleStatusEffect(StatusEffect *effect, int effectId)
+void Being::handleStatusEffect(StatusEffect *effect, int effectId)
{
if (!effect)
return;
@@ -473,21 +470,18 @@ Being::handleStatusEffect(StatusEffect *effect, int effectId)
}
}
-void
-Being::updateStunMode(int oldMode, int newMode)
+void Being::updateStunMode(int oldMode, int newMode)
{
handleStatusEffect(StatusEffect::getStatusEffect(oldMode, false), -1);
handleStatusEffect(StatusEffect::getStatusEffect(newMode, true), -1);
}
-void
-Being::updateStatusEffect(int index, bool newStatus)
+void Being::updateStatusEffect(int index, bool newStatus)
{
handleStatusEffect(StatusEffect::getStatusEffect(index, newStatus), index);
}
-void
-Being::setStatusEffect(int index, bool active)
+void Being::setStatusEffect(int index, bool active)
{
const bool wasActive = mStatusEffects.find(index) != mStatusEffects.end();
@@ -500,8 +494,7 @@ Being::setStatusEffect(int index, bool active)
}
}
-int
-Being::getOffset(char pos, char neg) const
+int Being::getOffset(char pos, char neg) const
{
// Check whether we're walking in the requested direction
if (mAction != WALK || !(mDirection & (pos | neg))) {
@@ -558,8 +551,7 @@ static EffectDescription *default_effect = NULL;
static std::map<int, EffectDescription *> effects;
static bool effects_initialized = false;
-static EffectDescription *
-getEffectDescription(xmlNodePtr node, int *id)
+static EffectDescription *getEffectDescription(xmlNodePtr node, int *id)
{
EffectDescription *ed = new EffectDescription;
@@ -570,8 +562,7 @@ getEffectDescription(xmlNodePtr node, int *id)
return ed;
}
-static EffectDescription *
-getEffectDescription(int effectId)
+static EffectDescription *getEffectDescription(int effectId)
{
if (!effects_initialized)
{
@@ -617,8 +608,7 @@ getEffectDescription(int effectId)
return ed;
}
-void
-Being::internalTriggerEffect(int effectId, bool sfx, bool gfx)
+void Being::internalTriggerEffect(int effectId, bool sfx, bool gfx)
{
logger->log("Special effect #%d on %s", effectId,
getId() == player_node->getId() ? "self" : "other");
@@ -649,25 +639,21 @@ static int hairStylesNr;
static int hairColorsNr;
static std::vector<std::string> hairColors;
-static void
-initializeHair(void);
+static void initializeHair();
-int
-Being::getHairStylesNr(void)
+int Being::getHairStylesNr()
{
initializeHair();
return hairStylesNr;
}
-int
-Being::getHairColorsNr(void)
+int Being::getHairColorsNr()
{
initializeHair();
return hairColorsNr;
}
-std::string
-Being::getHairColor(int index)
+std::string Being::getHairColor(int index)
{
initializeHair();
if (index < 0 || index >= hairColorsNr)
@@ -678,8 +664,7 @@ Being::getHairColor(int index)
static bool hairInitialized = false;
-static void
-initializeHair(void)
+static void initializeHair()
{
if (hairInitialized)
return;