diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-04-16 23:06:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-04-18 21:31:52 +0300 |
commit | 67d3b8c193b51bbf892fd965547746511e8ddf87 (patch) | |
tree | b11031d009c6df44263f0be9f01503fae2c09615 /src/resources/iteminfo.h | |
parent | 884c064f762c4d5ca23458ea43d9c34348259840 (diff) | |
download | manaverse-67d3b8c193b51bbf892fd965547746511e8ddf87.tar.gz manaverse-67d3b8c193b51bbf892fd965547746511e8ddf87.tar.bz2 manaverse-67d3b8c193b51bbf892fd965547746511e8ddf87.tar.xz manaverse-67d3b8c193b51bbf892fd965547746511e8ddf87.zip |
add delay to action sounds.
delay now unused.
Diffstat (limited to 'src/resources/iteminfo.h')
-rw-r--r-- | src/resources/iteminfo.h | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/resources/iteminfo.h b/src/resources/iteminfo.h index e5b6f96b8..12dbb3c03 100644 --- a/src/resources/iteminfo.h +++ b/src/resources/iteminfo.h @@ -26,18 +26,11 @@ #include "being.h" #include "resources/colordb.h" +#include "resources/soundinfo.h" #include <map> #include <set> -enum EquipmentSoundEvent -{ - // miss - EQUIP_EVENT_STRIKE = 0, - // hit - EQUIP_EVENT_HIT -}; - enum EquipmentSlot { // Equipment rules: @@ -215,11 +208,12 @@ class ItemInfo final void setAttackRange(const int r) { mAttackRange = r; } - void addSound(const EquipmentSoundEvent event, - const std::string &filename); + void addSound(const SoundEvent event, + const std::string &filename, + const int delay); - const std::string &getSound(const EquipmentSoundEvent event) - const A_WARN_UNUSED; + const SoundInfo &getSound(const SoundEvent event) + const A_WARN_UNUSED; int getDrawBefore(const int direction) const A_WARN_UNUSED; @@ -328,7 +322,7 @@ class ItemInfo final std::map <int, std::string> mAnimationFiles; /** Stores the names of sounds to be played at certain event. */ - std::map <EquipmentSoundEvent, StringVect> mSounds; + std::map <SoundEvent, SoundInfoVect> mSounds; std::map <int, int> mTags; const std::map <int, ColorDB::ItemColor> *mColors; std::string mColorList; |