mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Implement configurable object sounds: ambient, visit and removal
* If there more than one sound for visit or removal random is played * At moment only the first ambient sound will be used
This commit is contained in:
committed by
DJWarmonger
parent
e9bfbb70c1
commit
f15cadc87b
@@ -1043,5 +1043,20 @@ public:
|
||||
sound_after_last
|
||||
};
|
||||
#undef VCMI_SOUND_NAME
|
||||
#define VCMI_SOUND_NAME(sequence) sounds.push_back("" #sequence "");
|
||||
|
||||
static std::vector<std::string> & stringsList()
|
||||
{
|
||||
static std::vector<std::string> sounds;
|
||||
if(!sounds.size())
|
||||
{
|
||||
sounds.push_back("invalid");
|
||||
sounds.push_back("sound_todo");
|
||||
VCMI_SOUND_LIST
|
||||
sounds.push_back("sound_after_last");
|
||||
}
|
||||
return sounds;
|
||||
}
|
||||
#undef VCMI_SOUND_FILE
|
||||
#undef VCMI_SOUND_NAME
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user