diff options
author | whitertandrek | 2018-03-25 22:32:07 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2018-06-28 23:51:32 +0200 |
commit | 0e39a87862253841e133a8f098b492cd4f5dd255 (patch) | |
tree | 1f5c994f379880bc4b65937e93e8997df21895e2 /engines/pink/objects/actions/action_sound.cpp | |
parent | c6df869fec46858d25d294854c1e446ca47fd85d (diff) | |
download | scummvm-rg350-0e39a87862253841e133a8f098b492cd4f5dd255.tar.gz scummvm-rg350-0e39a87862253841e133a8f098b492cd4f5dd255.tar.bz2 scummvm-rg350-0e39a87862253841e133a8f098b492cd4f5dd255.zip |
PINK: Implemented changing page and module, but without unloading old page. For now it can play logo of Wanderlust Interactive, then logo of MGM and Localizer Logo.
Diffstat (limited to 'engines/pink/objects/actions/action_sound.cpp')
-rw-r--r-- | engines/pink/objects/actions/action_sound.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/pink/objects/actions/action_sound.cpp b/engines/pink/objects/actions/action_sound.cpp index 38f8687d33..42d279553b 100644 --- a/engines/pink/objects/actions/action_sound.cpp +++ b/engines/pink/objects/actions/action_sound.cpp @@ -26,6 +26,7 @@ #include <engines/pink/objects/actors/actor.h> #include <engines/pink/objects/pages/game_page.h> #include <engines/pink/sound.h> +#include "engines/pink/pink.h" namespace Pink { @@ -53,6 +54,10 @@ void ActionSound::start(bool unk) { Audio::Mixer::SoundType soundType = _isBackground ? Audio::Mixer::SoundType::kMusicSoundType : Audio::Mixer::SoundType::kSpeechSoundType; + + Director *director = _actor->getPage()->getGame()->getDirector(); + director->addSound(this); + _sound->play(soundType, _volume, _isLoop); if (_isLoop) _actor->endAction(); @@ -62,6 +67,10 @@ void ActionSound::start(bool unk) { void ActionSound::end() { debug("ActionSound %s of Actor %s is ended", _name.c_str(), _actor->getName().c_str()); + + Director *director = _actor->getPage()->getGame()->getDirector(); + director->removeSound(this); + _sound->stop(); delete _sound; _sound = nullptr; |