diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agos/agos.cpp | 32 | ||||
-rw-r--r-- | engines/agos/agos.h | 1 |
2 files changed, 20 insertions, 13 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 51619bd3cb..9b22240f83 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -917,25 +917,31 @@ GUI::Debugger *AGOSEngine::getDebugger() { return _debugger; } -void AGOSEngine::pause() { - _keyPressed.reset(); - _pause = true; - bool ambient_status = _ambientPaused; - bool music_status = _musicPaused; +void AGOSEngine::pauseEngineIntern(bool pauseIt) { + if (pauseIt) { + _keyPressed.reset(); + _pause = true; + + _midi.pause(true); + _mixer->pauseAll(true); + _sound->ambientPause(true); + } else { + _pause = false; - _midi.pause(true); - _mixer->pauseAll(true); - _sound->ambientPause(true); + _midi.pause(_musicPaused); + _mixer->pauseAll(false); + _sound->ambientPause(_ambientPaused); + } +} + +void AGOSEngine::pause() { + pauseEngine(true); while (_pause) { delay(1); if (_keyPressed.keycode == Common::KEYCODE_p) - _pause = false; + pauseEngine(false); } - - _midi.pause(music_status); - _mixer->pauseAll(false); - _sound->ambientPause(ambient_status); } int AGOSEngine::go() { diff --git a/engines/agos/agos.h b/engines/agos/agos.h index 1d5eda8392..448d26a9d0 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -1205,6 +1205,7 @@ protected: void checkTimerCallback(); void delay(uint delay); void pause(); + virtual void pauseEngineIntern(bool pause); void waitForMark(uint i); void scrollScreen(); |