Oolite 1.91.0.7658-250404-b1488af
All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Modules Pages
OOTrumble.m File Reference
import "OOTrumble.h"
import "Universe.h"
import "PlayerEntity.h"
import "OOTexture.h"
import "ResourceManager.h"
import "OOSound.h"
import "OOStringParsing.h"
import "OOMaths.h"
import "MyOpenGLView.h"
+ Include dependency graph for OOTrumble.m:

Go to the source code of this file.

Functions

static void InitTrumbleSounds (void)
 
static void PlayTrumbleIdle (void)
 
static void PlayTrumbleSqueal (void)
 

Variables

static OOSoundSourcesTrumbleSoundSource
 
static OOSoundsTrumbleIdleSound
 
static OOSoundsTrumbleSqealSound
 

Function Documentation

◆ InitTrumbleSounds()

static void InitTrumbleSounds ( void )
static

Definition at line 978 of file OOTrumble.m.

979{
981 {
982 sTrumbleSoundSource = [[OOSoundSource alloc] init];
983 sTrumbleIdleSound = [[OOSound alloc] initWithCustomSoundKey:@"[trumble-idle]"];
984 sTrumbleSqealSound = [[OOSound alloc] initWithCustomSoundKey:@"[trumble-squeal]"];
985 }
986}
return nil
static OOSound * sTrumbleIdleSound
Definition OOTrumble.m:975
static OOSoundSource * sTrumbleSoundSource
Definition OOTrumble.m:974
static OOSound * sTrumbleSqealSound
Definition OOTrumble.m:976

References nil, sTrumbleIdleSound, sTrumbleSoundSource, and sTrumbleSqealSound.

Referenced by OOTrumble::setupForPlayer:digram:.

+ Here is the caller graph for this function:

◆ PlayTrumbleIdle()

static void PlayTrumbleIdle ( void )
static

Definition at line 989 of file OOTrumble.m.

990{
991 // Only play idle sound if no trumble is making noise.
992 if (![sTrumbleSoundSource isPlaying])
993 {
994 // trumble sound from random direction - where's it gone now?
995 [sTrumbleSoundSource setPosition:OORandomUnitVector()];
996 [sTrumbleSoundSource playSound:sTrumbleIdleSound];
997 }
998}
void playSound:(OOSound *inSound)
void setPosition:(Vector inPosition)

References OOSoundSource::playSound:, OOSoundSource::setPosition:, and sTrumbleSoundSource.

Referenced by OOTrumble::updateProot:.

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

◆ PlayTrumbleSqueal()

static void PlayTrumbleSqueal ( void )
static

Definition at line 1001 of file OOTrumble.m.

1002{
1003 // Play squeal sound if no trumble is currently squealing, but trumping idle sound.
1004 if (![sTrumbleSoundSource isPlaying] || [sTrumbleSoundSource sound] == sTrumbleIdleSound)
1005 {
1006 // trumble sound from random direction - where's it gone now?
1007 [sTrumbleSoundSource setPosition:OORandomUnitVector()];
1008 [sTrumbleSoundSource playSound:sTrumbleSqealSound];
1009 }
1010}

References OOSoundSource::playSound:, OOSoundSource::setPosition:, sTrumbleIdleSound, and sTrumbleSoundSource.

Referenced by OOTrumble::updatePop:, and OOTrumble::updateShudder:.

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

Variable Documentation

◆ sTrumbleIdleSound

OOSound* sTrumbleIdleSound
static

Definition at line 975 of file OOTrumble.m.

Referenced by InitTrumbleSounds(), and PlayTrumbleSqueal().

◆ sTrumbleSoundSource

OOSoundSource* sTrumbleSoundSource
static

Definition at line 974 of file OOTrumble.m.

Referenced by InitTrumbleSounds(), PlayTrumbleIdle(), and PlayTrumbleSqueal().

◆ sTrumbleSqealSound

OOSound* sTrumbleSqealSound
static

Definition at line 976 of file OOTrumble.m.

Referenced by InitTrumbleSounds().