RigsofRods
Soft-body Physics Simulation
Public Member Functions | Private Member Functions | Private Attributes
RoR::SoundScriptManager Class Reference

#include <SoundScriptManager.h>

+ Inheritance diagram for RoR::SoundScriptManager:
+ Collaboration diagram for RoR::SoundScriptManager:

Public Member Functions

 SoundScriptManager ()
 
 ~SoundScriptManager ()
 
const Ogre::StringVector & getScriptPatterns (void) const
 
void parseScript (Ogre::DataStreamPtr &stream, const Ogre::String &groupName)
 
Ogre::Real getLoadingOrder (void) const
 
SoundScriptInstancePtr createInstance (Ogre::String templatename, int actor_id, int soundLinkType=SL_DEFAULT, int soundLinkItemId=-1)
 
void removeInstance (const SoundScriptInstancePtr &ssi)
 
std::vector< SoundScriptInstancePtr > & getAllInstances ()
 
SoundScriptTemplatePtr getTemplate (Ogre::String name)
 
std::map< Ogre::String, SoundScriptTemplatePtr > & getAllTemplates ()
 
void trigOnce (int actor_id, int trig, int linkType=SL_DEFAULT, int linkItemID=-1)
 
void trigOnce (const ActorPtr &actor, int trig, int linkType=SL_DEFAULT, int linkItemID=-1)
 
void trigStart (int actor_id, int trig, int linkType=SL_DEFAULT, int linkItemID=-1)
 
void trigStart (const ActorPtr &actor, int trig, int linkType=SL_DEFAULT, int linkItemID=-1)
 
void trigStop (int actor_id, int trig, int linkType=SL_DEFAULT, int linkItemID=-1)
 
void trigStop (const ActorPtr &actor, int trig, int linkType=SL_DEFAULT, int linkItemID=-1)
 
void trigToggle (int actor_id, int trig, int linkType=SL_DEFAULT, int linkItemID=-1)
 
void trigToggle (const ActorPtr &actor, int trig, int linkType=SL_DEFAULT, int linkItemID=-1)
 
void trigKill (int actor_id, int trig, int linkType=SL_DEFAULT, int linkItemID=-1)
 
void trigKill (const ActorPtr &actor, int trig, int linkType=SL_DEFAULT, int linkItemID=-1)
 
bool getTrigState (int actor_id, int trig, int linkType=SL_DEFAULT, int linkItemID=-1)
 
bool getTrigState (const ActorPtr &actor, int trig, int linkType=SL_DEFAULT, int linkItemID=-1)
 
void modulate (int actor_id, int mod, float value, int linkType=SL_DEFAULT, int linkItemID=-1)
 
void modulate (const ActorPtr &actor, int mod, float value, int linkType=SL_DEFAULT, int linkItemID=-1)
 
void setEnabled (bool state)
 
void setCamera (Ogre::Vector3 position, Ogre::Vector3 direction, Ogre::Vector3 up, Ogre::Vector3 velocity)
 
void setLoadingBaseSounds (bool value)
 
bool isDisabled ()
 
void update (float dt_sec)
 
SoundManagergetSoundManager ()
 

Private Member Functions

SoundScriptTemplatePtr createTemplate (Ogre::String name, Ogre::String groupname, Ogre::String filename)
 
void skipToNextCloseBrace (Ogre::DataStreamPtr &chunk)
 
void skipToNextOpenBrace (Ogre::DataStreamPtr &chunk)
 

Private Attributes

bool disabled
 
bool loading_base
 
float max_distance
 
float reference_distance
 
float rolloff_factor
 
int instance_counter
 
Ogre::StringVector script_patterns
 
std::map< Ogre::String, SoundScriptTemplatePtrtemplates
 
std::vector< SoundScriptInstancePtrinstances
 
std::array< int, SS_MAX_TRIGfree_trigs
 
std::array< SoundScriptInstancePtr, SS_MAX_TRIG *MAX_INSTANCES_PER_GROUPtrigs
 
std::array< int, SS_MAX_MODfree_pitches
 
std::array< SoundScriptInstancePtr, SS_MAX_MOD *MAX_INSTANCES_PER_GROUPpitches
 
std::array< int, SS_MAX_MODfree_gains
 
std::array< SoundScriptInstancePtr, SS_MAX_MOD *MAX_INSTANCES_PER_GROUPgains
 
std::map< int, std::map< int, std::map< int, std::map< int, bool > > > > state_map
 
SoundManagersound_manager
 

Detailed Description

Definition at line 293 of file SoundScriptManager.h.

Constructor & Destructor Documentation

◆ SoundScriptManager()

SoundScriptManager::SoundScriptManager ( )

Definition at line 41 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:

◆ ~SoundScriptManager()

SoundScriptManager::~SoundScriptManager ( )

Definition at line 97 of file SoundScriptManager.cpp.

Member Function Documentation

◆ createInstance()

SoundScriptInstancePtr SoundScriptManager::createInstance ( Ogre::String  templatename,
int  actor_id,
int  soundLinkType = SL_DEFAULT,
int  soundLinkItemId = -1 
)

Definition at line 356 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createTemplate()

SoundScriptTemplatePtr SoundScriptManager::createTemplate ( Ogre::String  name,
Ogre::String  groupname,
Ogre::String  filename 
)
private

Definition at line 342 of file SoundScriptManager.cpp.

+ Here is the caller graph for this function:

◆ getAllInstances()

std::vector<SoundScriptInstancePtr>& RoR::SoundScriptManager::getAllInstances ( )
inline

Definition at line 307 of file SoundScriptManager.h.

◆ getAllTemplates()

std::map<Ogre::String, SoundScriptTemplatePtr>& RoR::SoundScriptManager::getAllTemplates ( )
inline

Definition at line 309 of file SoundScriptManager.h.

◆ getLoadingOrder()

Real SoundScriptManager::getLoadingOrder ( void  ) const

Definition at line 336 of file SoundScriptManager.cpp.

◆ getScriptPatterns()

const StringVector & SoundScriptManager::getScriptPatterns ( void  ) const

Definition at line 331 of file SoundScriptManager.cpp.

◆ getSoundManager()

SoundManager* RoR::SoundScriptManager::getSoundManager ( )
inline

Definition at line 336 of file SoundScriptManager.h.

+ Here is the caller graph for this function:

◆ getTemplate()

SoundScriptTemplatePtr RoR::SoundScriptManager::getTemplate ( Ogre::String  name)
inline

Definition at line 308 of file SoundScriptManager.h.

+ Here is the caller graph for this function:

◆ getTrigState() [1/2]

bool SoundScriptManager::getTrigState ( const ActorPtr actor,
int  trig,
int  linkType = SL_DEFAULT,
int  linkItemID = -1 
)

Definition at line 244 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:

◆ getTrigState() [2/2]

bool SoundScriptManager::getTrigState ( int  actor_id,
int  trig,
int  linkType = SL_DEFAULT,
int  linkItemID = -1 
)

Definition at line 255 of file SoundScriptManager.cpp.

+ Here is the caller graph for this function:

◆ isDisabled()

bool RoR::SoundScriptManager::isDisabled ( )
inline

Definition at line 332 of file SoundScriptManager.h.

◆ modulate() [1/2]

void SoundScriptManager::modulate ( const ActorPtr actor,
int  mod,
float  value,
int  linkType = SL_DEFAULT,
int  linkItemID = -1 
)

Definition at line 263 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:

◆ modulate() [2/2]

void SoundScriptManager::modulate ( int  actor_id,
int  mod,
float  value,
int  linkType = SL_DEFAULT,
int  linkItemID = -1 
)

Definition at line 274 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseScript()

void SoundScriptManager::parseScript ( Ogre::DataStreamPtr &  stream,
const Ogre::String &  groupName 
)

Definition at line 474 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:

◆ removeInstance()

void SoundScriptManager::removeInstance ( const SoundScriptInstancePtr ssi)

Definition at line 409 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCamera()

void SoundScriptManager::setCamera ( Ogre::Vector3  position,
Ogre::Vector3  direction,
Ogre::Vector3  up,
Ogre::Vector3  velocity 
)

Definition at line 324 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setEnabled()

void SoundScriptManager::setEnabled ( bool  state)

Definition at line 549 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:

◆ setLoadingBaseSounds()

void RoR::SoundScriptManager::setLoadingBaseSounds ( bool  value)
inline

Definition at line 330 of file SoundScriptManager.h.

+ Here is the caller graph for this function:

◆ skipToNextCloseBrace()

void SoundScriptManager::skipToNextCloseBrace ( Ogre::DataStreamPtr &  chunk)
private

Definition at line 529 of file SoundScriptManager.cpp.

+ Here is the caller graph for this function:

◆ skipToNextOpenBrace()

void SoundScriptManager::skipToNextOpenBrace ( Ogre::DataStreamPtr &  chunk)
private

Definition at line 539 of file SoundScriptManager.cpp.

+ Here is the caller graph for this function:

◆ trigKill() [1/2]

void SoundScriptManager::trigKill ( const ActorPtr actor,
int  trig,
int  linkType = SL_DEFAULT,
int  linkItemID = -1 
)

Definition at line 192 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:

◆ trigKill() [2/2]

void SoundScriptManager::trigKill ( int  actor_id,
int  trig,
int  linkType = SL_DEFAULT,
int  linkItemID = -1 
)

Definition at line 203 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ trigOnce() [1/2]

void SoundScriptManager::trigOnce ( const ActorPtr actor,
int  trig,
int  linkType = SL_DEFAULT,
int  linkItemID = -1 
)

Definition at line 103 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:

◆ trigOnce() [2/2]

void SoundScriptManager::trigOnce ( int  actor_id,
int  trig,
int  linkType = SL_DEFAULT,
int  linkItemID = -1 
)

Definition at line 114 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ trigStart() [1/2]

void SoundScriptManager::trigStart ( const ActorPtr actor,
int  trig,
int  linkType = SL_DEFAULT,
int  linkItemID = -1 
)

Definition at line 131 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:

◆ trigStart() [2/2]

void SoundScriptManager::trigStart ( int  actor_id,
int  trig,
int  linkType = SL_DEFAULT,
int  linkItemID = -1 
)

Definition at line 142 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ trigStop() [1/2]

void SoundScriptManager::trigStop ( const ActorPtr actor,
int  trig,
int  linkType = SL_DEFAULT,
int  linkItemID = -1 
)

Definition at line 162 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:

◆ trigStop() [2/2]

void SoundScriptManager::trigStop ( int  actor_id,
int  trig,
int  linkType = SL_DEFAULT,
int  linkItemID = -1 
)

Definition at line 173 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ trigToggle() [1/2]

void SoundScriptManager::trigToggle ( const ActorPtr actor,
int  trig,
int  linkType = SL_DEFAULT,
int  linkItemID = -1 
)

Definition at line 222 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:

◆ trigToggle() [2/2]

void SoundScriptManager::trigToggle ( int  actor_id,
int  trig,
int  linkType = SL_DEFAULT,
int  linkItemID = -1 
)

Definition at line 233 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

void SoundScriptManager::update ( float  dt_sec)

Definition at line 308 of file SoundScriptManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ disabled

bool RoR::SoundScriptManager::disabled
private

Definition at line 344 of file SoundScriptManager.h.

◆ free_gains

std::array<int, SS_MAX_MOD> RoR::SoundScriptManager::free_gains
private

Definition at line 362 of file SoundScriptManager.h.

◆ free_pitches

std::array<int, SS_MAX_MOD> RoR::SoundScriptManager::free_pitches
private

Definition at line 359 of file SoundScriptManager.h.

◆ free_trigs

std::array<int, SS_MAX_TRIG> RoR::SoundScriptManager::free_trigs
private

Definition at line 356 of file SoundScriptManager.h.

◆ gains

std::array<SoundScriptInstancePtr, SS_MAX_MOD* MAX_INSTANCES_PER_GROUP> RoR::SoundScriptManager::gains
private

Definition at line 363 of file SoundScriptManager.h.

◆ instance_counter

int RoR::SoundScriptManager::instance_counter
private

Definition at line 349 of file SoundScriptManager.h.

◆ instances

std::vector<SoundScriptInstancePtr> RoR::SoundScriptManager::instances
private

Definition at line 353 of file SoundScriptManager.h.

◆ loading_base

bool RoR::SoundScriptManager::loading_base
private

Definition at line 345 of file SoundScriptManager.h.

◆ max_distance

float RoR::SoundScriptManager::max_distance
private

Definition at line 346 of file SoundScriptManager.h.

◆ pitches

std::array<SoundScriptInstancePtr, SS_MAX_MOD* MAX_INSTANCES_PER_GROUP> RoR::SoundScriptManager::pitches
private

Definition at line 360 of file SoundScriptManager.h.

◆ reference_distance

float RoR::SoundScriptManager::reference_distance
private

Definition at line 347 of file SoundScriptManager.h.

◆ rolloff_factor

float RoR::SoundScriptManager::rolloff_factor
private

Definition at line 348 of file SoundScriptManager.h.

◆ script_patterns

Ogre::StringVector RoR::SoundScriptManager::script_patterns
private

Definition at line 350 of file SoundScriptManager.h.

◆ sound_manager

SoundManager* RoR::SoundScriptManager::sound_manager
private

Definition at line 369 of file SoundScriptManager.h.

◆ state_map

std::map<int, std::map <int, std::map <int, std::map <int, bool > > > > RoR::SoundScriptManager::state_map
private

Definition at line 367 of file SoundScriptManager.h.

◆ templates

std::map<Ogre::String, SoundScriptTemplatePtr> RoR::SoundScriptManager::templates
private

Definition at line 352 of file SoundScriptManager.h.

◆ trigs

std::array<SoundScriptInstancePtr, SS_MAX_TRIG* MAX_INSTANCES_PER_GROUP> RoR::SoundScriptManager::trigs
private

Definition at line 357 of file SoundScriptManager.h.


The documentation for this class was generated from the following files: