diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-12-13 15:51:25 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-12-13 15:51:25 +0100 |
commit | 16106cae769f485908c15ac39d0e017167099a48 (patch) | |
tree | 7afaf56eddb2138b528fa46f8f51cc66f7c128bb /src/being.cpp | |
parent | 1eba9b1bbd2e2c5a75a71c5592069c73e106015f (diff) | |
download | mana-16106cae769f485908c15ac39d0e017167099a48.tar.gz mana-16106cae769f485908c15ac39d0e017167099a48.tar.bz2 mana-16106cae769f485908c15ac39d0e017167099a48.tar.xz mana-16106cae769f485908c15ac39d0e017167099a48.zip |
Moved gender and hair style back to Being
These properties should also apply to NPCs and possibly even monsters in
the future.
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp index a267d033..bade64b6 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -57,6 +57,9 @@ Being::Being(int id, int job, Map *map): mSpriteDirection(DIRECTION_DOWN), mDirection(DOWN), mMap(NULL), mEquippedWeapon(NULL), + mHairStyle(0), + mHairColor(0), + mGender(GENDER_UNSPECIFIED), mSpeechTime(0), mSprites(VECTOREND_SPRITE, NULL), mSpriteIDs(VECTOREND_SPRITE, 0), @@ -286,6 +289,12 @@ void Being::setPath(const Path &path) mPath = path; } +void Being::setHairStyle(int style, int color) +{ + mHairStyle = style < 0 ? mHairStyle : style % NR_HAIR_STYLES; + mHairColor = color < 0 ? mHairColor : color % NR_HAIR_COLORS; +} + void Being::setSprite(int slot, int id, const std::string &color) { assert(slot >= BASE_SPRITE && slot < VECTOREND_SPRITE); |