summaryrefslogtreecommitdiff
path: root/src/being.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-26 22:22:22 +0100
committerIra Rice <irarice@gmail.com>2009-03-05 17:22:19 -0700
commit448d9076137fc5dde666a90820992a34a945cbf7 (patch)
treeee8d478fbced980a0ea868e9a7810ca56c49fe97 /src/being.h
parenta79d05b01d4a2dc639e6d3a5b7ddd508e64d3511 (diff)
downloadmana-client-448d9076137fc5dde666a90820992a34a945cbf7.tar.gz
mana-client-448d9076137fc5dde666a90820992a34a945cbf7.tar.bz2
mana-client-448d9076137fc5dde666a90820992a34a945cbf7.tar.xz
mana-client-448d9076137fc5dde666a90820992a34a945cbf7.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 7fd0c7ef..49f95662 100644
--- a/src/being.h
+++ b/src/being.h
@@ -165,7 +165,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.
@@ -282,12 +282,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
@@ -416,7 +416,7 @@ class Being : public Sprite
*/
void internalTriggerEffect(int effectId, bool sfx, bool gfx);
- 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 */
@@ -437,8 +437,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 */
StatusEffects mStatusEffects; /**< Bitset of active status effects */