summaryrefslogtreecommitdiff
path: root/src/gui/playerbox.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2006-03-05 22:33:09 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2006-03-05 22:33:09 +0000
commit5f9bbd205fec7d66643861a5204c6cc7dec639ba (patch)
treead21b3432c3cafb10a9e4a7d32b600cebe74d92c /src/gui/playerbox.cpp
parenta74208583e806fcfdc485428fb4f9e694e962455 (diff)
downloadmana-5f9bbd205fec7d66643861a5204c6cc7dec639ba.tar.gz
mana-5f9bbd205fec7d66643861a5204c6cc7dec639ba.tar.bz2
mana-5f9bbd205fec7d66643861a5204c6cc7dec639ba.tar.xz
mana-5f9bbd205fec7d66643861a5204c6cc7dec639ba.zip
Merged new_playerset branch into trunk.
Diffstat (limited to 'src/gui/playerbox.cpp')
-rw-r--r--src/gui/playerbox.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/playerbox.cpp b/src/gui/playerbox.cpp
index b1414ef8..6423b8c4 100644
--- a/src/gui/playerbox.cpp
+++ b/src/gui/playerbox.cpp
@@ -32,7 +32,8 @@
#include "../resources/image.h"
#include "../resources/resourcemanager.h"
-extern Spriteset *hairset, *playerset;
+extern std::vector<Spriteset *> hairset;
+extern Spriteset *playerset;
int PlayerBox::instances = 0;
ImageRect PlayerBox::background;
@@ -89,16 +90,16 @@ void PlayerBox::draw(gcn::Graphics *graphics)
// Draw character
dynamic_cast<Graphics*>(graphics)->drawImage(
- playerset->spriteset[0], 23, 23);
+ playerset->spriteset[0], 23, 12);
// Draw his hair
if (hairColor >= 0 && hairStyle >= 0 &&
hairColor < NR_HAIR_COLORS && hairStyle < NR_HAIR_STYLES)
{
- int hf = hairColor + 40 * (hairStyle);
- if (hf >= 0 && hf < (int)hairset->spriteset.size()) {
+ int hf = 9 * hairColor;
+ if (hf >= 0 && hf < (int)hairset[hairStyle]->spriteset.size()) {
dynamic_cast<Graphics*>(graphics)->drawImage(
- hairset->spriteset[hf], 37, 5);
+ hairset[hairStyle]->spriteset[hf], 35, 7);
}
}
}