From d9fafbdd4c89b971214cfcdf4bb0a8b10cf59148 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Mon, 1 Oct 2007 18:54:27 +0000 Subject: 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. --- ChangeLog | 9 ++++++++- src/player.cpp | 22 ++++++++++++++++++---- 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 +2007-10-01 Philipp Sehmisch + + * 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 * 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]; -- cgit v1.2.3-70-g09d2