diff options
author | Fate <fate.tmw@googlemail.com> | 2008-11-01 23:45:48 +0000 |
---|---|---|
committer | Fate <fate.tmw@googlemail.com> | 2008-11-01 23:45:48 +0000 |
commit | 8f1bf397990729c3a807bbbe0b643bc97446c923 (patch) | |
tree | b2a531da277eeb9b48d3f0342dd96a4963b275d1 /src/gui/char_select.cpp | |
parent | 4cfdb3620ccbd0de6bd53c5f22e7b6d3801627bf (diff) | |
download | mana-8f1bf397990729c3a807bbbe0b643bc97446c923.tar.gz mana-8f1bf397990729c3a807bbbe0b643bc97446c923.tar.bz2 mana-8f1bf397990729c3a807bbbe0b643bc97446c923.tar.xz mana-8f1bf397990729c3a807bbbe0b643bc97446c923.zip |
* Use hair.xml to determine hair colours (#514)
* Auto-detect number of hair styles available (#514)
Diffstat (limited to 'src/gui/char_select.cpp')
-rw-r--r-- | src/gui/char_select.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index 8ab3b879..661a9fa7 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -256,7 +256,7 @@ CharCreateDialog::CharCreateDialog(Window *parent, int slot, Network *network, { mPlayer = new Player(0, 0, NULL); mPlayer->setGender(gender); - mPlayer->setHairStyle(rand() % NR_HAIR_STYLES, rand() % NR_HAIR_COLORS); + mPlayer->setHairStyle(rand() % Being::getHairStylesNr(), rand() % Being::getHairColorsNr()); mNameField = new TextField(""); mNameLabel = new gcn::Label("Name:"); @@ -340,13 +340,13 @@ CharCreateDialog::action(const gcn::ActionEvent &event) mPlayer->setHairStyle(-1, mPlayer->getHairColor() + 1); } else if (event.getId() == "prevcolor") { - mPlayer->setHairStyle(-1, mPlayer->getHairColor() + NR_HAIR_COLORS - 1); + mPlayer->setHairStyle(-1, mPlayer->getHairColor() + Being::getHairColorsNr() - 1); } else if (event.getId() == "nextstyle") { mPlayer->setHairStyle(mPlayer->getHairStyle() + 1, -1); } else if (event.getId() == "prevstyle") { - mPlayer->setHairStyle(mPlayer->getHairStyle() + NR_HAIR_STYLES - 1, -1); + mPlayer->setHairStyle(mPlayer->getHairStyle() + Being::getHairStylesNr() - 1, -1); } } |