summaryrefslogtreecommitdiff
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
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.
-rw-r--r--ChangeLog9
-rw-r--r--src/player.cpp22
2 files changed, 26 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a310e28..0982bff4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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];