123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- /*
- ** Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
- **
- ** File: suspendedplaysoundaction.cpp
- **
- ** Author:
- **
- ** Description:
- ** Implementation of the training library "suspendedplaysoundaction" interface.
- **
- ** History:
- */
- #include "pch.h"
- #include "SuspendedPlaySoundAction.h"
- #include "SuspendedSoundFinishedCondition.h"
- #include "TrainingMission.h"
- namespace Training
- {
- //------------------------------------------------------------------------------
- // global variabes
- //------------------------------------------------------------------------------
- extern TrainingMission* g_pMission;
- //------------------------------------------------------------------------------
- // class methods
- //------------------------------------------------------------------------------
- /* void */ SuspendedPlaySoundAction::SuspendedPlaySoundAction (SoundID soundID, bool bDeleteWhenDone) :
- PlaySoundAction (soundID),
- m_bDeleteWhenDone (bDeleteWhenDone)
- {
- }
- //------------------------------------------------------------------------------
- /* void */ SuspendedPlaySoundAction::~SuspendedPlaySoundAction (void)
- {
- }
- //------------------------------------------------------------------------------
- void SuspendedPlaySoundAction::Execute (void)
- {
- if (m_soundID != NA)
- {
- g_pMission->AddWaitCondition (new SuspendedSoundFinishedCondition (this, m_bDeleteWhenDone));
- PlaySoundAction::Execute ();
- }
- }
- //------------------------------------------------------------------------------
- }
|