diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2008-02-22 19:58:29 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-05 17:28:29 +0100 |
commit | 615b1bc6080a3418b18fd4ab93b4212470709731 (patch) | |
tree | a82805bc56042899bd19620d667d890baefd7413 /src/being.h | |
parent | 12d4837d4d8bb6cbb5d4cd4199bb77b76108fa51 (diff) | |
download | mana-615b1bc6080a3418b18fd4ab93b4212470709731.tar.gz mana-615b1bc6080a3418b18fd4ab93b4212470709731.tar.bz2 mana-615b1bc6080a3418b18fd4ab93b4212470709731.tar.xz mana-615b1bc6080a3418b18fd4ab93b4212470709731.zip |
Handling gender with an enum everywhere.
(cherry picked from mainline commit d3adc61aa4b4924f82d8cbc23bea26da7257da97)
Conflicts:
src/net/beinghandler.cpp
src/net/charserverhandler.cpp
src/player.cpp
src/player.h
Diffstat (limited to 'src/being.h')
-rw-r--r-- | src/being.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/being.h b/src/being.h index 6319bd47..e70cdd09 100644 --- a/src/being.h +++ b/src/being.h @@ -47,9 +47,14 @@ class ImageSet; class Particle; class Text; - class StatusEffect; +enum Gender { + GENDER_MALE = 0, + GENDER_FEMALE = 1, + GENDER_UNSPECIFIED = 2 +}; + class Being : public Sprite { public: @@ -193,12 +198,12 @@ class Being : public Sprite /** * Sets the gender of this being. */ - virtual void setGender(int gender) { mGender = gender; } + virtual void setGender(Gender gender) { mGender = gender; } /** * Gets the gender of this being. */ - int getGender() const { return mGender; } + Gender getGender() const { return mGender; } /** * Makes this being take the next step of his path. @@ -418,7 +423,7 @@ class Being : public Sprite Path mPath; Text *mSpeech; Uint16 mHairStyle, mHairColor; - Uint8 mGender; + Gender mGender; Uint32 mSpeechTime; Sint32 mPx, mPy; /**< Pixel coordinates */ Uint16 mStunMode; /**< Stun mode; zero if not stunned */ |