Changeset View
Changeset View
Standalone View
Standalone View
source/soundmanager/scripting/SoundGroup.h
/* Copyright (C) 2019 Wildfire Games. | /* Copyright (C) 2020 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | private: | ||||
void SetGain(float gain); | void SetGain(float gain); | ||||
void UploadPropertiesAndPlay(size_t theIndex, const CVector3D& position, entity_id_t source); | void UploadPropertiesAndPlay(size_t theIndex, 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; | |||||
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 | ||||
std::vector<CSoundData*> m_SoundGroups; | std::vector<CSoundData*> m_SoundGroups; | ||||
#endif | #endif | ||||
u32 m_Seed; | |||||
// We need the filenames so we can reload when necessary. | // We need the filenames so we can reload when necessary. | ||||
std::vector<std::wstring> m_Filenames; | std::vector<std::wstring> m_Filenames; | ||||
// The file path for the list of sound file resources | // The file path for the list of sound file resources | ||||
VfsPath m_Filepath; | VfsPath m_Filepath; | ||||
size_t m_CurrentSoundIndex; | size_t m_CurrentSoundIndex; | ||||
float m_ConeInnerAngle; | float m_ConeInnerAngle; | ||||
float m_ConeOuterAngle; | float m_ConeOuterAngle; | ||||
float m_ConeOuterGain; | float m_ConeOuterGain; | ||||
Show All 17 Lines |
Wildfire Games · Phabricator