summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp9
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);