diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2007-10-01 18:54:27 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2007-10-01 18:54:27 +0000 |
commit | d9fafbdd4c89b971214cfcdf4bb0a8b10cf59148 (patch) | |
tree | d085d31a82c1cb4f750c6fd6f1268c1175a75d23 | |
parent | 29fe62ebcd605feb009c1f57097cf5afa59183e9 (diff) | |
download | mana-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.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/player.cpp | 22 |
2 files changed, 26 insertions, 5 deletions
@@ -1,4 +1,11 @@ -2007-09-30 Philipp Sehmisch <tmw@crushnet.org> +2007-10-01 Philipp Sehmisch <tmw@crushnet.org> + + * src/player.cpp, data/graphics/sprites/hairstyle*: + Added support for different hairstyles for male and female characters + (current female hairstyles are copies of the male ones until the + real female ones are finished) + +2007-09-30 Philipp Sehmisch <tmw@crushnet.org> * data/graphics/tiles/desert_x3.png: Removed the purple line from the ruin tile. 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]; |