summaryrefslogtreecommitdiff
path: root/src/player.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-11-04 15:40:37 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-11-04 15:40:37 +0000
commitda8827cce58d39f33785259512222e02ab66a89f (patch)
tree061d2704391573a1a820f24f2c4d231f9b62438f /src/player.cpp
parent918d9600aa7bf8ca31a6c8065757a316594b7172 (diff)
downloadmana-da8827cce58d39f33785259512222e02ab66a89f.tar.gz
mana-da8827cce58d39f33785259512222e02ab66a89f.tar.bz2
mana-da8827cce58d39f33785259512222e02ab66a89f.tar.xz
mana-da8827cce58d39f33785259512222e02ab66a89f.zip
Applied recoloring to hair styles.
Diffstat (limited to 'src/player.cpp')
-rw-r--r--src/player.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/player.cpp b/src/player.cpp
index 062c1135..f928aeb1 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -112,8 +112,22 @@ void Player::setHairStyle(int style, int color)
mHairStyle = style;
mHairColor = color;
+ static char const *const colors[NR_HAIR_COLORS] =
+ {
+ "#8c4b41,da9041,ffffff", // light brown
+ "#06372b,489e25,fdedcc", // green
+ "#5f0b33,91191c,f9ad81", // red
+ "#602486,934cc3,fdc689", // purple
+ "#805e74,c6b09b,ffffff", // gray
+ "#8c6625,dab425,ffffff", // yellow
+ "#1d2d6d,1594a3,fdedcc", // blue
+ "#831f2d,be4f2d,f8cc8b", // brown
+ "#432482,584bbc,dae8e5", // light blue
+ "#460850,611967,e7b4ae", // dark purple
+ };
+
AnimatedSprite *newHairSprite = AnimatedSprite::load
- (strprintf("graphics/sprites/hairstyle%d.xml", style), color);
+ (strprintf("graphics/sprites/hairstyle%d.xml|%s", style, colors[color]));
if (newHairSprite)
newHairSprite->setDirection(getSpriteDirection());