diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-08-26 16:01:24 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-08-26 16:01:24 +0000 |
commit | ef4486580fc7b8293555fcabc398ed0c2b90d78e (patch) | |
tree | 41312f2ab68ceaa95ca0cc235f6b612c790bb90e /src/player.cpp | |
parent | 5cc5c903df7b535c6bf27987b89a405812d89735 (diff) | |
download | mana-ef4486580fc7b8293555fcabc398ed0c2b90d78e.tar.gz mana-ef4486580fc7b8293555fcabc398ed0c2b90d78e.tar.bz2 mana-ef4486580fc7b8293555fcabc398ed0c2b90d78e.tar.xz mana-ef4486580fc7b8293555fcabc398ed0c2b90d78e.zip |
Got rid of numerous additions and substractions to the hair style and color.
Hair style 0 was added and defined as being bald (so bald is no longer a
hardcoded style).
Diffstat (limited to 'src/player.cpp')
-rw-r--r-- | src/player.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/player.cpp b/src/player.cpp index b864dd0e..3f4abebb 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -114,12 +114,12 @@ Player::setSex(Uint8 sex) void Player::setHairColor(Uint16 color) { - if (color != mHairColor && mHairStyle > 0) + if (color != mHairColor) { delete mSprites[HAIR_SPRITE]; AnimatedSprite *newHairSprite = new AnimatedSprite( "graphics/sprites/hairstyle" + toString(mHairStyle) + ".xml", - color - 1); + color); newHairSprite->setDirection(getSpriteDirection()); mSprites[HAIR_SPRITE] = newHairSprite; @@ -133,12 +133,12 @@ Player::setHairColor(Uint16 color) void Player::setHairStyle(Uint16 style) { - if (style != mHairStyle && mHairColor > 0) + if (style != mHairStyle) { delete mSprites[HAIR_SPRITE]; AnimatedSprite *newHairSprite = new AnimatedSprite( "graphics/sprites/hairstyle" + toString(style) + ".xml", - mHairColor - 1); + mHairColor); newHairSprite->setDirection(getSpriteDirection()); mSprites[HAIR_SPRITE] = newHairSprite; |