summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/being.h22
-rw-r--r--src/gui/viewport.cpp2
-rw-r--r--src/resources/spritedef.cpp3
-rw-r--r--src/utils/xml.cpp15
-rw-r--r--src/utils/xml.h10
5 files changed, 23 insertions, 29 deletions
diff --git a/src/being.h b/src/being.h
index 9390dccd..abbd4c30 100644
--- a/src/being.h
+++ b/src/being.h
@@ -385,8 +385,10 @@ class Being : public Sprite
*
* \param effectId ID of the effect to trigger
*/
- virtual void
- triggerEffect(int effectId) { internalTriggerEffect(effectId, false, true); }
+ virtual void triggerEffect(int effectId)
+ {
+ internalTriggerEffect(effectId, false, true);
+ }
const std::auto_ptr<Equipment> mEquipment;
@@ -420,22 +422,19 @@ class Being : public Sprite
* \param sfx Whether to trigger sound effects
* \param gfx Whether to trigger graphical effects
*/
- void
- internalTriggerEffect(int effectId, bool sfx, bool gfx);
+ void internalTriggerEffect(int effectId, bool sfx, bool gfx);
/**
* Notify self that the stun mode has been updated. Invoked by
* setStunMode if something changed.
*/
- virtual void
- updateStunMode(int oldMode, int newMode);
+ virtual void updateStunMode(int oldMode, int newMode);
/**
* Notify self that a status effect has flipped.
* The new flag is passed.
*/
- virtual void
- updateStatusEffect(int index, bool newStatus);
+ virtual void updateStatusEffect(int index, bool newStatus);
/**
* Handle an update to a status or stun effect
@@ -443,8 +442,7 @@ class Being : public Sprite
* \param The StatusEffect to effect
* \param effectId -1 for stun, otherwise the effect index
*/
- virtual void
- handleStatusEffect(StatusEffect *effect, int effectId);
+ virtual void handleStatusEffect(StatusEffect *effect, int effectId);
Uint32 mId; /**< Unique sprite id */
Uint16 mWalkSpeed; /**< Walking speed */
@@ -462,8 +460,8 @@ class Being : public Sprite
Uint8 mGender;
Uint32 mSpeechTime;
Sint32 mPx, mPy; /**< Pixel coordinates */
- Uint16 mStunMode; /**< Stun mode; zero if not stunned */
- std::set<int> mStatusEffects; /**< set of active status effects */
+ Uint16 mStunMode; /**< Stun mode; zero if not stunned */
+ std::set<int> mStatusEffects; /**< set of active status effects */
std::vector<AnimatedSprite*> mSprites;
std::vector<int> mSpriteIDs;
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 40cc05d2..37aa40ce 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -261,7 +261,7 @@ Viewport::draw(gcn::Graphics *gcnGraphics)
// Draw text
if (textManager)
{
- textManager->draw(graphics, mPixelViewX, mPixelViewY);
+ textManager->draw(graphics, (int) mPixelViewX, (int) mPixelViewY);
}
// Draw player names, speech, and emotion sprite as needed
diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp
index 289df2e5..3eb1d92b 100644
--- a/src/resources/spritedef.cpp
+++ b/src/resources/spritedef.cpp
@@ -33,8 +33,7 @@
#include "../log.h"
#include "../utils/xml.h"
-Action*
-SpriteDef::getAction(SpriteAction action) const
+Action *SpriteDef::getAction(SpriteAction action) const
{
Actions::const_iterator i = mActions.find(action);
diff --git a/src/utils/xml.cpp b/src/utils/xml.cpp
index 47f1bd04..05df9f1d 100644
--- a/src/utils/xml.cpp
+++ b/src/utils/xml.cpp
@@ -26,7 +26,7 @@
namespace XML
{
Document::Document(const std::string &filename):
- mDoc(NULL)
+ mDoc(0)
{
int size;
ResourceManager *resman = ResourceManager::getInstance();
@@ -59,8 +59,7 @@ namespace XML
return mDoc ? xmlDocGetRootElement(mDoc) : 0;
}
- int
- getProperty(xmlNodePtr node, const char* name, int def)
+ int getProperty(xmlNodePtr node, const char* name, int def)
{
int &ret = def;
@@ -73,8 +72,7 @@ namespace XML
return ret;
}
- double
- getFloatProperty(xmlNodePtr node, const char* name, double def)
+ double getFloatProperty(xmlNodePtr node, const char* name, double def)
{
double &ret = def;
@@ -87,8 +85,8 @@ namespace XML
return ret;
}
- std::string
- getProperty(xmlNodePtr node, const char *name, const std::string &def)
+ std::string getProperty(xmlNodePtr node, const char *name,
+ const std::string &def)
{
xmlChar *prop = xmlGetProp(node, BAD_CAST name);
if (prop) {
@@ -108,4 +106,5 @@ namespace XML
return NULL;
}
-}
+
+} // namespace XML
diff --git a/src/utils/xml.h b/src/utils/xml.h
index 5a5c756b..d0aba62e 100644
--- a/src/utils/xml.h
+++ b/src/utils/xml.h
@@ -71,20 +71,18 @@ namespace XML
/**
* Gets an integer property from an xmlNodePtr.
*/
- int
- getProperty(xmlNodePtr node, const char *name, int def);
+ int getProperty(xmlNodePtr node, const char *name, int def);
/**
* Gets an floating point property from an xmlNodePtr.
*/
- double
- getFloatProperty(xmlNodePtr node, const char *name, double def);
+ double getFloatProperty(xmlNodePtr node, const char *name, double def);
/**
* Gets a string property from an xmlNodePtr.
*/
- std::string
- getProperty(xmlNodePtr node, const char *name, const std::string &def);
+ std::string getProperty(xmlNodePtr node, const char *name,
+ const std::string &def);
/**
* Finds the first child node with the given name