summaryrefslogtreecommitdiff
path: root/src/being.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-11-20 10:50:00 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-11-20 10:50:00 +0000
commit5a7abdafdac8f6ddd7972cadbc7e20563a0a29fc (patch)
tree95684590a32266b28f046475cfa1926c99f67e52 /src/being.h
parentcf36850d2bdda67cb472d938ed58053a92fa6935 (diff)
downloadmana-5a7abdafdac8f6ddd7972cadbc7e20563a0a29fc.tar.gz
mana-5a7abdafdac8f6ddd7972cadbc7e20563a0a29fc.tar.bz2
mana-5a7abdafdac8f6ddd7972cadbc7e20563a0a29fc.tar.xz
mana-5a7abdafdac8f6ddd7972cadbc7e20563a0a29fc.zip
Merged revisions 3629-3630 via svnmerge from
https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/trunk (but kept looks in Being class, since eAthena works that way) ........ r3629 | gmelquio | 2007-10-18 21:00:38 +0200 (Thu, 18 Oct 2007) | 1 line Removed player looks from generic beings. Prevented client termination on missing sprites. Merged weapon-type and attack-type fields for items. ........ r3630 | gmelquio | 2007-10-18 21:30:57 +0200 (Thu, 18 Oct 2007) | 1 line Fixed changelog message. ........
Diffstat (limited to 'src/being.h')
-rw-r--r--src/being.h40
1 files changed, 21 insertions, 19 deletions
diff --git a/src/being.h b/src/being.h
index ff65bbef..6c123377 100644
--- a/src/being.h
+++ b/src/being.h
@@ -68,12 +68,14 @@ class Being : public Sprite
public:
enum Type {
UNKNOWN,
- LOCALPLAYER,
PLAYER,
NPC,
MONSTER
};
+ /**
+ * Action the being is currently performing.
+ */
enum Action {
STAND,
WALK,
@@ -123,7 +125,7 @@ class Being : public Sprite
/**
* Constructor.
*/
- Being(Uint32 id, Uint16 job, Map *map);
+ Being(int id, int job, Map *map);
/**
* Destructor.
@@ -175,7 +177,7 @@ class Being : public Sprite
/**
* Sets the name for the being.
*
- * @param text The name that should appear.
+ * @param name The name that should appear.
*/
void
setName(const std::string &name) { mName = name; }
@@ -208,19 +210,19 @@ class Being : public Sprite
* Sets visible equipments for this being.
*/
virtual void
- setVisibleEquipment(Uint8 slot, int id);
+ setVisibleEquipment(int slot, int id);
/**
- * Sets the sex for this being.
+ * Sets the gender of this being.
*/
virtual void
- setSex(Uint8 sex) { mSex = sex; }
+ setGender(int gender) { mGender = gender; }
/**
- * Gets the sex for this being.
+ * Gets the gender of this being.
*/
- Uint8
- getSex() const { return mSex; }
+ int
+ getGender() const { return mGender; }
/**
* Makes this being take the next step of his path.
@@ -308,7 +310,7 @@ class Being : public Sprite
* @see Sprite::draw(Graphics, int, int)
*/
virtual void
- draw(Graphics *graphics, Sint32 offsetX, Sint32 offsetY) const;
+ draw(Graphics *graphics, int offsetX, int offsetY) const;
/**
* Returns the pixel X coordinate.
@@ -354,13 +356,13 @@ class Being : public Sprite
virtual Being::TargetCursorSize getTargetCursorSize() const
{ return TC_MEDIUM; }
- std::auto_ptr<Equipment> mEquipment;
-
/**
* Take control of a particle.
*/
void controlParticle(Particle *particle);
+ std::auto_ptr<Equipment> mEquipment;
+
protected:
/**
* Sets the new path for this being.
@@ -368,12 +370,6 @@ class Being : public Sprite
void setPath(const Path &path);
/**
- * Calculates the offset in the given directions.
- * If walking in direction 'neg' the value is negated.
- */
- int getOffset(char pos, char neg) const;
-
- /**
* Returns the sprite direction of this being.
*/
SpriteDirection getSpriteDirection() const;
@@ -391,7 +387,7 @@ class Being : public Sprite
Path mPath;
std::string mSpeech;
Uint16 mHairStyle, mHairColor;
- Uint8 mSex;
+ Uint8 mGender;
Uint32 mSpeechTime;
Sint32 mPx, mPy; /**< Pixel coordinates */
@@ -400,6 +396,12 @@ class Being : public Sprite
std::list<Particle *> mChildParticleEffects;
private:
+ /**
+ * Calculates the offset in the given directions.
+ * If walking in direction 'neg' the value is negated.
+ */
+ int getOffset(char pos, char neg) const;
+
static int instances; /**< Number of Being instances */
static ImageSet *emotionSet; /**< Emoticons used by beings */
};