Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
SpeechManager Class Reference

Inherits SpeechInterface.

Public Member Functions

 SpeechManager ()
 
virtual ~SpeechManager ()
 
virtual Bool init (void)
 Initlaizes the speech system.
 
virtual void deinit (void)
 De-initlaizes the speech system.
 
virtual void update (void)
 Services speech tasks. Called by AudioInterface.
 
virtual void reset (void)
 Resets the speech system.
 
virtual void loseFocus (void)
 Called when application loses focus.
 
virtual void regainFocus (void)
 Called when application regains focus.
 
virtual Int numSpeeches (void)
 Returns the number of speechs defined.
 
virtual SpeechInfo * getSpeechInfo (Speech *speech)
 Returns speech info by speech.
 
virtual Int getSpeechIndex (Speech *speech)
 Returns speech index.
 
virtual ID getSpeechID (Speech *speech)
 Returns speech ID.
 
virtual SpeechgetSpeech (Int index)
 Converts index to speech.
 
virtual SpeechgetSpeech (ID id)
 Converts is to speech.
 
virtual SpeechgetSpeech (const Char *speech_name)
 Converts speech name to speech.
 
virtual const ChargetSpeechName (Speech *speech)
 Converts speech to speech name.
 
virtual void fadeIn (void)
 Fade all speech in.
 
virtual void fadeOut (void)
 Fade all speech out.
 
virtual void fade (Real fade_value)
 Fade all speech by a specified amout (1.0 .. 0.0 )
 
virtual Bool isFading (void)
 Returns whether or not any speech is in the process of a fade.
 
virtual void waitForFade (void)
 Returns when all fading has finished.
 
virtual void setVolume (Real new_volume)
 Set new volume level for all speech 1.0 (loudest) 0.0 (silent)
 
virtual Real getVolume (void)
 Return current volume level for all speech.
 
virtual SpeakerInterface * createSpeaker (Char *name, Int priority, Int buffer_time, Int delay)
 Speaker factory.
 
virtual SpeechaddNewSpeech (SpeechInfo *pSpeechToAdd)
 Create a speech specified by pSpeechToAdd.
 
virtual SpeechaddTemporaryDialog (Speech &temporarySpeech)
 Speech to be taken over by.
 
virtual void stop (void)
 Stops all speech that's currently playing.
 
virtual void pause (void)
 Pauses all speech.
 
virtual void resume (void)
 Resumes all paused speech.
 
virtual void turnOff (void)
 Turns off all speech. No more speech will play.
 
virtual void turnOn (void)
 Turns speech on.
 
virtual Bool waitToStop (Int milliseconds)
 Returns when all speech has completely stopped playing.
 
virtual Bool say (Speech *pSpeechToSay)
 Attempts to add a speech to the speach queue.
 
virtual Bool say (AsciiString speechName)
 Attempts to find and add a speech to the speech queue.
 
virtual Bool isOn (void)
 Returns whether or not speech is turned on at present.
 
virtual struct AudioAttribs * getMasterAttribs (void)
 Returns the master attribute control for all speech.
 
virtual struct AudioAttribs * getMasterFadeAttribs (void)
 Returns the master fade control for all speech.
 
virtual void addDialogEvent (const AudioEventRTS *eventRTS, Speech *speech, AudioEventRTS *returnEvent)
 Add an event. speech can be NULL.
 
virtual void removeDialogEvent (const AudioEventRTS *eventRTS, AudioEventRTS *eventToUse)
 remove an event, eventToUse shouldn't be NULL.
 
void removeSpeaker (Speaker *speaker)
 
void addSpeaker (Speaker *speaker)
 
virtual AsciiString getFilenameForPlayFromAudioEvent (const AudioEventRTS *eventToGetFrom)
 

Protected Member Functions

AsciiString getFilenameForPlay (Speech *speech)
 Return the filename corresponding to this speech.
 

Protected Attributes

struct AudioAttribs * m_masterAttribs
 Attribs for all speech.
 
struct AudioAttribs * m_masterFadeAttribs
 Fade attribs for all speech.
 
Real m_volume
 Current speech volume.
 
Bool m_on
 Is speech turned on?
 
Int m_count
 Number of speeches in the table.
 
struct AudioDeviceTag * m_device
 The audio device we were initilaized with.
 
LList m_speakers
 list of speakers created by this manager
 
HashSpeech m_speech
 This is a hash table of all speeches we currently have loaded.
 
VecAsciiString m_speechNames
 The purpose of this is to return to someone asking for the name of some element.
 
VecSpeech m_temporarySpeeches
 This is a vector of speeches that are like something in the hash, but differ by priority.
 

Detailed Description

Actual implementation od SpeechInterface

Definition at line 212 of file GameSpeech.cpp.

Constructor & Destructor Documentation

◆ SpeechManager()

SpeechManager::SpeechManager ( )

Definition at line 355 of file GameSpeech.cpp.

◆ ~SpeechManager()

SpeechManager::~SpeechManager ( )
virtual

Definition at line 379 of file GameSpeech.cpp.

Member Function Documentation

◆ addDialogEvent()

void SpeechManager::addDialogEvent ( const AudioEventRTS * eventRTS,
Speech * speech,
AudioEventRTS * returnEvent )
virtual

Add an event. speech can be NULL.

Definition at line 913 of file GameSpeech.cpp.

◆ addNewSpeech()

Speech * SpeechManager::addNewSpeech ( SpeechInfo * pSpeechToAdd)
virtual

Create a speech specified by pSpeechToAdd.

Definition at line 860 of file GameSpeech.cpp.

◆ addSpeaker()

void SpeechManager::addSpeaker ( Speaker * speaker)

Definition at line 833 of file GameSpeech.cpp.

◆ addTemporaryDialog()

Speech * SpeechManager::addTemporaryDialog ( Speech & temporarySpeech)
virtual

Speech to be taken over by.

Definition at line 884 of file GameSpeech.cpp.

◆ createSpeaker()

SpeakerInterface * SpeechManager::createSpeaker ( Char * name,
Int priority,
Int buffer_time,
Int delay )
virtual

Speaker factory.

Definition at line 844 of file GameSpeech.cpp.

◆ deinit()

void SpeechManager::deinit ( void )
virtual

De-initlaizes the speech system.

Definition at line 421 of file GameSpeech.cpp.

◆ fade()

void SpeechManager::fade ( Real fade_value)
virtual

Fade all speech by a specified amout (1.0 .. 0.0 )

Definition at line 626 of file GameSpeech.cpp.

◆ fadeIn()

void SpeechManager::fadeIn ( void )
virtual

Fade all speech in.

Definition at line 602 of file GameSpeech.cpp.

◆ fadeOut()

void SpeechManager::fadeOut ( void )
virtual

Fade all speech out.

Definition at line 614 of file GameSpeech.cpp.

◆ getFilenameForPlay()

AsciiString SpeechManager::getFilenameForPlay ( Speech * speech)
protected

Return the filename corresponding to this speech.

Definition at line 1024 of file GameSpeech.cpp.

◆ getFilenameForPlayFromAudioEvent()

AsciiString SpeechManager::getFilenameForPlayFromAudioEvent ( const AudioEventRTS * eventToGetFrom)
virtual

Definition at line 1007 of file GameSpeech.cpp.

◆ getMasterAttribs()

struct AudioAttribs * SpeechManager::getMasterAttribs ( void )
virtual

Returns the master attribute control for all speech.

Definition at line 895 of file GameSpeech.cpp.

◆ getMasterFadeAttribs()

struct AudioAttribs * SpeechManager::getMasterFadeAttribs ( void )
virtual

Returns the master fade control for all speech.

Definition at line 904 of file GameSpeech.cpp.

◆ getSpeech() [1/3]

Speech * SpeechManager::getSpeech ( const Char * speech_name)
virtual

Converts speech name to speech.

Definition at line 544 of file GameSpeech.cpp.

◆ getSpeech() [2/3]

Speech * SpeechManager::getSpeech ( ID id)
virtual

Converts is to speech.

Definition at line 557 of file GameSpeech.cpp.

◆ getSpeech() [3/3]

virtual Speech * SpeechManager::getSpeech ( Int index)
virtual

Converts index to speech.

◆ getSpeechID()

ID SpeechManager::getSpeechID ( Speech * speech)
virtual

Returns speech ID.

Definition at line 530 of file GameSpeech.cpp.

◆ getSpeechIndex()

Int SpeechManager::getSpeechIndex ( Speech * speech)
virtual

Returns speech index.

Definition at line 516 of file GameSpeech.cpp.

◆ getSpeechInfo()

SpeechInfo * SpeechManager::getSpeechInfo ( Speech * speech)
virtual

Returns speech info by speech.

Definition at line 502 of file GameSpeech.cpp.

◆ getSpeechName()

const Char * SpeechManager::getSpeechName ( Speech * speech)
virtual

Converts speech to speech name.

Definition at line 589 of file GameSpeech.cpp.

◆ getVolume()

Real SpeechManager::getVolume ( void )
virtual

Return current volume level for all speech.

Definition at line 674 of file GameSpeech.cpp.

◆ init()

Bool SpeechManager::init ( void )
virtual

Initlaizes the speech system.

Definition at line 392 of file GameSpeech.cpp.

◆ isFading()

Bool SpeechManager::isFading ( void )
virtual

Returns whether or not any speech is in the process of a fade.

Definition at line 638 of file GameSpeech.cpp.

◆ isOn()

Bool SpeechManager::isOn ( void )
virtual

Returns whether or not speech is turned on at present.

Definition at line 809 of file GameSpeech.cpp.

◆ loseFocus()

void SpeechManager::loseFocus ( void )
virtual

Called when application loses focus.

Definition at line 475 of file GameSpeech.cpp.

◆ numSpeeches()

Int SpeechManager::numSpeeches ( void )
virtual

Returns the number of speechs defined.

Definition at line 493 of file GameSpeech.cpp.

◆ pause()

void SpeechManager::pause ( void )
virtual

Pauses all speech.

Definition at line 700 of file GameSpeech.cpp.

◆ regainFocus()

void SpeechManager::regainFocus ( void )
virtual

Called when application regains focus.

Definition at line 484 of file GameSpeech.cpp.

◆ removeDialogEvent()

void SpeechManager::removeDialogEvent ( const AudioEventRTS * eventRTS,
AudioEventRTS * eventToUse )
virtual

remove an event, eventToUse shouldn't be NULL.

Definition at line 967 of file GameSpeech.cpp.

◆ removeSpeaker()

void SpeechManager::removeSpeaker ( Speaker * speaker)

Definition at line 818 of file GameSpeech.cpp.

◆ reset()

void SpeechManager::reset ( void )
virtual

Resets the speech system.

Definition at line 467 of file GameSpeech.cpp.

◆ resume()

void SpeechManager::resume ( void )
virtual

Resumes all paused speech.

Definition at line 721 of file GameSpeech.cpp.

◆ say() [1/2]

Bool SpeechManager::say ( AsciiString speechName)
virtual

Attempts to find and add a speech to the speech queue.

Definition at line 794 of file GameSpeech.cpp.

◆ say() [2/2]

Bool SpeechManager::say ( Speech * pSpeechToSay)
virtual

Attempts to add a speech to the speach queue.

Definition at line 770 of file GameSpeech.cpp.

◆ setVolume()

void SpeechManager::setVolume ( Real new_volume)
virtual

Set new volume level for all speech 1.0 (loudest) 0.0 (silent)

Definition at line 660 of file GameSpeech.cpp.

◆ stop()

void SpeechManager::stop ( void )
virtual

Stops all speech that's currently playing.

Definition at line 679 of file GameSpeech.cpp.

◆ turnOff()

void SpeechManager::turnOff ( void )
virtual

Turns off all speech. No more speech will play.

Definition at line 742 of file GameSpeech.cpp.

◆ turnOn()

void SpeechManager::turnOn ( void )
virtual

Turns speech on.

Definition at line 752 of file GameSpeech.cpp.

◆ update()

void SpeechManager::update ( void )
virtual

Services speech tasks. Called by AudioInterface.

Definition at line 445 of file GameSpeech.cpp.

◆ waitForFade()

void SpeechManager::waitForFade ( void )
virtual

Returns when all fading has finished.

Definition at line 651 of file GameSpeech.cpp.

◆ waitToStop()

Bool SpeechManager::waitToStop ( Int milliseconds)
virtual

Returns when all speech has completely stopped playing.

Definition at line 760 of file GameSpeech.cpp.

Member Data Documentation

◆ m_count

Int SpeechManager::m_count
protected

Number of speeches in the table.

Definition at line 221 of file GameSpeech.cpp.

◆ m_device

struct AudioDeviceTag* SpeechManager::m_device
protected

The audio device we were initilaized with.

Definition at line 223 of file GameSpeech.cpp.

◆ m_masterAttribs

struct AudioAttribs* SpeechManager::m_masterAttribs
protected

Attribs for all speech.

Definition at line 217 of file GameSpeech.cpp.

◆ m_masterFadeAttribs

struct AudioAttribs* SpeechManager::m_masterFadeAttribs
protected

Fade attribs for all speech.

Definition at line 218 of file GameSpeech.cpp.

◆ m_on

Bool SpeechManager::m_on
protected

Is speech turned on?

Definition at line 220 of file GameSpeech.cpp.

◆ m_speakers

LList SpeechManager::m_speakers
protected

list of speakers created by this manager

Definition at line 225 of file GameSpeech.cpp.

◆ m_speech

HashSpeech SpeechManager::m_speech
protected

This is a hash table of all speeches we currently have loaded.

Definition at line 226 of file GameSpeech.cpp.

◆ m_speechNames

VecAsciiString SpeechManager::m_speechNames
protected

The purpose of this is to return to someone asking for the name of some element.

Definition at line 227 of file GameSpeech.cpp.

◆ m_temporarySpeeches

VecSpeech SpeechManager::m_temporarySpeeches
protected

This is a vector of speeches that are like something in the hash, but differ by priority.

Definition at line 228 of file GameSpeech.cpp.

◆ m_volume

Real SpeechManager::m_volume
protected

Current speech volume.

Definition at line 219 of file GameSpeech.cpp.


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