summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-10-01 18:54:27 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-10-01 18:54:27 +0000
commitd9fafbdd4c89b971214cfcdf4bb0a8b10cf59148 (patch)
treed085d31a82c1cb4f750c6fd6f1268c1175a75d23 /src
parent29fe62ebcd605feb009c1f57097cf5afa59183e9 (diff)
downloadmana-d9fafbdd4c89b971214cfcdf4bb0a8b10cf59148.tar.gz
mana-d9fafbdd4c89b971214cfcdf4bb0a8b10cf59148.tar.bz2
mana-d9fafbdd4c89b971214cfcdf4bb0a8b10cf59148.tar.xz
mana-d9fafbdd4c89b971214cfcdf4bb0a8b10cf59148.zip
Added support for different hairstyles for male and female characters. Female hairstyles are copies of the male ones until the real female hairstyles are finished.
Diffstat (limited to 'src')
-rw-r--r--src/player.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/player.cpp b/src/player.cpp
index 9b9b3c09..143bfc23 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -126,9 +126,16 @@ Player::setHairColor(Uint16 color)
{
if (color != mHairColor && mHairStyle > 0)
{
+ std::string sex;
+ if (mSex == 0)
+ {
+ sex = "-male";
+ } else{
+ sex = "-female";
+ }
AnimatedSprite *newHairSprite = new AnimatedSprite(
- "graphics/sprites/hairstyle" + toString(mHairStyle) + ".xml",
- color - 1);
+ "graphics/sprites/hairstyle" + toString(mHairStyle) + sex + ".xml",
+ color - 1);
newHairSprite->setDirection(getSpriteDirection());
delete mSprites[HAIR_SPRITE];
@@ -145,9 +152,16 @@ Player::setHairStyle(Uint16 style)
{
if (style != mHairStyle && mHairColor > 0)
{
+ std::string sex;
+ if (mSex == 0)
+ {
+ sex = "-male";
+ } else{
+ sex = "-female";
+ }
AnimatedSprite *newHairSprite = new AnimatedSprite(
- "graphics/sprites/hairstyle" + toString(style) + ".xml",
- mHairColor - 1);
+ "graphics/sprites/hairstyle" + toString(style) + sex + ".xml",
+ mHairColor - 1);
newHairSprite->setDirection(getSpriteDirection());
delete mSprites[HAIR_SPRITE];