Changeset View
Changeset View
Standalone View
Standalone View
source/soundmanager/scripting/SoundGroup.h
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | public: | ||||
// (ignored if the eOmnipresent flag is set) | // (ignored if the eOmnipresent flag is set) | ||||
void PlayNext(const CVector3D& position, entity_id_t source); | void PlayNext(const CVector3D& position, entity_id_t source); | ||||
float RadiansOffCenter(const CVector3D& position, bool& onScreen, float& itemRollOff); | float RadiansOffCenter(const CVector3D& position, bool& onScreen, float& itemRollOff); | ||||
// Load a group | // Load a group | ||||
bool LoadSoundGroup(const VfsPath& pathnameXML); | bool LoadSoundGroup(const VfsPath& pathnameXML); | ||||
CSoundData* CSoundGroup::GetRandomSound(); | |||||
void Reload(); | void Reload(); | ||||
float GetGain() const; | |||||
// Release all remaining loaded handles | // Release all remaining loaded handles | ||||
void ReleaseGroup(); | void ReleaseGroup(); | ||||
// Update SoundGroup, remove dead sounds from intensity count | // Update SoundGroup, remove dead sounds from intensity count | ||||
void Update(float TimeSinceLastFrame); | void Update(float TimeSinceLastFrame); | ||||
// Set a flag using a value from eSndGrpFlags | // Set a flag using a value from eSndGrpFlags | ||||
inline void SetFlag(int flag) { m_Flags = (unsigned char)(m_Flags | flag); } | inline void SetFlag(int flag) { m_Flags = (unsigned char)(m_Flags | flag); } | ||||
// Test flag, returns true if flag is set. | // Test flag, returns true if flag is set. | ||||
inline bool TestFlag(int flag) { return (m_Flags & flag) != 0; } | inline bool TestFlag(int flag) { return (m_Flags & flag) != 0; } | ||||
private: | private: | ||||
void SetGain(float gain); | void SetGain(float gain); | ||||
void UploadPropertiesAndPlay(size_t theIndex, const CVector3D& position, entity_id_t source); | void UploadPropertiesAndPlay(const CVector3D& position, entity_id_t source); | ||||
void SetDefaultValues(); | void SetDefaultValues(); | ||||
#if CONFIG2_AUDIO | #if CONFIG2_AUDIO | ||||
inline u32 FastRand(); | inline u32 FastRand(); | ||||
// Contains the current sound seed for the generator | // Contains the current sound seed for the generator | ||||
u32 m_Seed; | u32 m_Seed; | ||||
float RandFloat(float min, float max); | float RandFloat(float min, float max); | ||||
// We store the handles so we can load now and play later | // We store the handles so we can load now and play later | ||||
Show All 27 Lines |
Wildfire Games · Phabricator