diff options
author | Strangerke | 2013-06-26 01:06:22 +0200 |
---|---|---|
committer | Strangerke | 2013-06-26 01:06:22 +0200 |
commit | 1989cc9911709ccddf3999b772e786ec79f8fc3f (patch) | |
tree | fd61f2b3b374d78e070700215665ac0ae5502b26 /engines/mortevielle | |
parent | a3f77d63df7d462d8c9c8e85cca9ccc84f5f1e70 (diff) | |
download | scummvm-rg350-1989cc9911709ccddf3999b772e786ec79f8fc3f.tar.gz scummvm-rg350-1989cc9911709ccddf3999b772e786ec79f8fc3f.tar.bz2 scummvm-rg350-1989cc9911709ccddf3999b772e786ec79f8fc3f.zip |
MORTEVIELLE: Replace g_vm in SoundManager
Diffstat (limited to 'engines/mortevielle')
-rw-r--r-- | engines/mortevielle/mortevielle.cpp | 1 | ||||
-rw-r--r-- | engines/mortevielle/sound.cpp | 7 | ||||
-rw-r--r-- | engines/mortevielle/sound.h | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/engines/mortevielle/mortevielle.cpp b/engines/mortevielle/mortevielle.cpp index 104a340317..54bd0301aa 100644 --- a/engines/mortevielle/mortevielle.cpp +++ b/engines/mortevielle/mortevielle.cpp @@ -78,6 +78,7 @@ MortevielleEngine::MortevielleEngine(OSystem *system, const ADGameDescription *g _screenSurface.setParent(this); _mouse.setParent(this); _text.setParent(this); + _soundManager.setParent(this); _lastGameFrame = 0; _mouseClick = false; diff --git a/engines/mortevielle/sound.cpp b/engines/mortevielle/sound.cpp index bb85221d75..478af41c87 100644 --- a/engines/mortevielle/sound.cpp +++ b/engines/mortevielle/sound.cpp @@ -192,10 +192,13 @@ void SoundManager::musyc(tablint &tb, int nbseg, int att) { } // Keep waiting until the song has been finished - while (_speakerStream->isPlaying() && !g_vm->shouldQuit()) { - g_vm->delay(10); + while (_speakerStream->isPlaying() && !_vm->shouldQuit()) { + _vm->delay(10); } #endif } +void SoundManager::setParent(MortevielleEngine *vm) { + _vm = vm; +} } // End of namespace Mortevielle diff --git a/engines/mortevielle/sound.h b/engines/mortevielle/sound.h index 675fc78f78..a47e8db32e 100644 --- a/engines/mortevielle/sound.h +++ b/engines/mortevielle/sound.h @@ -34,6 +34,7 @@ #include "common/queue.h" namespace Mortevielle { +class MortevielleEngine; typedef int tablint[256]; @@ -93,6 +94,7 @@ public: class SoundManager { private: + MortevielleEngine *_vm; Audio::Mixer *_mixer; PCSpeaker *_speakerStream; Audio::SoundHandle _speakerHandle; @@ -100,6 +102,7 @@ public: SoundManager(Audio::Mixer *mixer); ~SoundManager(); + void setParent(MortevielleEngine *vm); void playNote(int frequency, int32 length); void decodeMusic(const byte *PSrc, byte *PDest, int NbreSeg); |