2020-06-28 13:12:42 +02:00
|
|
|
#ifndef GAME_SOUND_REGIONSOUNDSELECTOR_H
|
|
|
|
#define GAME_SOUND_REGIONSOUNDSELECTOR_H
|
|
|
|
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace MWBase
|
|
|
|
{
|
|
|
|
class World;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace MWSound
|
|
|
|
{
|
|
|
|
class RegionSoundSelector
|
|
|
|
{
|
|
|
|
public:
|
2020-10-25 00:33:41 +02:00
|
|
|
std::optional<std::string> getNextRandom(float duration, const std::string& regionName,
|
2020-06-28 13:12:42 +02:00
|
|
|
const MWBase::World& world);
|
|
|
|
|
|
|
|
private:
|
|
|
|
float mTimeToNextEnvSound = 0.0f;
|
|
|
|
int mSumChance = 0;
|
|
|
|
std::string mLastRegionName;
|
|
|
|
float mTimePassed = 0.0;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|