diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-05-02 14:43:40 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-05-06 22:21:57 -0600 |
commit | 9baedc27191c82bbf1fedee2a7e738bc5b267c0e (patch) | |
tree | f0986c6839d1e79b402d5d4ec36e4994741955ea /src/resources/monsterinfo.h | |
parent | 844e9a7a72faca6a212e788a3adc45e17f41dca6 (diff) | |
download | mana-client-9baedc27191c82bbf1fedee2a7e738bc5b267c0e.tar.gz mana-client-9baedc27191c82bbf1fedee2a7e738bc5b267c0e.tar.bz2 mana-client-9baedc27191c82bbf1fedee2a7e738bc5b267c0e.tar.xz mana-client-9baedc27191c82bbf1fedee2a7e738bc5b267c0e.zip |
Add support for floor item sprites
This commit adds a sprite hierarchy (Sprite->ImageSprite,AnimatedSprite,CompundSprite;
CompoundSprite,Actor->ActorSprite;ActorSprite->Being,FloorItem) to collect common
functionailty into new base classes which will make other Mantis tickets easier to do.
Also allows monsters to use particle effects.
Reviewed-by: Bertram
Diffstat (limited to 'src/resources/monsterinfo.h')
-rw-r--r-- | src/resources/monsterinfo.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/resources/monsterinfo.h b/src/resources/monsterinfo.h index f074254a..7741f762 100644 --- a/src/resources/monsterinfo.h +++ b/src/resources/monsterinfo.h @@ -24,6 +24,8 @@ #include "being.h" +#include "resources/spritedef.h" + #include <list> #include <map> #include <string> @@ -59,23 +61,21 @@ class MonsterInfo void setName(const std::string &name) { mName = name; } - void addSprite(const std::string &filename) - { mSprites.push_back(filename); } + void setDisplay(SpriteDisplay display) + { mDisplay = display; } + + const SpriteDisplay &getDisplay() const + { return mDisplay; } void setTargetCursorSize(Being::TargetCursorSize targetCursorSize) { mTargetCursorSize = targetCursorSize; } void addSound(MonsterSoundEvent event, const std::string &filename); - void addParticleEffect(const std::string &filename); - const std::string &getName() const { return mName; } - const std::list<std::string>& getSprites() const - { return mSprites; } - - Being::TargetCursorSize getTargetCursorSize() const + ActorSprite::TargetCursorSize getTargetCursorSize() const { return mTargetCursorSize; } const std::string &getSound(MonsterSoundEvent event) const; @@ -91,16 +91,12 @@ class MonsterInfo SpriteAction getAttackAction(int attackType) const; - const std::list<std::string>& getParticleEffects() const - { return mParticleEffects; } - private: + SpriteDisplay mDisplay; std::string mName; - std::list<std::string> mSprites; Being::TargetCursorSize mTargetCursorSize; std::map<MonsterSoundEvent, std::vector<std::string>* > mSounds; std::map<int, MonsterAttack*> mMonsterAttacks; - std::list<std::string> mParticleEffects; }; #endif // MONSTERINFO_H |