From 67d3b8c193b51bbf892fd965547746511e8ddf87 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 16 Apr 2013 23:06:58 +0300 Subject: add delay to action sounds. delay now unused. --- src/resources/iteminfo.h | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'src/resources/iteminfo.h') 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 #include -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 mAnimationFiles; /** Stores the names of sounds to be played at certain event. */ - std::map mSounds; + std::map mSounds; std::map mTags; const std::map *mColors; std::string mColorList; -- cgit v1.2.3-60-g2f50