diff options
author | Fate <fate-tmw@googlemail.com> | 2008-12-06 12:20:16 -0700 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2008-12-06 12:20:16 -0700 |
commit | 704f58c9033599c871c176df68ffe7ac3bc8c969 (patch) | |
tree | e77f4e40ada9df44e49aab752a62fb5a503907e0 /src/being.h | |
parent | 9559fdb347054e945940980efdbbe83615ce9733 (diff) | |
download | mana-704f58c9033599c871c176df68ffe7ac3bc8c969.tar.gz mana-704f58c9033599c871c176df68ffe7ac3bc8c969.tar.bz2 mana-704f58c9033599c871c176df68ffe7ac3bc8c969.tar.xz mana-704f58c9033599c871c176df68ffe7ac3bc8c969.zip |
Added particle containers and refactored beings to use them (to clean up responsibilities a little)
Diffstat (limited to 'src/being.h')
-rw-r--r-- | src/being.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/being.h b/src/being.h index 0dbc41db..568d51c7 100644 --- a/src/being.h +++ b/src/being.h @@ -26,13 +26,15 @@ #include <memory> #include <string> #include <SDL_types.h> -#include <vector> +#include <bitset> #include "sprite.h" #include "map.h" #include "animatedsprite.h" +#include "particlecontainer.h" #define FIRST_IGNORE_EMOTE 14 +#define STATUS_EFFECTS 32 class AnimatedSprite; class Equipment; @@ -405,6 +407,8 @@ class Being : public Sprite std::string mName; /**< Name of character */ SpriteIterator mSpriteIterator; + typedef std::bitset<STATUS_EFFECTS> StatusEffects; + /** Engine-related infos about weapon. */ const ItemInfo* mEquippedWeapon; @@ -414,11 +418,15 @@ class Being : public Sprite Uint8 mGender; Uint32 mSpeechTime; Sint32 mPx, mPy; /**< Pixel coordinates */ + Uint16 mStunMode; /**< Stun mode; zero if not stunned */ + StatusEffects mStatusEffects; /**< Bitset of active status effects */ std::vector<AnimatedSprite*> mSprites; std::vector<int> mSpriteIDs; std::vector<std::string> mSpriteColors; - std::list<Particle *> mChildParticleEffects; + ParticleContainer mStunParticleEffects; + ParticleVector mStatusParticleEffects; + ParticleContainer mChildParticleEffects; private: /** |