aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2008-05-24 01:17:04 +0000
committerTravis Howell2008-05-24 01:17:04 +0000
commit942f838924f286cc23258dd538199dbcda8c9929 (patch)
tree02fe7d0af824960ebd96c96803e9041451272e86 /engines
parent9c5014f6b96c00f83eaa1127f91b359cc3bdd98f (diff)
downloadscummvm-rg350-942f838924f286cc23258dd538199dbcda8c9929.tar.gz
scummvm-rg350-942f838924f286cc23258dd538199dbcda8c9929.tar.bz2
scummvm-rg350-942f838924f286cc23258dd538199dbcda8c9929.zip
Add Max's patch for AGOSEngine::pauseEngineIntern().
svn-id: r32241
Diffstat (limited to 'engines')
-rw-r--r--engines/agos/agos.cpp32
-rw-r--r--engines/agos/agos.h1
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();