diff options
author | Ira Rice <irarice@gmail.com> | 2008-10-15 15:23:21 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-10-15 15:23:21 +0000 |
commit | d3f84af9d22814db0ec67e87805b3d1054afd606 (patch) | |
tree | 9ee8fa2f0cb9b85da65bfebd0f2f74cbf8fbf20e /src/player.cpp | |
parent | 0ce8857e4e3fbd69c48f7db9123293bdcbcd9751 (diff) | |
download | mana-d3f84af9d22814db0ec67e87805b3d1054afd606.tar.gz mana-d3f84af9d22814db0ec67e87805b3d1054afd606.tar.bz2 mana-d3f84af9d22814db0ec67e87805b3d1054afd606.tar.xz mana-d3f84af9d22814db0ec67e87805b3d1054afd606.zip |
De-hardcoded colors in trunk. Now, all colors are loaded from
colors.xml.
Diffstat (limited to 'src/player.cpp')
-rw-r--r-- | src/player.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/player.cpp b/src/player.cpp index 8380fdfe..37badcdc 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -160,32 +160,11 @@ void Player::setGender(int gender) void Player::setHairStyle(int style, int color) { style = style < 0 ? mHairStyle : style % NR_HAIR_STYLES; - color = color < 0 ? mHairColor : color % NR_HAIR_COLORS; if (style == mHairStyle && color == mHairColor) return; Being::setHairStyle(style, color); - static char const *const colors[NR_HAIR_COLORS] = - { - "#8c4b41,da9041,ffffff", // light brown - "#06372b,489e25,fdedcc", // green - "#5f0b33,91191c,f9ad81", // dark red - "#602486,934cc3,fdc689", // purple - "#805e74,c6b09b,ffffff", // white - "#8c6625,dab425,ffffff", // yellow - "#1d2d6d,1594a3,fdedcc", // blue - "#831f2d,be4f2d,f8cc8b", // brown - "#432482,584bbc,dae8e5", // light blue - "#460850,611967,e7b4ae", // dark purple - "#8f3e21,bc522b,ff946c", // orange - "#9c6b84,d272a3,ffcae5", // pink - "#1d1d1d,414141,6f6f6f", // charcoal - "#525252,99999b,cacaca", // silver - "#841413,aa2829,ffaeb1", // light red - "#a82513,ffa525,ffffff", // strawberry blond - }; - - setSprite(HAIR_SPRITE, style * -1, colors[color]); + setSprite(HAIR_SPRITE, style * -1, ColorDB::get(color)); setAction(mAction); } |