Planeshift
|
work in progress - Looks like a mishap. More...
#include <pssoundsector.h>
Public Member Functions | |
void | AddAmbient (csRef< iDocumentNode > Node) |
void | AddEmitter (csRef< iDocumentNode > Node) |
Adds one emitter from the current array of known emitters. | |
void | AddEntityDefinition (csRef< iDocumentNode > entityNode) |
Loads an ENTITY entry from an xml file and generates an entity sound definition. | |
void | AddMusic (csRef< iDocumentNode > Node) |
void | AddObjectEntity (iMeshWrapper *mesh, const char *meshName) |
Adds an object entity to be managed from the sector. | |
void | Delete () |
void | DeleteAmbient (psMusic *&ambient) |
void | DeleteEmitter (psEmitter *&emitter) |
Deletes one emitter from the current array of known emitters. | |
void | DeleteEntity (psEntity *&entity) |
void | DeleteMusic (psMusic *&music) |
void | Load (csRef< iDocumentNode > sectorNode) |
Loads the sector's definition from the given node. | |
psSoundSector (iObjectRegistry *objectReg) | |
Create an empty psSoundSector with no musics, ambients, emitters and entities. | |
psSoundSector (csRef< iDocumentNode > sectorNode, iObjectRegistry *objectReg) | |
Creates a sound sector and loads its definition. | |
void | Reload (csRef< iDocumentNode > sector) |
void | RemoveObjectEntity (iMeshWrapper *mesh, const char *meshName) |
Removes an object entity managed from the sector. | |
void | SetEntityState (int state, iMeshWrapper *mesh, const char *actorName, bool forceChange) |
Sets the new state for the entity associated to the given mesh. | |
void | UpdateAllEmitters (SoundControl *&ctrl) |
Start/stops all emitters based on distance and time of the day. | |
void | UpdateAllEntities (SoundControl *&ctrl) |
Update all entities times, and based on their status generate a sound. | |
void | UpdateAmbient (int type, SoundControl *&ctrl) |
void | UpdateEntity (iMeshWrapper *mesh, const char *meshName, SoundControl *&ctrl) |
Updates an object entity managed from the sector. | |
void | UpdateMusic (bool loopToggle, int type, SoundControl *&ctrl) |
~psSoundSector () | |
Destructor. | |
Public Attributes | |
bool | active |
is this sector active? | |
psMusic * | activeambient |
active ambient music | |
psMusic * | activemusic |
active music | |
csArray< psMusic * > | ambientarray |
array of available ambients | |
csArray< psEmitter * > | emitterarray |
array of emitters | |
csHash< psEntity *, csString > | factories |
hash of factory entities | |
csHash< psEntity *, csString > | meshes |
hash of mesh entities | |
csArray< psMusic * > | musicarray |
array of available musics | |
csString | name |
name of this sector | |
csHash< psEntity *, uint > | tempEntities |
hash of all the temporary psEntites (i.e. associated to a specific mesh) |
work in progress - Looks like a mishap.
I hope find a object where i can merge this into
Definition at line 48 of file pssoundsector.h.
psSoundSector::psSoundSector | ( | iObjectRegistry * | objectReg | ) |
Create an empty psSoundSector with no musics, ambients, emitters and entities.
objectReg | the object registry. |
psSoundSector::psSoundSector | ( | csRef< iDocumentNode > | sectorNode, |
iObjectRegistry * | objectReg | ||
) |
Creates a sound sector and loads its definition.
This is exactly identical to calling the normal constructor and then Load().
objectReg | the object registry. |
sectorNode | iDocumentNode that contains the sector's definition. |
psSoundSector::~psSoundSector | ( | ) |
Destructor.
Cleans all arrays
void psSoundSector::AddAmbient | ( | csRef< iDocumentNode > | Node | ) |
void psSoundSector::AddEmitter | ( | csRef< iDocumentNode > | Node | ) |
Adds one emitter from the current array of known emitters.
ctrl | The sound control to be used to handle the update. |
void psSoundSector::AddEntityDefinition | ( | csRef< iDocumentNode > | entityNode | ) |
Loads an ENTITY entry from an xml file and generates an entity sound definition.
entityNode | xml node to load |
void psSoundSector::AddMusic | ( | csRef< iDocumentNode > | Node | ) |
void psSoundSector::AddObjectEntity | ( | iMeshWrapper * | mesh, |
const char * | meshName | ||
) |
Adds an object entity to be managed from the sector.
mesh | The mesh associated to the entity. |
meshName | the name associated to the entity. |
void psSoundSector::Delete | ( | ) |
void psSoundSector::DeleteAmbient | ( | psMusic *& | ambient | ) |
void psSoundSector::DeleteEmitter | ( | psEmitter *& | emitter | ) |
Deletes one emitter from the current array of known emitters.
ctrl | The sound control to be used to handle the update. |
void psSoundSector::DeleteEntity | ( | psEntity *& | entity | ) |
void psSoundSector::DeleteMusic | ( | psMusic *& | music | ) |
void psSoundSector::Load | ( | csRef< iDocumentNode > | sectorNode | ) |
Loads the sector's definition from the given node.
This does not delete the previous data so, if called twice, the new definition is "appended" to the old one.
sectorNode | the node containing the sector's definition. |
void psSoundSector::Reload | ( | csRef< iDocumentNode > | sector | ) |
void psSoundSector::RemoveObjectEntity | ( | iMeshWrapper * | mesh, |
const char * | meshName | ||
) |
Removes an object entity managed from the sector.
mesh | The mesh associated to the entity. |
meshName | the name associated to the entity. |
void psSoundSector::SetEntityState | ( | int | state, |
iMeshWrapper * | mesh, | ||
const char * | actorName, | ||
bool | forceChange | ||
) |
Sets the new state for the entity associated to the given mesh.
If it is already playing a sound, it is stopped.
state | the new state >= 0 for the entity. For negative value the function is not defined. |
mesh | the mesh associated to the entity. |
actorName | the name associated to the entity. |
forceChange | if it is false the entity does not change its state if the new one is not defined. If it is true the entity stops play any sound until a new valid state is defined. |
void psSoundSector::UpdateAllEmitters | ( | SoundControl *& | ctrl | ) |
Start/stops all emitters based on distance and time of the day.
ctrl | The sound control to be used to handle the update. |
void psSoundSector::UpdateAllEntities | ( | SoundControl *& | ctrl | ) |
Update all entities times, and based on their status generate a sound.
ctrl | The sound control to be used to handle the update. |
void psSoundSector::UpdateAmbient | ( | int | type, |
SoundControl *& | ctrl | ||
) |
void psSoundSector::UpdateEntity | ( | iMeshWrapper * | mesh, |
const char * | meshName, | ||
SoundControl *& | ctrl | ||
) |
Updates an object entity managed from the sector.
mesh | The mesh associated to the entity. |
meshName | the name associated to the entity. |
ctrl | The sound control to be used to handle the update. |
void psSoundSector::UpdateMusic | ( | bool | loopToggle, |
int | type, | ||
SoundControl *& | ctrl | ||
) |
is this sector active?
Definition at line 52 of file pssoundsector.h.
active ambient music
Definition at line 53 of file pssoundsector.h.
active music
Definition at line 54 of file pssoundsector.h.
array of available ambients
Definition at line 55 of file pssoundsector.h.
array of emitters
Definition at line 57 of file pssoundsector.h.
csHash<psEntity*, csString> psSoundSector::factories |
hash of factory entities
Definition at line 58 of file pssoundsector.h.
csHash<psEntity*, csString> psSoundSector::meshes |
hash of mesh entities
Definition at line 59 of file pssoundsector.h.
array of available musics
Definition at line 56 of file pssoundsector.h.
csString psSoundSector::name |
name of this sector
Definition at line 51 of file pssoundsector.h.
csHash<psEntity*, uint> psSoundSector::tempEntities |
hash of all the temporary psEntites (i.e. associated to a specific mesh)
Definition at line 60 of file pssoundsector.h.