summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-03 01:25:21 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-03 01:25:21 +0200
commit22f79fd0d623c8e11994905534f53da267e22935 (patch)
tree04403929ca80f47253f8dd523a29489c0fd30162 /src/gui
parent582428edf9e40db0d1ed7b78222562a7a5031fe4 (diff)
downloadmv-22f79fd0d623c8e11994905534f53da267e22935.tar.gz
mv-22f79fd0d623c8e11994905534f53da267e22935.tar.bz2
mv-22f79fd0d623c8e11994905534f53da267e22935.tar.xz
mv-22f79fd0d623c8e11994905534f53da267e22935.zip
Dehardcode item colors. Now reading all from configs.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/charcreatedialog.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/charcreatedialog.cpp b/src/gui/charcreatedialog.cpp
index dff591dd9..ae4401572 100644
--- a/src/gui/charcreatedialog.cpp
+++ b/src/gui/charcreatedialog.cpp
@@ -58,7 +58,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *parent, int slot):
mPlayer = new Being(0, ActorSprite::PLAYER, 0, NULL);
mPlayer->setGender(GENDER_MALE);
- int numberOfHairColors = ColorDB::size();
+ int numberOfHairColors = ColorDB::getHairSize();
mHairStyle = rand() % mPlayer->getNumOfHairstyles();
mHairColor = rand() % numberOfHairColors;
@@ -364,10 +364,10 @@ void CharCreateDialog::updateHair()
if (mHairStyle < 0)
mHairStyle += Being::getNumOfHairstyles();
- mHairColor %= ColorDB::size();
+ mHairColor %= ColorDB::getHairSize();
if (mHairColor < 0)
- mHairColor += ColorDB::size();
+ mHairColor += ColorDB::getHairSize();
mPlayer->setSprite(Net::getCharHandler()->hairSprite(),
- mHairStyle * -1, ColorDB::get(mHairColor));
+ mHairStyle * -1, ColorDB::getHairColor(mHairColor));
}