Oolite
Loading...
Searching...
No Matches
PlayerEntity(Sound) Category Reference

#include <PlayerEntitySound.h>

Instance Methods

(void) - setUpSound
(void) - setUpWeaponSounds
(void) - destroySound
(BOOL) - isBeeping
(void) - playIdentOn
(void) - playIdentOff
(void) - playIdentLockedOn
(void) - playMissileArmed
(void) - playMineArmed
(void) - playMissileSafe
(void) - playMissileLockedOn
(void) - playWeaponsOnline
(void) - playWeaponsOffline
(void) - playNextEquipmentSelected
(void) - playNextMissileSelected
(void) - playCargoJettisioned
(void) - playAutopilotOn
(void) - playAutopilotOff
(void) - playAutopilotOutOfRange
(void) - playAutopilotCannotDockWithTarget
(void) - playSaveOverwriteYes
(void) - playSaveOverwriteNo
(void) - playHoldFull
(void) - playJumpMassLocked
(void) - playTargetLost
(void) - playNoTargetInMemory
(void) - playTargetSwitched
(void) - playCloakingDeviceOn
(void) - playCloakingDeviceOff
(void) - playCloakingDeviceInsufficientEnergy
(void) - playMenuNavigationUp
(void) - playMenuNavigationDown
(void) - playMenuNavigationNot
(void) - playMenuPagePrevious
(void) - playMenuPageNext
(void) - playDismissedReportScreen
(void) - playDismissedMissionScreen
(void) - playChangedOption
(void) - updateFuelScoopSoundWithInterval:
(void) - startAfterburnerSound
(void) - stopAfterburnerSound
(void) - playBuyCommodity
(void) - playBuyShip
(void) - playSellCommodity
(void) - playCantBuyCommodity
(void) - playCantSellCommodity
(void) - playCantBuyShip
(void) - playHyperspaceNoTarget
(void) - playHyperspaceNoFuel
(void) - playHyperspaceBlocked
(void) - playHyperspaceDistanceTooGreat
(void) - playStandardHyperspace
(void) - playGalacticHyperspace
(void) - playHyperspaceAborted
(void) - playHitByECMSound
(void) - playFiredECMSound
(void) - playLaunchFromStation
(void) - playDockWithStation
(void) - playExitWitchspace
(void) - playHostileWarning
(void) - playAlertConditionRed
(void) - playIncomingMissile:
(void) - playEnergyLow
(void) - playDockingDenied
(void) - playWitchjumpFailure
(void) - playWitchjumpMisjump
(void) - playWitchjumpBlocked
(void) - playWitchjumpDistanceTooGreat
(void) - playWitchjumpInsufficientFuel
(void) - playFuelLeak
(void) - playShieldHit:weaponIdentifier:
(void) - playDirectHit:weaponIdentifier:
(void) - playScrapeDamage:
(void) - playLaserHit:offset:weaponIdentifier:
(void) - playWeaponOverheated:
(void) - playMissileLaunched:weaponIdentifier:
(void) - playMineLaunched:weaponIdentifier:
(void) - playEscapePodScooped
(void) - playAegisCloseToPlanet
(void) - playAegisCloseToStation
(void) - playGameOver
(void) - playLegacyScriptSound:
(void) - playInterfaceBeep: [implementation]
(void) - boop [implementation]
(void) - updateAfterburnerSound [implementation]

Detailed Description

Definition at line 27 of file PlayerEntitySound.h.

Method Documentation

◆ boop

- (void) boop
implementation

Extends class PlayerEntity.

Definition at line 193 of file PlayerEntitySound.m.

194{
195 [self playInterfaceBeep:@"[general-boop]"];
196}

References boop, and PlayerEntity::playInterfaceBeep:.

Referenced by boop.

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

◆ destroySound

- (void) destroySound

Extends class PlayerEntity.

Definition at line 155 of file PlayerEntitySound.m.

156{
161
164
170
176}
#define DESTROY(x)
static OOSoundSourcePool * sDamageSoundPool
static OOSoundSource * sEcmSource
static NSDictionary * weaponUnshieldedHit
static OOSoundSourcePool * sWeaponSoundPool
static OOSoundSource * sHyperspaceSoundSource
static OOSoundSourcePool * sBuySellSourcePool
static NSDictionary * weaponShotHit
static OOSoundSource * sBreakPatternSource
static OOSoundSource * sAfterburnerSources[2]
static NSDictionary * weaponLaunched
static OOSoundSource * sInterfaceBeepSource
static OOSoundSourcePool * sMiscSoundPool
static OOSoundSourcePool * sWarningSoundPool
static NSDictionary * weaponShieldHit
static NSDictionary * weaponShotMiss

References DESTROY, destroySound, sAfterburnerSources, sBreakPatternSource, sBuySellSourcePool, sDamageSoundPool, sEcmSource, sHyperspaceSoundSource, sInterfaceBeepSource, sMiscSoundPool, sWarningSoundPool, sWeaponSoundPool, weaponLaunched, weaponShieldHit, weaponShotHit, weaponShotMiss, and weaponUnshieldedHit.

Referenced by destroySound.

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

◆ isBeeping

- (BOOL) isBeeping

Extends class PlayerEntity.

Definition at line 188 of file PlayerEntitySound.m.

References isBeeping, and OOSoundSource::isPlaying.

Referenced by isBeeping.

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

◆ playAegisCloseToPlanet

- (void) playAegisCloseToPlanet

Extends class PlayerEntity.

Definition at line 634 of file PlayerEntitySound.m.

635{
636 [sMiscSoundPool playSoundWithKey:@"[aegis-planet]" position:kInterfaceBeepPosition];
637}
void playSoundWithKey:position:(NSString *key,[position] Vector position)

References playAegisCloseToPlanet, and OOSoundSourcePool::playSoundWithKey:position:.

Referenced by playAegisCloseToPlanet.

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

◆ playAegisCloseToStation

- (void) playAegisCloseToStation

Extends class PlayerEntity.

Definition at line 639 of file PlayerEntitySound.m.

640{
641 [sMiscSoundPool playSoundWithKey:@"[aegis-station]" position:kInterfaceBeepPosition];
642}

References playAegisCloseToStation, and OOSoundSourcePool::playSoundWithKey:position:.

Referenced by playAegisCloseToStation.

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

◆ playAlertConditionRed

- (void) playAlertConditionRed

Extends class PlayerEntity.

Definition at line 521 of file PlayerEntitySound.m.

522{
523 [sWarningSoundPool playSoundWithKey:@"[alert-condition-red]" priority:2 position:kInterfaceWarningPosition];
524}
void playSoundWithKey:priority:position:(NSString *key,[priority] float priority,[position] Vector position)

References playAlertConditionRed, and OOSoundSourcePool::playSoundWithKey:priority:position:.

Referenced by playAlertConditionRed.

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

◆ playAutopilotCannotDockWithTarget

- (void) playAutopilotCannotDockWithTarget

Extends class PlayerEntity.

Definition at line 276 of file PlayerEntitySound.m.

277{
278 [self playInterfaceBeep:@"[autopilot-cannot-dock-with-target]"];
279}

References playAutopilotCannotDockWithTarget, and PlayerEntity::playInterfaceBeep:.

Referenced by playAutopilotCannotDockWithTarget.

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

◆ playAutopilotOff

- (void) playAutopilotOff

Extends class PlayerEntity.

Definition at line 263 of file PlayerEntitySound.m.

264{
265 // only if still alive
266 if (energy > 0.0) {
267 [self playInterfaceBeep:@"[autopilot-off]"];
268 }
269}

References playAutopilotOff, and PlayerEntity::playInterfaceBeep:.

Referenced by playAutopilotOff.

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

◆ playAutopilotOn

- (void) playAutopilotOn

Extends class PlayerEntity.

Definition at line 258 of file PlayerEntitySound.m.

259{
260 [self playInterfaceBeep:@"[autopilot-on]"];
261}

References playAutopilotOn, and PlayerEntity::playInterfaceBeep:.

Referenced by playAutopilotOn.

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

◆ playAutopilotOutOfRange

- (void) playAutopilotOutOfRange

Extends class PlayerEntity.

Definition at line 271 of file PlayerEntitySound.m.

272{
273 [self playInterfaceBeep:@"[autopilot-out-of-range]"];
274}

References playAutopilotOutOfRange, and PlayerEntity::playInterfaceBeep:.

Referenced by playAutopilotOutOfRange.

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

◆ playBuyCommodity

- (void) playBuyCommodity

Extends class PlayerEntity.

Definition at line 444 of file PlayerEntitySound.m.

445{
446 [sBuySellSourcePool playSoundWithKey:@"[buy-commodity]"];
447}
void playSoundWithKey:(NSString *key)

References playBuyCommodity, and OOSoundSourcePool::playSoundWithKey:.

Referenced by playBuyCommodity.

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

◆ playBuyShip

- (void) playBuyShip

Extends class PlayerEntity.

Definition at line 449 of file PlayerEntitySound.m.

450{
451 [sBuySellSourcePool playSoundWithKey:@"[buy-ship]"];
452}

References playBuyShip, and OOSoundSourcePool::playSoundWithKey:.

Referenced by playBuyShip.

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

◆ playCantBuyCommodity

- (void) playCantBuyCommodity

Extends class PlayerEntity.

Definition at line 459 of file PlayerEntitySound.m.

460{
461 [sBuySellSourcePool playSoundWithKey:@"[could-not-buy-commodity]"];
462}

References playCantBuyCommodity, and OOSoundSourcePool::playSoundWithKey:.

Referenced by playCantBuyCommodity.

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

◆ playCantBuyShip

- (void) playCantBuyShip

Extends class PlayerEntity.

Definition at line 469 of file PlayerEntitySound.m.

470{
471 [sBuySellSourcePool playSoundWithKey:@"[could-not-buy-ship]"];
472}

References playCantBuyShip, and OOSoundSourcePool::playSoundWithKey:.

Referenced by playCantBuyShip.

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

◆ playCantSellCommodity

- (void) playCantSellCommodity

Extends class PlayerEntity.

Definition at line 464 of file PlayerEntitySound.m.

465{
466 [sBuySellSourcePool playSoundWithKey:@"[could-not-sell-commodity]"];
467}

References playCantSellCommodity, and OOSoundSourcePool::playSoundWithKey:.

Referenced by playCantSellCommodity.

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

◆ playCargoJettisioned

- (void) playCargoJettisioned

Extends class PlayerEntity.

Definition at line 253 of file PlayerEntitySound.m.

254{
255 [self playInterfaceBeep:@"[cargo-jettisoned]"];
256}

References playCargoJettisioned, and PlayerEntity::playInterfaceBeep:.

Referenced by playCargoJettisioned.

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

◆ playChangedOption

- (void) playChangedOption

Extends class PlayerEntity.

Definition at line 381 of file PlayerEntitySound.m.

382{
383 [self playInterfaceBeep:@"[changed-option]"];
384}

References playChangedOption, and PlayerEntity::playInterfaceBeep:.

Referenced by playChangedOption.

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

◆ playCloakingDeviceInsufficientEnergy

- (void) playCloakingDeviceInsufficientEnergy

Extends class PlayerEntity.

Definition at line 439 of file PlayerEntitySound.m.

440{
441 [self playInterfaceBeep:@"[cloaking-device-insufficent-energy]"];
442}

References playCloakingDeviceInsufficientEnergy, and PlayerEntity::playInterfaceBeep:.

Referenced by playCloakingDeviceInsufficientEnergy.

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

◆ playCloakingDeviceOff

- (void) playCloakingDeviceOff

Extends class PlayerEntity.

Definition at line 341 of file PlayerEntitySound.m.

342{
343 [self playInterfaceBeep:@"[cloaking-device-off]"];
344}

References playCloakingDeviceOff, and PlayerEntity::playInterfaceBeep:.

Referenced by playCloakingDeviceOff.

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

◆ playCloakingDeviceOn

- (void) playCloakingDeviceOn

Extends class PlayerEntity.

Definition at line 336 of file PlayerEntitySound.m.

337{
338 [self playInterfaceBeep:@"[cloaking-device-on]"];
339}

References playCloakingDeviceOn, and PlayerEntity::playInterfaceBeep:.

Referenced by playCloakingDeviceOn.

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

◆ playDirectHit:weaponIdentifier:

- (void) playDirectHit: (Vector) attackVector
weaponIdentifier: (NSString*) weaponIdentifier 

Extends class PlayerEntity.

Definition at line 579 of file PlayerEntitySound.m.

579 :(Vector)attackVector weaponIdentifier:(NSString*)weaponIdentifier
580{
581 NSString* identifier = [weaponUnshieldedHit objectForKey:weaponIdentifier];
582 if (!identifier)
583 identifier = @"[player-direct-hit]";
584 [sDamageSoundPool playSoundWithKey:identifier position:attackVector];
585}
struct Vector Vector

References OOSoundSourcePool::playSoundWithKey:position:.

Here is the call graph for this function:

◆ playDismissedMissionScreen

- (void) playDismissedMissionScreen

Extends class PlayerEntity.

Definition at line 376 of file PlayerEntitySound.m.

377{
378 [self playInterfaceBeep:@"[dismissed-mission-screen]"];
379}

References playDismissedMissionScreen, and PlayerEntity::playInterfaceBeep:.

Referenced by playDismissedMissionScreen.

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

◆ playDismissedReportScreen

- (void) playDismissedReportScreen

Extends class PlayerEntity.

Definition at line 371 of file PlayerEntitySound.m.

372{
373 [self playInterfaceBeep:@"[dismissed-report-screen]"];
374}

References playDismissedReportScreen, and PlayerEntity::playInterfaceBeep:.

Referenced by playDismissedReportScreen.

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

◆ playDockingDenied

- (void) playDockingDenied

Extends class PlayerEntity.

Definition at line 536 of file PlayerEntitySound.m.

537{
538 [sWarningSoundPool playSoundWithKey:@"[autopilot-denied]" priority:1 position:kInterfaceWarningPosition];
539}

References playDockingDenied, and OOSoundSourcePool::playSoundWithKey:priority:position:.

Referenced by playDockingDenied.

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

◆ playDockWithStation

- (void) playDockWithStation

Extends class PlayerEntity.

Definition at line 506 of file PlayerEntitySound.m.

507{
508 [sBreakPatternSource playCustomSoundWithKey:@"[player-dock-with-station]"];
509}
void playCustomSoundWithKey:(NSString *key)
Definition Universe.m:9985

References OOSoundSource::playCustomSoundWithKey:, and playDockWithStation.

Referenced by playDockWithStation.

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

◆ playEnergyLow

- (void) playEnergyLow

Extends class PlayerEntity.

Definition at line 531 of file PlayerEntitySound.m.

532{
533 [sWarningSoundPool playSoundWithKey:@"[energy-low]" priority:0.5 position:kInterfaceWarningPosition];
534}

References playEnergyLow, and OOSoundSourcePool::playSoundWithKey:priority:position:.

Referenced by playEnergyLow.

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

◆ playEscapePodScooped

- (void) playEscapePodScooped

Extends class PlayerEntity.

Definition at line 629 of file PlayerEntitySound.m.

630{
631 [sMiscSoundPool playSoundWithKey:@"[escape-pod-scooped]" position:kInterfaceBeepPosition];
632}

References playEscapePodScooped, and OOSoundSourcePool::playSoundWithKey:position:.

Referenced by playEscapePodScooped.

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

◆ playExitWitchspace

- (void) playExitWitchspace

Extends class PlayerEntity.

Definition at line 511 of file PlayerEntitySound.m.

512{
513 [sBreakPatternSource playCustomSoundWithKey:@"[player-exit-witchspace]"];
514}

References OOSoundSource::playCustomSoundWithKey:, and playExitWitchspace.

Referenced by playExitWitchspace.

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

◆ playFiredECMSound

- (void) playFiredECMSound

Extends class PlayerEntity.

Definition at line 495 of file PlayerEntitySound.m.

496{
497 if (![sEcmSource isPlaying])
498 [sEcmSource playCustomSoundWithKey:@"[player-fired-ecm]"];
499}

References OOSoundSource::playCustomSoundWithKey:, playFiredECMSound, and sEcmSource.

Referenced by playFiredECMSound.

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

◆ playFuelLeak

- (void) playFuelLeak

Extends class PlayerEntity.

Definition at line 566 of file PlayerEntitySound.m.

567{
568 [sWarningSoundPool playSoundWithKey:@"[fuel-leak]" priority:0.5 position:kWitchspacePosition];
569}

References playFuelLeak, and OOSoundSourcePool::playSoundWithKey:priority:position:.

Referenced by playFuelLeak.

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

◆ playGalacticHyperspace

- (void) playGalacticHyperspace

Extends class PlayerEntity.

Definition at line 479 of file PlayerEntitySound.m.

480{
481 [sHyperspaceSoundSource playCustomSoundWithKey:@"[galactic-hyperspace-countdown-begun]"];
482}

References OOSoundSource::playCustomSoundWithKey:, and playGalacticHyperspace.

Referenced by playGalacticHyperspace.

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

◆ playGameOver

- (void) playGameOver

Extends class PlayerEntity.

Definition at line 644 of file PlayerEntitySound.m.

645{
646 [sMiscSoundPool playSoundWithKey:@"[game-over]"];
647}

References playGameOver, and OOSoundSourcePool::playSoundWithKey:.

Referenced by playGameOver.

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

◆ playHitByECMSound

- (void) playHitByECMSound

Extends class PlayerEntity.

Definition at line 489 of file PlayerEntitySound.m.

490{
491 if (![sEcmSource isPlaying])
492 [sEcmSource playCustomSoundWithKey:@"[player-hit-by-ecm]"];
493}

References OOSoundSource::playCustomSoundWithKey:, playHitByECMSound, and sEcmSource.

Referenced by playHitByECMSound.

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

◆ playHoldFull

- (void) playHoldFull

Extends class PlayerEntity.

Definition at line 291 of file PlayerEntitySound.m.

292{
293 [self playInterfaceBeep:@"[hold-full]"];
294}

References playHoldFull, and PlayerEntity::playInterfaceBeep:.

Referenced by playHoldFull.

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

◆ playHostileWarning

- (void) playHostileWarning

Extends class PlayerEntity.

Definition at line 516 of file PlayerEntitySound.m.

517{
518 [sWarningSoundPool playSoundWithKey:@"[hostile-warning]" priority:1 position:kInterfaceWarningPosition];
519}

References playHostileWarning, and OOSoundSourcePool::playSoundWithKey:priority:position:.

Referenced by playHostileWarning.

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

◆ playHyperspaceAborted

- (void) playHyperspaceAborted

Extends class PlayerEntity.

Definition at line 484 of file PlayerEntitySound.m.

485{
486 [sHyperspaceSoundSource playCustomSoundWithKey:@"[hyperspace-countdown-aborted]"];
487}

References OOSoundSource::playCustomSoundWithKey:, and playHyperspaceAborted.

Referenced by playHyperspaceAborted.

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

◆ playHyperspaceBlocked

- (void) playHyperspaceBlocked

Extends class PlayerEntity.

Definition at line 326 of file PlayerEntitySound.m.

327{
328 [self playInterfaceBeep:@"[hyperspace-blocked]"];
329}

References playHyperspaceBlocked, and PlayerEntity::playInterfaceBeep:.

Referenced by playHyperspaceBlocked.

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

◆ playHyperspaceDistanceTooGreat

- (void) playHyperspaceDistanceTooGreat

Extends class PlayerEntity.

Definition at line 331 of file PlayerEntitySound.m.

332{
333 [self playInterfaceBeep:@"[witch-too-far]"];
334}

References playHyperspaceDistanceTooGreat, and PlayerEntity::playInterfaceBeep:.

Referenced by playHyperspaceDistanceTooGreat.

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

◆ playHyperspaceNoFuel

- (void) playHyperspaceNoFuel

Extends class PlayerEntity.

Definition at line 321 of file PlayerEntitySound.m.

322{
323 [self playInterfaceBeep:@"[witch-no-fuel]"];
324}

References playHyperspaceNoFuel, and PlayerEntity::playInterfaceBeep:.

Referenced by playHyperspaceNoFuel.

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

◆ playHyperspaceNoTarget

- (void) playHyperspaceNoTarget

Extends class PlayerEntity.

Definition at line 316 of file PlayerEntitySound.m.

317{
318 [self playInterfaceBeep:@"[witch-no-target]"];
319}

References playHyperspaceNoTarget, and PlayerEntity::playInterfaceBeep:.

Referenced by playHyperspaceNoTarget.

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

◆ playIdentLockedOn

- (void) playIdentLockedOn

Extends class PlayerEntity.

Definition at line 208 of file PlayerEntitySound.m.

209{
210 [self playInterfaceBeep:@"[ident-locked-on]"];
211}

References playIdentLockedOn, and PlayerEntity::playInterfaceBeep:.

Referenced by playIdentLockedOn.

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

◆ playIdentOff

- (void) playIdentOff

Extends class PlayerEntity.

Definition at line 203 of file PlayerEntitySound.m.

204{
205 [self playInterfaceBeep:@"[ident-off]"];
206}

References playIdentOff, and PlayerEntity::playInterfaceBeep:.

Referenced by playIdentOff.

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

◆ playIdentOn

- (void) playIdentOn

Extends class PlayerEntity.

Definition at line 198 of file PlayerEntitySound.m.

199{
200 [self playInterfaceBeep:@"[ident-on]"];
201}

References playIdentOn, and PlayerEntity::playInterfaceBeep:.

Referenced by playIdentOn.

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

◆ playIncomingMissile:

- (void) playIncomingMissile: (Vector) missileVector

Extends class PlayerEntity.

Definition at line 526 of file PlayerEntitySound.m.

526 :(Vector)missileVector
527{
528 [sWarningSoundPool playSoundWithKey:@"[incoming-missile]" priority:3 position:missileVector];
529}

References OOSoundSourcePool::playSoundWithKey:priority:position:.

Here is the call graph for this function:

◆ playInterfaceBeep:

- (void) playInterfaceBeep: (NSString*) beepKey
implementation

Extends class PlayerEntity.

Definition at line 178 of file PlayerEntitySound.m.

178 :(NSString*)beepKey
179{
180#if OOLITE_WINDOWS
181 if ([self status] == STATUS_START_GAME) {
182 return;
183 }
184#endif
186}
void playSound:(OOSound *inSound)
id soundWithCustomSoundKey:(NSString *key)
Definition Universe.m:9950

References OOSoundSource::playSound:, and OOSound::soundWithCustomSoundKey:.

Here is the call graph for this function:

◆ playJumpMassLocked

- (void) playJumpMassLocked

Extends class PlayerEntity.

Definition at line 296 of file PlayerEntitySound.m.

297{
298 [self playInterfaceBeep:@"[jump-mass-locked]"];
299}

References PlayerEntity::playInterfaceBeep:, and playJumpMassLocked.

Referenced by playJumpMassLocked.

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

◆ playLaserHit:offset:weaponIdentifier:

- (void) playLaserHit: (BOOL) hit
offset: (Vector) weaponOffset
weaponIdentifier: (NSString*) weaponIdentifier 

Extends class PlayerEntity.

Definition at line 592 of file PlayerEntitySound.m.

592 :(BOOL)hit offset:(Vector)weaponOffset weaponIdentifier:(NSString*)weaponIdentifier
593{
594 NSString* identifier = nil;
595 if (hit) {
596 identifier = [weaponShotHit objectForKey:weaponIdentifier];
597 if (!identifier)
598 identifier = @"[player-laser-hit]";
599 [sWeaponSoundPool playSoundWithKey:identifier priority:1.0 expiryTime:0.05 overlap:YES position:weaponOffset];
600 } else {
601 identifier = [weaponShotMiss objectForKey:weaponIdentifier];
602 if (!identifier)
603 identifier = @"[player-laser-miss]";
604 [sWeaponSoundPool playSoundWithKey:identifier priority:1.0 expiryTime:0.05 overlap:YES position:weaponOffset];
605 }
606}
return nil
void playSoundWithKey:priority:expiryTime:overlap:position:(NSString *key,[priority] float priority,[expiryTime] OOTimeDelta expiryTime,[overlap] BOOL overlap,[position] Vector position)
voidpf uLong offset
Definition ioapi.h:132

References nil, and OOSoundSourcePool::playSoundWithKey:priority:expiryTime:overlap:position:.

Here is the call graph for this function:

◆ playLaunchFromStation

- (void) playLaunchFromStation

Extends class PlayerEntity.

Definition at line 501 of file PlayerEntitySound.m.

502{
503 [sBreakPatternSource playCustomSoundWithKey:@"[player-launch-from-station]"];
504}

References OOSoundSource::playCustomSoundWithKey:, and playLaunchFromStation.

Referenced by playLaunchFromStation.

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

◆ playLegacyScriptSound:

- (void) playLegacyScriptSound: (NSString*) key

Extends class PlayerEntity.

Definition at line 649 of file PlayerEntitySound.m.

649 :(NSString*)key
650{
652}
void playSoundWithKey:priority:(NSString *key,[priority] float priority)

References OOSoundSourcePool::playSoundWithKey:priority:.

Here is the call graph for this function:

◆ playMenuNavigationDown

- (void) playMenuNavigationDown

Extends class PlayerEntity.

Definition at line 351 of file PlayerEntitySound.m.

352{
353 [self playInterfaceBeep:@"[menu-navigation-down]"];
354}

References PlayerEntity::playInterfaceBeep:, and playMenuNavigationDown.

Referenced by playMenuNavigationDown.

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

◆ playMenuNavigationNot

- (void) playMenuNavigationNot

Extends class PlayerEntity.

Definition at line 356 of file PlayerEntitySound.m.

357{
358 [self playInterfaceBeep:@"[menu-navigation-not]"];
359}

References PlayerEntity::playInterfaceBeep:, and playMenuNavigationNot.

Referenced by playMenuNavigationNot.

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

◆ playMenuNavigationUp

- (void) playMenuNavigationUp

Extends class PlayerEntity.

Definition at line 346 of file PlayerEntitySound.m.

347{
348 [self playInterfaceBeep:@"[menu-navigation-up]"];
349}

References PlayerEntity::playInterfaceBeep:, and playMenuNavigationUp.

Referenced by playMenuNavigationUp.

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

◆ playMenuPageNext

- (void) playMenuPageNext

Extends class PlayerEntity.

Definition at line 366 of file PlayerEntitySound.m.

367{
368 [self playInterfaceBeep:@"[menu-previous-page]"];
369}

References PlayerEntity::playInterfaceBeep:, and playMenuPageNext.

Referenced by playMenuPageNext.

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

◆ playMenuPagePrevious

- (void) playMenuPagePrevious

Extends class PlayerEntity.

Definition at line 361 of file PlayerEntitySound.m.

362{
363 [self playInterfaceBeep:@"[menu-next-page]"];
364}

References PlayerEntity::playInterfaceBeep:, and playMenuPagePrevious.

Referenced by playMenuPagePrevious.

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

◆ playMineArmed

- (void) playMineArmed

Extends class PlayerEntity.

Definition at line 218 of file PlayerEntitySound.m.

219{
220 [self playInterfaceBeep:@"[mine-armed]"];
221}

References PlayerEntity::playInterfaceBeep:, and playMineArmed.

Referenced by playMineArmed.

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

◆ playMineLaunched:weaponIdentifier:

- (void) playMineLaunched: (Vector) weaponOffset
weaponIdentifier: (NSString*) weaponIdentifier 

Extends class PlayerEntity.

Definition at line 621 of file PlayerEntitySound.m.

621 :(Vector)weaponOffset weaponIdentifier:(NSString*)weaponIdentifier
622{
623 NSString* identifier = [weaponLaunched objectForKey:weaponIdentifier];
624 if (!identifier)
625 identifier = @"[mine_launched]";
626 [sWeaponSoundPool playSoundWithKey:identifier position:weaponOffset];
627}

References OOSoundSourcePool::playSoundWithKey:position:.

Here is the call graph for this function:

◆ playMissileArmed

- (void) playMissileArmed

Extends class PlayerEntity.

Definition at line 213 of file PlayerEntitySound.m.

214{
215 [self playInterfaceBeep:@"[missile-armed]"];
216}

References PlayerEntity::playInterfaceBeep:, and playMissileArmed.

Referenced by playMissileArmed.

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

◆ playMissileLaunched:weaponIdentifier:

- (void) playMissileLaunched: (Vector) weaponOffset
weaponIdentifier: (NSString*) weaponIdentifier 

Extends class PlayerEntity.

Definition at line 613 of file PlayerEntitySound.m.

613 :(Vector)weaponOffset weaponIdentifier:(NSString*)weaponIdentifier
614{
615 NSString* identifier = [weaponLaunched objectForKey:weaponIdentifier];
616 if (!identifier)
617 identifier = @"[missile_launched]";
618 [sWeaponSoundPool playSoundWithKey:identifier position:weaponOffset];
619}

References OOSoundSourcePool::playSoundWithKey:position:.

Here is the call graph for this function:

◆ playMissileLockedOn

- (void) playMissileLockedOn

Extends class PlayerEntity.

Definition at line 228 of file PlayerEntitySound.m.

229{
230 [self playInterfaceBeep:@"[missile-locked-on]"];
231}

References PlayerEntity::playInterfaceBeep:, and playMissileLockedOn.

Referenced by playMissileLockedOn.

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

◆ playMissileSafe

- (void) playMissileSafe

Extends class PlayerEntity.

Definition at line 223 of file PlayerEntitySound.m.

224{
225 [self playInterfaceBeep:@"[missile-safe]"];
226}

References PlayerEntity::playInterfaceBeep:, and playMissileSafe.

Referenced by playMissileSafe.

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

◆ playNextEquipmentSelected

- (void) playNextEquipmentSelected

Extends class PlayerEntity.

Definition at line 233 of file PlayerEntitySound.m.

234{
235 [self playInterfaceBeep:@"[next-equipment-selected]"];
236}

References PlayerEntity::playInterfaceBeep:, and playNextEquipmentSelected.

Referenced by playNextEquipmentSelected.

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

◆ playNextMissileSelected

- (void) playNextMissileSelected

Extends class PlayerEntity.

Definition at line 238 of file PlayerEntitySound.m.

239{
240 [self playInterfaceBeep:@"[next-missile-selected]"];
241}

References PlayerEntity::playInterfaceBeep:, and playNextMissileSelected.

Referenced by playNextMissileSelected.

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

◆ playNoTargetInMemory

- (void) playNoTargetInMemory

Extends class PlayerEntity.

Definition at line 306 of file PlayerEntitySound.m.

307{
308 [self playInterfaceBeep:@"[no-target-in-memory]"];
309}

References PlayerEntity::playInterfaceBeep:, and playNoTargetInMemory.

Referenced by playNoTargetInMemory.

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

◆ playSaveOverwriteNo

- (void) playSaveOverwriteNo

Extends class PlayerEntity.

Definition at line 286 of file PlayerEntitySound.m.

287{
288 [self playInterfaceBeep:@"[save-overwrite-no]"];
289}

References PlayerEntity::playInterfaceBeep:, and playSaveOverwriteNo.

Referenced by playSaveOverwriteNo.

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

◆ playSaveOverwriteYes

- (void) playSaveOverwriteYes

Extends class PlayerEntity.

Definition at line 281 of file PlayerEntitySound.m.

282{
283 [self playInterfaceBeep:@"[save-overwrite-yes]"];
284}

References PlayerEntity::playInterfaceBeep:, and playSaveOverwriteYes.

Referenced by playSaveOverwriteYes.

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

◆ playScrapeDamage:

- (void) playScrapeDamage: (Vector) attackVector

Extends class PlayerEntity.

Definition at line 587 of file PlayerEntitySound.m.

587 :(Vector)attackVector
588{
589 [sDamageSoundPool playSoundWithKey:@"[player-scrape-damage]" position:attackVector];
590}

References OOSoundSourcePool::playSoundWithKey:position:.

Here is the call graph for this function:

◆ playSellCommodity

- (void) playSellCommodity

Extends class PlayerEntity.

Definition at line 454 of file PlayerEntitySound.m.

455{
456 [sBuySellSourcePool playSoundWithKey:@"[sell-commodity]"];
457}

References playSellCommodity, and OOSoundSourcePool::playSoundWithKey:.

Referenced by playSellCommodity.

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

◆ playShieldHit:weaponIdentifier:

- (void) playShieldHit: (Vector) attackVector
weaponIdentifier: (NSString*) weaponIdentifier 

Extends class PlayerEntity.

Definition at line 571 of file PlayerEntitySound.m.

571 :(Vector)attackVector weaponIdentifier:(NSString*)weaponIdentifier
572{
573 NSString* identifier = [weaponShieldHit objectForKey:weaponIdentifier];
574 if (!identifier)
575 identifier = @"[player-hit-by-weapon]";
576 [sDamageSoundPool playSoundWithKey:identifier position:attackVector];
577}

References OOSoundSourcePool::playSoundWithKey:position:.

Here is the call graph for this function:

◆ playStandardHyperspace

- (void) playStandardHyperspace

Extends class PlayerEntity.

Definition at line 474 of file PlayerEntitySound.m.

475{
476 [sHyperspaceSoundSource playCustomSoundWithKey:@"[hyperspace-countdown-begun]"];
477}

References OOSoundSource::playCustomSoundWithKey:, and playStandardHyperspace.

Referenced by playStandardHyperspace.

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

◆ playTargetLost

- (void) playTargetLost

Extends class PlayerEntity.

Definition at line 301 of file PlayerEntitySound.m.

302{
303 [self playInterfaceBeep:@"[target-lost]"];
304}

References PlayerEntity::playInterfaceBeep:, and playTargetLost.

Referenced by playTargetLost.

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

◆ playTargetSwitched

- (void) playTargetSwitched

Extends class PlayerEntity.

Definition at line 311 of file PlayerEntitySound.m.

312{
313 [self playInterfaceBeep:@"[target-switched]"];
314}

References PlayerEntity::playInterfaceBeep:, and playTargetSwitched.

Referenced by playTargetSwitched.

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

◆ playWeaponOverheated:

- (void) playWeaponOverheated: (Vector) weaponOffset

Extends class PlayerEntity.

Definition at line 608 of file PlayerEntitySound.m.

608 :(Vector)weaponOffset
609{
610 [sWeaponSoundPool playSoundWithKey:@"[weapon-overheat]" overlap:NO position:weaponOffset];
611}
void playSoundWithKey:overlap:position:(NSString *key,[overlap] BOOL overlap,[position] Vector position)

References OOSoundSourcePool::playSoundWithKey:overlap:position:.

Here is the call graph for this function:

◆ playWeaponsOffline

- (void) playWeaponsOffline

Extends class PlayerEntity.

Definition at line 248 of file PlayerEntitySound.m.

249{
250 [self playInterfaceBeep:@"[weapons-offline]"];
251}

References PlayerEntity::playInterfaceBeep:, and playWeaponsOffline.

Referenced by playWeaponsOffline.

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

◆ playWeaponsOnline

- (void) playWeaponsOnline

Extends class PlayerEntity.

Definition at line 243 of file PlayerEntitySound.m.

244{
245 [self playInterfaceBeep:@"[weapons-online]"];
246}

References PlayerEntity::playInterfaceBeep:, and playWeaponsOnline.

Referenced by playWeaponsOnline.

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

◆ playWitchjumpBlocked

- (void) playWitchjumpBlocked

Extends class PlayerEntity.

Definition at line 551 of file PlayerEntitySound.m.

552{
553 [sWarningSoundPool playSoundWithKey:@"[witch-blocked-by-@]" priority:1.3 position:kWitchspacePosition];
554}

References OOSoundSourcePool::playSoundWithKey:priority:position:, and playWitchjumpBlocked.

Referenced by playWitchjumpBlocked.

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

◆ playWitchjumpDistanceTooGreat

- (void) playWitchjumpDistanceTooGreat

Extends class PlayerEntity.

Definition at line 556 of file PlayerEntitySound.m.

557{
558 [sWarningSoundPool playSoundWithKey:@"[witch-too-far]" priority:1.3 position:kWitchspacePosition];
559}

References OOSoundSourcePool::playSoundWithKey:priority:position:, and playWitchjumpDistanceTooGreat.

Referenced by playWitchjumpDistanceTooGreat.

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

◆ playWitchjumpFailure

- (void) playWitchjumpFailure

Extends class PlayerEntity.

Definition at line 541 of file PlayerEntitySound.m.

542{
543 [sWarningSoundPool playSoundWithKey:@"[witchdrive-failure]" priority:1.5 position:kWitchspacePosition];
544}

References OOSoundSourcePool::playSoundWithKey:priority:position:, and playWitchjumpFailure.

Referenced by playWitchjumpFailure.

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

◆ playWitchjumpInsufficientFuel

- (void) playWitchjumpInsufficientFuel

Extends class PlayerEntity.

Definition at line 561 of file PlayerEntitySound.m.

562{
563 [sWarningSoundPool playSoundWithKey:@"[witch-no-fuel]" priority:1.3 position:kWitchspacePosition];
564}

References OOSoundSourcePool::playSoundWithKey:priority:position:, and playWitchjumpInsufficientFuel.

Referenced by playWitchjumpInsufficientFuel.

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

◆ playWitchjumpMisjump

- (void) playWitchjumpMisjump

Extends class PlayerEntity.

Definition at line 546 of file PlayerEntitySound.m.

547{
548 [sWarningSoundPool playSoundWithKey:@"[witchdrive-malfunction]" priority:1.5 position:kWitchspacePosition];
549}

References OOSoundSourcePool::playSoundWithKey:priority:position:, and playWitchjumpMisjump.

Referenced by playWitchjumpMisjump.

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

◆ setUpSound

- (void) setUpSound

Extends class PlayerEntity.

Definition at line 70 of file PlayerEntitySound.m.

71{
72 [self destroySound];
73
74 sInterfaceBeepSource = [[OOSoundSource alloc] init];
75 [sInterfaceBeepSource setPosition:kInterfaceBeepPosition];
76
77 sBreakPatternSource = [[OOSoundSource alloc] init];
78 [sBreakPatternSource setPosition:kBreakPatternPosition];
79
80 sEcmSource = [[OOSoundSource alloc] init];
81 [sEcmSource setPosition:kEcmPosition];
82
84 [sHyperspaceSoundSource setPosition:kWitchspacePosition];
85
86 sBuySellSourcePool = [[OOSoundSourcePool alloc] initWithCount:kBuySellSourcePoolSize minRepeatTime:0.0];
87 sWarningSoundPool = [[OOSoundSourcePool alloc] initWithCount:kWarningPoolSize minRepeatTime:0.0];
88 sWeaponSoundPool = [[OOSoundSourcePool alloc] initWithCount:kWeaponPoolSize minRepeatTime:0.0];
89 sDamageSoundPool = [[OOSoundSourcePool alloc] initWithCount:kDamagePoolSize minRepeatTime:0.1]; // Repeat time limit is to avoid playing a scrape sound every frame on glancing scrapes. This does limit the number of laser hits that can be played in a furrball, though; maybe lasers and scrapes should use different pools.
90 sMiscSoundPool = [[OOSoundSourcePool alloc] initWithCount:kMiscPoolSize minRepeatTime:0.0];
91
92 // Two sources with the same sound are used to simulate looping.
93 OOSound* afterburnerSound = [ResourceManager ooSoundNamed:@"afterburner1.ogg" inFolder:@"Sounds"];
94 sAfterburnerSources[0] = [[OOSoundSource alloc] initWithSound:afterburnerSound];
95 [sAfterburnerSources[0] setPosition:kAfterburner1Position];
96 sAfterburnerSources[1] = [[OOSoundSource alloc] initWithSound:afterburnerSound];
97 [sAfterburnerSources[1] setPosition:kAfterburner2Position];
98}
void setPosition:(Vector inPosition)
OOSound * ooSoundNamed:inFolder:(NSString *fileName,[inFolder] NSString *folderName)

References PlayerEntity::destroySound, ResourceManager::ooSoundNamed:inFolder:, sAfterburnerSources, sBreakPatternSource, sBuySellSourcePool, sDamageSoundPool, sEcmSource, OOSoundSource::setPosition:, setUpSound, sHyperspaceSoundSource, sInterfaceBeepSource, sMiscSoundPool, sWarningSoundPool, and sWeaponSoundPool.

Referenced by setUpSound.

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

◆ setUpWeaponSounds

- (void) setUpWeaponSounds

Extends class PlayerEntity.

Definition at line 101 of file PlayerEntitySound.m.

102{
103 NSArray* eqTypes = [OOEquipmentType allEquipmentTypes];
104 NSMutableDictionary* shotMissSounds = [NSMutableDictionary dictionary];
105 NSMutableDictionary* shotHitSounds = [NSMutableDictionary dictionary];
106 NSMutableDictionary* shieldHitSounds = [NSMutableDictionary dictionary];
107 NSMutableDictionary* unshieldedHitSounds = [NSMutableDictionary dictionary];
108 NSMutableDictionary* weaponLaunchedSounds = [NSMutableDictionary dictionary];
109 NSEnumerator* eqTypeEnum = nil;
110 OOEquipmentType* eqType = nil;
111
112 // special case: turrets aren't defined with a "EQ_WEAPON" prefix, and plasma shots don't have a matching equipment item,
113 // so add a unique entry here. this could be overridden if an OXP creates an equipment item with this key.
114 // plasma shots don't make a sound when fired, so we only need to provide for the hit player sound keys.
115 [shieldHitSounds setObject:@"[player-hit-by-weapon]" forKey:@"EQ_WEAPON_PLASMA_SHOT"];
116 [unshieldedHitSounds setObject:@"[player-direct-hit]" forKey:@"EQ_WEAPON_PLASMA_SHOT"];
117// grab a local copy of the sound identifiers for weapons to make the process of looking up a sound ref as fast as possible
118// but we must ensure that no nil values are used for setObject
119#define OO_ASSIGN_SOUNDSTR_TO_SOUNDS(soundStr, sounds) \
120 do { \
121 fxString = [eqType soundStr]; \
122 if (!fxString) \
123 fxString = @""; \
124 [sounds setObject:fxString forKey:[eqType identifier]]; \
125 } while (0)
126
127 for (eqTypeEnum = [eqTypes objectEnumerator]; (eqType = [eqTypeEnum nextObject]);) {
128 NSString* fxString = nil;
129 if ([[eqType identifier] hasPrefix:@"EQ_WEAPON"]) {
130 OO_ASSIGN_SOUNDSTR_TO_SOUNDS(fxShotMissName, shotMissSounds);
131 OO_ASSIGN_SOUNDSTR_TO_SOUNDS(fxShotHitName, shotHitSounds);
132 OO_ASSIGN_SOUNDSTR_TO_SOUNDS(fxShieldHitName, shieldHitSounds);
133 OO_ASSIGN_SOUNDSTR_TO_SOUNDS(fxUnshieldedHitName, unshieldedHitSounds);
134 }
135 if ([eqType isMissileOrMine]) {
136 OO_ASSIGN_SOUNDSTR_TO_SOUNDS(fxWeaponLaunchedName, weaponLaunchedSounds);
137 OO_ASSIGN_SOUNDSTR_TO_SOUNDS(fxShieldHitName, shieldHitSounds);
138 OO_ASSIGN_SOUNDSTR_TO_SOUNDS(fxUnshieldedHitName, unshieldedHitSounds);
139 }
140 }
141
147
148 weaponShotMiss = [[NSDictionary alloc] initWithDictionary:shotMissSounds];
149 weaponShotHit = [[NSDictionary alloc] initWithDictionary:shotHitSounds];
150 weaponShieldHit = [[NSDictionary alloc] initWithDictionary:shieldHitSounds];
151 weaponUnshieldedHit = [[NSDictionary alloc] initWithDictionary:unshieldedHitSounds];
152 weaponLaunched = [[NSDictionary alloc] initWithDictionary:weaponLaunchedSounds];
153}
#define OO_ASSIGN_SOUNDSTR_TO_SOUNDS(soundStr, sounds)
NSArray * allEquipmentTypes()

References OOEquipmentType::allEquipmentTypes, DESTROY, nil, OO_ASSIGN_SOUNDSTR_TO_SOUNDS, setUpWeaponSounds, weaponLaunched, weaponShieldHit, weaponShotHit, weaponShotMiss, and weaponUnshieldedHit.

Referenced by setUpWeaponSounds.

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

◆ startAfterburnerSound

- (void) startAfterburnerSound

Extends class PlayerEntity.

Definition at line 426 of file PlayerEntitySound.m.

427{
428 if (!afterburnerSoundLooping) {
429 afterburnerSoundLooping = YES;
430 [self updateAfterburnerSound];
431 }
432}

References startAfterburnerSound, and PlayerEntity::updateAfterburnerSound.

Referenced by startAfterburnerSound.

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

◆ stopAfterburnerSound

- (void) stopAfterburnerSound

Extends class PlayerEntity.

Definition at line 434 of file PlayerEntitySound.m.

435{
436 // Do nothing, stop is detected in updateAfterburnerSound
437}

References stopAfterburnerSound.

Referenced by stopAfterburnerSound.

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

◆ updateAfterburnerSound

- (void) updateAfterburnerSound
implementation

Extends class PlayerEntity.

Definition at line 407 of file PlayerEntitySound.m.

408{
409 static uint8_t which = 0;
410
411 if (!afterburner_engaged) // end the loop cycle
412 {
413 afterburnerSoundLooping = NO;
414 }
415
416 if (afterburnerSoundLooping) {
417 [sAfterburnerSources[which] play];
418 which = !which;
419
420 [self performSelector:@selector(updateAfterburnerSound)
421 withObject:NULL
422 afterDelay:1.25]; // and swap sounds in 1.25s time
423 }
424}

References OOSoundSource::play, and updateAfterburnerSound.

Referenced by updateAfterburnerSound.

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

◆ updateFuelScoopSoundWithInterval:

- (void) updateFuelScoopSoundWithInterval: (OOTimeDelta) delta_t

Extends class PlayerEntity.

Definition at line 386 of file PlayerEntitySound.m.

386 :(OOTimeDelta)delta_t
387{
388 static double scoopSoundPlayTime = 0.0;
389 scoopSoundPlayTime -= delta_t;
390 if (scoopSoundPlayTime < 0.0) {
391 if (![sInterfaceBeepSource isPlaying]) {
392 /* TODO: this should use the scoop position, not the standard
393 * interface beep position */
394 [self playInterfaceBeep:@"[scoop]"];
395 scoopSoundPlayTime = 0.5;
396 } else
397 scoopSoundPlayTime = 0.0;
398 }
399 if (![self scoopOverride]) {
400 scoopSoundPlayTime = 0.0;
401 }
402}
double OOTimeDelta
Definition OOTypes.h:193

References PlayerEntity::playInterfaceBeep:, and sInterfaceBeepSource.

Here is the call graph for this function:

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