summaryrefslogtreecommitdiff
path: root/src/being.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-26 22:22:22 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-06 00:27:26 +0100
commitc75511fffc77d517fbf854ec8bef791f055de44c (patch)
treec431846c7d7a6934f103d21129a20a0dc4fd1c8e /src/being.h
parent646cc317351d60e0fefcab789248310662fcbbc8 (diff)
downloadmana-client-c75511fffc77d517fbf854ec8bef791f055de44c.tar.gz
mana-client-c75511fffc77d517fbf854ec8bef791f055de44c.tar.bz2
mana-client-c75511fffc77d517fbf854ec8bef791f055de44c.tar.xz
mana-client-c75511fffc77d517fbf854ec8bef791f055de44c.zip
Got rid of Sint{8,16,32} and Uint32 for being ID
Using unsigned rarely makes sense, especially when the server doesn't use it either. Other uses of unsigned should be reviewed. In all other cases, int is the fastest integer type on any architecture. Using 8 or 16 bits can basically only be a memory optimization.
Diffstat (limited to 'src/being.h')
-rw-r--r--src/being.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/being.h b/src/being.h
index ef830e3a..8b2a1e7e 100644
--- a/src/being.h
+++ b/src/being.h
@@ -166,7 +166,7 @@ class Being : public Sprite
* @param text The text that should appear.
* @param time The amount of time the text should stay in milliseconds.
*/
- void setSpeech(const std::string &text, Uint32 time = 500);
+ void setSpeech(const std::string &text, int time = 500);
/**
* Puts a damage bubble above this being.
@@ -285,12 +285,12 @@ class Being : public Sprite
/**
* Gets the sprite id.
*/
- Uint32 getId() const { return mId; }
+ int getId() const { return mId; }
/**
* Sets the sprite id.
*/
- void setId(Uint32 id) { mId = id; }
+ void setId(int id) { mId = id; }
/**
* Sets the map the being is on
@@ -477,7 +477,7 @@ class Being : public Sprite
*/
virtual void handleStatusEffect(StatusEffect *effect, int effectId);
- Uint32 mId; /**< Unique sprite id */
+ int mId; /**< Unique sprite id */
Uint16 mWalkSpeed; /**< Walking speed */
Uint8 mDirection; /**< Facing direction */
Map *mMap; /**< Map on which this being resides */
@@ -496,8 +496,8 @@ class Being : public Sprite
Text *mText;
Uint16 mHairStyle, mHairColor;
Gender mGender;
- Uint32 mSpeechTime;
- Sint32 mPx, mPy; /**< Pixel coordinates */
+ int mSpeechTime;
+ int mPx, mPy; /**< Pixel coordinates */
Uint16 mStunMode; /**< Stun mode; zero if not stunned */
std::set<int> mStatusEffects; /**< set of active status effects */