summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-12-10 02:22:59 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-12-10 02:22:59 +0000
commite961be5bfd29ad3f44f948828981cb3ab07f25a7 (patch)
tree5464d14635191407eb24c7ad76b1b218b33016d2 /src/being.cpp
parent43b986ceffdb436d8850a876bd485c9a3eea8cdd (diff)
downloadmana-client-e961be5bfd29ad3f44f948828981cb3ab07f25a7.tar.gz
mana-client-e961be5bfd29ad3f44f948828981cb3ab07f25a7.tar.bz2
mana-client-e961be5bfd29ad3f44f948828981cb3ab07f25a7.tar.xz
mana-client-e961be5bfd29ad3f44f948828981cb3ab07f25a7.zip
Simplified player subsprite handling by treating equipment, hairstyle and base sprites alike. Implementing female hairstyles is now a purely content-sided task.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/being.cpp b/src/being.cpp
index a9dfa93c..a562389f 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -57,12 +57,13 @@ Being::Being(int id, int job, Map *map):
mDirection(DOWN),
mMap(NULL),
mEquippedWeapon(NULL),
- mHairStyle(0), mHairColor(0),
+ mHairStyle(1), mHairColor(0),
mGender(2),
mSpeechTime(0),
mPx(0), mPy(0),
mSprites(VECTOREND_SPRITE, NULL),
- mEquipmentSpriteIDs(VECTOREND_SPRITE, 0)
+ mSpriteIDs(VECTOREND_SPRITE, 0),
+ mSpriteColors(VECTOREND_SPRITE, "")
{
setMap(map);
@@ -134,9 +135,11 @@ Being::setHairStyle(int style, int color)
}
void
-Being::setVisibleEquipment(int slot, int id)
+Being::setSprite(int slot, int id, std::string color)
{
- mEquipmentSpriteIDs[slot] = id;
+ assert (slot >= BASE_SPRITE && slot < VECTOREND_SPRITE);
+ mSpriteIDs[slot] = id;
+ mSpriteColors[slot] = color;
}
void