summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-04-19 12:27:11 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-04-19 12:27:11 +0000
commit4f92acafbe35fb0ad9d5d0e03b3cbbf7967a7019 (patch)
tree9e0a31b30f08b5d54444c74527f5ce1a3bdfb5d6 /src/being.cpp
parent7a92c4c076cefc2463347190f50b9bddf8d4ef6b (diff)
downloadmana-4f92acafbe35fb0ad9d5d0e03b3cbbf7967a7019.tar.gz
mana-4f92acafbe35fb0ad9d5d0e03b3cbbf7967a7019.tar.bz2
mana-4f92acafbe35fb0ad9d5d0e03b3cbbf7967a7019.tar.xz
mana-4f92acafbe35fb0ad9d5d0e03b3cbbf7967a7019.zip
Improving hair management
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 70259cf3..1b2e595c 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -146,7 +146,7 @@ Being::Being():
speed(150),
emotion(0), emotion_time(0),
text_x(0), text_y(0),
- hair_style(1), hair_color(1),
+ hairStyle(1), hairColor(1),
weapon(0),
speech_time(0),
damage_time(0),
@@ -173,12 +173,30 @@ void Being::setPath(std::list<PATH_NODE> path)
void Being::setHairColor(int color)
{
- hair_color = color;
+ hairColor = color;
+ if (hairColor < 1 || hairColor > 11)
+ {
+ hairColor = 1;
+ }
}
void Being::setHairStyle(int style)
{
- hair_style = style;
+ hairStyle = style;
+ if (hairStyle < 1 || hairStyle > 2)
+ {
+ hairStyle = 1;
+ }
+}
+
+unsigned short Being::getHairColor()
+{
+ return hairColor;
+}
+
+unsigned short Being::getHairStyle()
+{
+ return hairStyle;
}
void Being::setSpeech(const std::string &text, int time)