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

#include <AudioEventRTS.h>

Public Member Functions

 AudioEventRTS ()
 
 AudioEventRTS (const AsciiString &eventName)
 
 AudioEventRTS (const AsciiString &eventName, ObjectID ownerID)
 
 AudioEventRTS (const AsciiString &eventName, DrawableID drawableID)
 
 AudioEventRTS (const AsciiString &eventName, const Coord3D *positionOfAudio)
 
virtual ~AudioEventRTS ()
 
 AudioEventRTS (const AudioEventRTS &right)
 
AudioEventRTSoperator= (const AudioEventRTS &right)
 
void setEventName (AsciiString name)
 
const AsciiStringgetEventName (void) const
 
void generateFilename (void)
 
AsciiString getFilename (void)
 
void generatePlayInfo (void)
 
Real getPitchShift (void) const
 
Real getVolumeShift (void) const
 
AsciiString getAttackFilename (void) const
 
AsciiString getDecayFilename (void) const
 
Real getDelay (void) const
 
void decrementDelay (Real timeToDecrement)
 
PortionToPlay getNextPlayPortion (void) const
 
void advanceNextPlayPortion (void)
 
void setNextPlayPortion (PortionToPlay ptp)
 
void decreaseLoopCount (void)
 
Bool hasMoreLoops (void) const
 
void setAudioEventInfo (const AudioEventInfo *eventInfo) const
 
const AudioEventInfogetAudioEventInfo (void) const
 
void setPlayingHandle (AudioHandle handle)
 
AudioHandle getPlayingHandle (void)
 
void setPosition (const Coord3D *pos)
 
const Coord3DgetPosition (void)
 
void setObjectID (ObjectID objID)
 
ObjectID getObjectID (void)
 
Bool isDead () const
 
OwnerType getOwnerType () const
 
void setDrawableID (DrawableID drawID)
 
DrawableID getDrawableID (void)
 
void setTimeOfDay (TimeOfDay tod)
 
TimeOfDay getTimeOfDay (void) const
 
void setHandleToKill (AudioHandle handleToKill)
 
AudioHandle getHandleToKill (void) const
 
void setShouldFade (Bool shouldFade)
 
Bool getShouldFade (void) const
 
void setIsLogicalAudio (Bool isLogicalAudio)
 
Bool getIsLogicalAudio (void) const
 
Bool isPositionalAudio (void) const
 
Bool isCurrentlyPlaying (void) const
 
AudioPriority getAudioPriority (void) const
 
void setAudioPriority (AudioPriority newPriority)
 
Real getVolume (void) const
 
void setVolume (Real vol)
 
Int getPlayerIndex (void) const
 
void setPlayerIndex (Int playerNdx)
 
Int getPlayingAudioIndex (void)
 
void setPlayingAudioIndex (Int pai)
 
Bool getUninterruptable () const
 
void setUninterruptable (Bool uninterruptable)
 
const Coord3DgetCurrentPosition (void)
 
AsciiString generateFilenamePrefix (AudioType audioTypeToPlay, Bool localized)
 
AsciiString generateFilenameExtension (AudioType audioTypeToPlay)
 

Protected Member Functions

void adjustForLocalization (AsciiString &strToAdjust)
 

Protected Attributes

AsciiString m_filenameToLoad
 
const AudioEventInfom_eventInfo
 
AudioHandle m_playingHandle
 
AudioHandle m_killThisHandle
 This is one of those instances.
 
AsciiString m_eventName
 This should correspond with an entry in Dialog.ini, Speech.ini, or Audio.ini.
 
AsciiString m_attackName
 This is the filename that should be used during the attack.
 
AsciiString m_decayName
 This is the filename that should be used during the decay.
 
AudioPriority m_priority
 This should be the priority as given by the event info, or the overrided priority.
 
Real m_volume
 This is the override for the volume. It will either be the normal.
 
TimeOfDay m_timeOfDay
 This should be the current Time Of Day.
 
Coord3D m_positionOfAudio
 Position of the sound if no further positional updates are necessary.
 
union { 
 
   ObjectID   m_objectID 
 ObjectID of the object that this sound is tied to. Position can be automatically updated from this. More...
 
   DrawableID   m_drawableID 
 DrawableID of the drawable that owns this sound. More...
 
};  
 
OwnerType m_ownerType
 
Bool m_shouldFade
 This should fade in or out (if it is starting or stopping)
 
Bool m_isLogicalAudio
 Should probably only be true for scripted sounds.
 
Bool m_uninterruptable
 
Real m_pitchShift
 Pitch shift that should occur on this piece of audio.
 
Real m_volumeShift
 Volume shift that should occur on this piece of audio.
 
Real m_delay
 Amount to delay before playing this sound.
 
Int m_loopCount
 The current loop count value. Only valid if this is a looping type event or the override has been set.
 
Int m_playingAudioIndex
 The sound index we are currently playing. In the case of non-random, we increment this to move to the next sound.
 
Int m_allCount
 If this sound is an ALL type, then this is how many sounds we have played so far.
 
Int m_playerIndex
 The index of the player who owns this sound. Used for sounds that should have an owner, but don't have an object, etc.
 
PortionToPlay m_portionToPlayNext
 Which portion (attack, sound, decay) should be played next?
 

Detailed Description

Definition at line 63 of file AudioEventRTS.h.

Constructor & Destructor Documentation

◆ AudioEventRTS() [1/6]

AudioEventRTS::AudioEventRTS ( )

Definition at line 66 of file AudioEventRTS.cpp.

◆ AudioEventRTS() [2/6]

AudioEventRTS::AudioEventRTS ( const AsciiString & eventName)

Definition at line 93 of file AudioEventRTS.cpp.

◆ AudioEventRTS() [3/6]

AudioEventRTS::AudioEventRTS ( const AsciiString & eventName,
ObjectID ownerID )

Definition at line 120 of file AudioEventRTS.cpp.

◆ AudioEventRTS() [4/6]

AudioEventRTS::AudioEventRTS ( const AsciiString & eventName,
DrawableID drawableID )

Definition at line 156 of file AudioEventRTS.cpp.

◆ AudioEventRTS() [5/6]

AudioEventRTS::AudioEventRTS ( const AsciiString & eventName,
const Coord3D * positionOfAudio )

Definition at line 192 of file AudioEventRTS.cpp.

◆ ~AudioEventRTS()

AudioEventRTS::~AudioEventRTS ( )
virtual

Definition at line 302 of file AudioEventRTS.cpp.

◆ AudioEventRTS() [6/6]

AudioEventRTS::AudioEventRTS ( const AudioEventRTS & right)

Definition at line 219 of file AudioEventRTS.cpp.

Member Function Documentation

◆ adjustForLocalization()

void AudioEventRTS::adjustForLocalization ( AsciiString & strToAdjust)
protected

Definition at line 805 of file AudioEventRTS.cpp.

◆ advanceNextPlayPortion()

void AudioEventRTS::advanceNextPlayPortion ( void )

Definition at line 469 of file AudioEventRTS.cpp.

◆ decreaseLoopCount()

void AudioEventRTS::decreaseLoopCount ( void )

Definition at line 505 of file AudioEventRTS.cpp.

◆ decrementDelay()

void AudioEventRTS::decrementDelay ( Real timeToDecrement)

Definition at line 457 of file AudioEventRTS.cpp.

◆ generateFilename()

void AudioEventRTS::generateFilename ( void )

Definition at line 318 of file AudioEventRTS.cpp.

◆ generateFilenameExtension()

AsciiString AudioEventRTS::generateFilenameExtension ( AudioType audioTypeToPlay)

Definition at line 793 of file AudioEventRTS.cpp.

◆ generateFilenamePrefix()

AsciiString AudioEventRTS::generateFilenamePrefix ( AudioType audioTypeToPlay,
Bool localized )

Definition at line 770 of file AudioEventRTS.cpp.

◆ generatePlayInfo()

void AudioEventRTS::generatePlayInfo ( void )

Definition at line 382 of file AudioEventRTS.cpp.

◆ getAttackFilename()

AsciiString AudioEventRTS::getAttackFilename ( void ) const

Definition at line 439 of file AudioEventRTS.cpp.

◆ getAudioEventInfo()

const AudioEventInfo * AudioEventRTS::getAudioEventInfo ( void ) const

Definition at line 527 of file AudioEventRTS.cpp.

◆ getAudioPriority()

AudioPriority AudioEventRTS::getAudioPriority ( void ) const

Definition at line 696 of file AudioEventRTS.cpp.

◆ getCurrentPosition()

const Coord3D * AudioEventRTS::getCurrentPosition ( void )

Definition at line 729 of file AudioEventRTS.cpp.

◆ getDecayFilename()

AsciiString AudioEventRTS::getDecayFilename ( void ) const

Definition at line 445 of file AudioEventRTS.cpp.

◆ getDelay()

Real AudioEventRTS::getDelay ( void ) const

Definition at line 451 of file AudioEventRTS.cpp.

◆ getDrawableID()

DrawableID AudioEventRTS::getDrawableID ( void )

Definition at line 611 of file AudioEventRTS.cpp.

◆ getEventName()

const AsciiString & AudioEventRTS::getEventName ( void ) const
inline

Definition at line 78 of file AudioEventRTS.h.

◆ getFilename()

AsciiString AudioEventRTS::getFilename ( void )

Definition at line 376 of file AudioEventRTS.cpp.

◆ getHandleToKill()

AudioHandle AudioEventRTS::getHandleToKill ( void ) const

Definition at line 640 of file AudioEventRTS.cpp.

◆ getIsLogicalAudio()

Bool AudioEventRTS::getIsLogicalAudio ( void ) const

Definition at line 664 of file AudioEventRTS.cpp.

◆ getNextPlayPortion()

PortionToPlay AudioEventRTS::getNextPlayPortion ( void ) const

Definition at line 463 of file AudioEventRTS.cpp.

◆ getObjectID()

ObjectID AudioEventRTS::getObjectID ( void )

Definition at line 590 of file AudioEventRTS.cpp.

◆ getOwnerType()

OwnerType AudioEventRTS::getOwnerType ( ) const
inline

Definition at line 117 of file AudioEventRTS.h.

◆ getPitchShift()

Real AudioEventRTS::getPitchShift ( void ) const

Definition at line 427 of file AudioEventRTS.cpp.

◆ getPlayerIndex()

Int AudioEventRTS::getPlayerIndex ( void ) const

Definition at line 827 of file AudioEventRTS.cpp.

◆ getPlayingAudioIndex()

Int AudioEventRTS::getPlayingAudioIndex ( void )
inline

Definition at line 146 of file AudioEventRTS.h.

◆ getPlayingHandle()

AudioHandle AudioEventRTS::getPlayingHandle ( void )

Definition at line 547 of file AudioEventRTS.cpp.

◆ getPosition()

const Coord3D * AudioEventRTS::getPosition ( void )

Definition at line 568 of file AudioEventRTS.cpp.

◆ getShouldFade()

Bool AudioEventRTS::getShouldFade ( void ) const

Definition at line 652 of file AudioEventRTS.cpp.

◆ getTimeOfDay()

TimeOfDay AudioEventRTS::getTimeOfDay ( void ) const

Definition at line 627 of file AudioEventRTS.cpp.

◆ getUninterruptable()

Bool AudioEventRTS::getUninterruptable ( ) const
inline

Definition at line 149 of file AudioEventRTS.h.

◆ getVolume()

Real AudioEventRTS::getVolume ( void ) const

Definition at line 710 of file AudioEventRTS.cpp.

◆ getVolumeShift()

Real AudioEventRTS::getVolumeShift ( void ) const

Definition at line 433 of file AudioEventRTS.cpp.

◆ hasMoreLoops()

Bool AudioEventRTS::hasMoreLoops ( void ) const

Definition at line 515 of file AudioEventRTS.cpp.

◆ isCurrentlyPlaying()

Bool AudioEventRTS::isCurrentlyPlaying ( void ) const

Definition at line 690 of file AudioEventRTS.cpp.

◆ isDead()

Bool AudioEventRTS::isDead ( ) const
inline

Definition at line 116 of file AudioEventRTS.h.

◆ isPositionalAudio()

Bool AudioEventRTS::isPositionalAudio ( void ) const

Definition at line 670 of file AudioEventRTS.cpp.

◆ operator=()

AudioEventRTS & AudioEventRTS::operator= ( const AudioEventRTS & right)

Definition at line 260 of file AudioEventRTS.cpp.

◆ setAudioEventInfo()

void AudioEventRTS::setAudioEventInfo ( const AudioEventInfo * eventInfo) const

Definition at line 521 of file AudioEventRTS.cpp.

◆ setAudioPriority()

void AudioEventRTS::setAudioPriority ( AudioPriority newPriority)

Definition at line 702 of file AudioEventRTS.cpp.

◆ setDrawableID()

void AudioEventRTS::setDrawableID ( DrawableID drawID)

Definition at line 600 of file AudioEventRTS.cpp.

◆ setEventName()

void AudioEventRTS::setEventName ( AsciiString name)

Definition at line 307 of file AudioEventRTS.cpp.

◆ setHandleToKill()

void AudioEventRTS::setHandleToKill ( AudioHandle handleToKill)

Definition at line 634 of file AudioEventRTS.cpp.

◆ setIsLogicalAudio()

void AudioEventRTS::setIsLogicalAudio ( Bool isLogicalAudio)

Definition at line 658 of file AudioEventRTS.cpp.

◆ setNextPlayPortion()

void AudioEventRTS::setNextPlayPortion ( PortionToPlay ptp)

Definition at line 499 of file AudioEventRTS.cpp.

◆ setObjectID()

void AudioEventRTS::setObjectID ( ObjectID objID)

Definition at line 579 of file AudioEventRTS.cpp.

◆ setPlayerIndex()

void AudioEventRTS::setPlayerIndex ( Int playerNdx)

Definition at line 848 of file AudioEventRTS.cpp.

◆ setPlayingAudioIndex()

void AudioEventRTS::setPlayingAudioIndex ( Int pai)
inline

Definition at line 147 of file AudioEventRTS.h.

◆ setPlayingHandle()

void AudioEventRTS::setPlayingHandle ( AudioHandle handle)

Definition at line 541 of file AudioEventRTS.cpp.

◆ setPosition()

void AudioEventRTS::setPosition ( const Coord3D * pos)

Definition at line 553 of file AudioEventRTS.cpp.

◆ setShouldFade()

void AudioEventRTS::setShouldFade ( Bool shouldFade)

Definition at line 646 of file AudioEventRTS.cpp.

◆ setTimeOfDay()

void AudioEventRTS::setTimeOfDay ( TimeOfDay tod)

Definition at line 621 of file AudioEventRTS.cpp.

◆ setUninterruptable()

void AudioEventRTS::setUninterruptable ( Bool uninterruptable)
inline

Definition at line 150 of file AudioEventRTS.h.

◆ setVolume()

void AudioEventRTS::setVolume ( Real vol)

Definition at line 723 of file AudioEventRTS.cpp.

Member Data Documentation

◆ [union]

union { ... } AudioEventRTS

◆ m_allCount

Int AudioEventRTS::m_allCount
protected

If this sound is an ALL type, then this is how many sounds we have played so far.

Definition at line 197 of file AudioEventRTS.h.

◆ m_attackName

AsciiString AudioEventRTS::m_attackName
protected

This is the filename that should be used during the attack.

Definition at line 172 of file AudioEventRTS.h.

◆ m_decayName

AsciiString AudioEventRTS::m_decayName
protected

This is the filename that should be used during the decay.

Definition at line 173 of file AudioEventRTS.h.

◆ m_delay

Real AudioEventRTS::m_delay
protected

Amount to delay before playing this sound.

Definition at line 194 of file AudioEventRTS.h.

◆ m_drawableID

DrawableID AudioEventRTS::m_drawableID

DrawableID of the drawable that owns this sound.

Definition at line 183 of file AudioEventRTS.h.

◆ m_eventInfo

const AudioEventInfo* AudioEventRTS::m_eventInfo
mutableprotected

Definition at line 165 of file AudioEventRTS.h.

◆ m_eventName

AsciiString AudioEventRTS::m_eventName
protected

This should correspond with an entry in Dialog.ini, Speech.ini, or Audio.ini.

Definition at line 171 of file AudioEventRTS.h.

◆ m_filenameToLoad

AsciiString AudioEventRTS::m_filenameToLoad
protected

Definition at line 164 of file AudioEventRTS.h.

◆ m_isLogicalAudio

Bool AudioEventRTS::m_isLogicalAudio
protected

Should probably only be true for scripted sounds.

Definition at line 188 of file AudioEventRTS.h.

◆ m_killThisHandle

AudioHandle AudioEventRTS::m_killThisHandle
protected

This is one of those instances.

Sometimes sounds will canabilize other sounds in order to take their handle away.

Definition at line 168 of file AudioEventRTS.h.

◆ m_loopCount

Int AudioEventRTS::m_loopCount
protected

The current loop count value. Only valid if this is a looping type event or the override has been set.

Definition at line 195 of file AudioEventRTS.h.

◆ m_objectID

ObjectID AudioEventRTS::m_objectID

ObjectID of the object that this sound is tied to. Position can be automatically updated from this.

Definition at line 182 of file AudioEventRTS.h.

◆ m_ownerType

OwnerType AudioEventRTS::m_ownerType
protected

Definition at line 185 of file AudioEventRTS.h.

◆ m_pitchShift

Real AudioEventRTS::m_pitchShift
protected

Pitch shift that should occur on this piece of audio.

Definition at line 192 of file AudioEventRTS.h.

◆ m_playerIndex

Int AudioEventRTS::m_playerIndex
protected

The index of the player who owns this sound. Used for sounds that should have an owner, but don't have an object, etc.

Definition at line 199 of file AudioEventRTS.h.

◆ m_playingAudioIndex

Int AudioEventRTS::m_playingAudioIndex
protected

The sound index we are currently playing. In the case of non-random, we increment this to move to the next sound.

Definition at line 196 of file AudioEventRTS.h.

◆ m_playingHandle

AudioHandle AudioEventRTS::m_playingHandle
protected

Definition at line 166 of file AudioEventRTS.h.

◆ m_portionToPlayNext

PortionToPlay AudioEventRTS::m_portionToPlayNext
protected

Which portion (attack, sound, decay) should be played next?

Definition at line 201 of file AudioEventRTS.h.

◆ m_positionOfAudio

Coord3D AudioEventRTS::m_positionOfAudio
protected

Position of the sound if no further positional updates are necessary.

Definition at line 179 of file AudioEventRTS.h.

◆ m_priority

AudioPriority AudioEventRTS::m_priority
protected

This should be the priority as given by the event info, or the overrided priority.

Definition at line 175 of file AudioEventRTS.h.

◆ m_shouldFade

Bool AudioEventRTS::m_shouldFade
protected

This should fade in or out (if it is starting or stopping)

Definition at line 187 of file AudioEventRTS.h.

◆ m_timeOfDay

TimeOfDay AudioEventRTS::m_timeOfDay
protected

This should be the current Time Of Day.

Definition at line 177 of file AudioEventRTS.h.

◆ m_uninterruptable

Bool AudioEventRTS::m_uninterruptable
protected

Definition at line 189 of file AudioEventRTS.h.

◆ m_volume

Real AudioEventRTS::m_volume
protected

This is the override for the volume. It will either be the normal.

Definition at line 176 of file AudioEventRTS.h.

◆ m_volumeShift

Real AudioEventRTS::m_volumeShift
protected

Volume shift that should occur on this piece of audio.

Definition at line 193 of file AudioEventRTS.h.


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