From 928fcf801f53d44d8b31b4285052a067340ab4ff Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Thu, 30 Aug 2007 16:46:21 +0000 Subject: Merged equipment database with items database and got rid of the unused item art attribute. Removed the now unnecessary multiplication of weapon IDs with 10000. Added a fallback item icon and used it for unknown items or when an item image fails to load. --- src/being.h | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/being.h') diff --git a/src/being.h b/src/being.h index 7ba1ec88..5914014b 100644 --- a/src/being.h +++ b/src/being.h @@ -38,7 +38,7 @@ class AnimatedSprite; class Equipment; -class EquipmentInfo; +class ItemInfo; class Item; class Map; class Graphics; @@ -349,26 +349,23 @@ class Being : public Sprite getHeight() const; /** - * Returns the required size of a target cursor for this being + * Returns the required size of a target cursor for this being. */ - virtual Being::TargetCursorSize - getTargetCursorSize() const + virtual Being::TargetCursorSize getTargetCursorSize() const { return TC_MEDIUM; } std::auto_ptr mEquipment; /** - * Take control of a particle + * Take control of a particle. */ - void - controlParticle(Particle *particle); + void controlParticle(Particle *particle); protected: /** * Sets the new path for this being. */ - void - setPath(const Path &path); + void setPath(const Path &path); /** * Calculates the offset in the given directions. @@ -379,8 +376,7 @@ class Being : public Sprite /** * Returns the sprite direction of this being. */ - SpriteDirection - getSpriteDirection() const; + SpriteDirection getSpriteDirection() const; Uint32 mId; /**< Unique sprite id */ Uint16 mWalkSpeed; /**< Walking speed */ @@ -389,7 +385,8 @@ class Being : public Sprite std::string mName; /**< Name of character */ SpriteIterator mSpriteIterator; - EquipmentInfo* mEquippedWeapon; /**< Engine-related infos about weapon */ + /** Engine-related infos about weapon. */ + const ItemInfo* mEquippedWeapon; Path mPath; std::string mSpeech; -- cgit v1.2.3-70-g09d2