diff options
author | Max Horn | 2007-06-30 22:22:25 +0000 |
---|---|---|
committer | Max Horn | 2007-06-30 22:22:25 +0000 |
commit | 9027076e5d1f7dbf8677cd7f919bab77ef30461b (patch) | |
tree | b43d605de812bc987e200cec4cde009c7ed596d1 /engines/scumm/scumm.cpp | |
parent | f445d8c8004536d12b049ec189ea6dd218295c88 (diff) | |
download | scummvm-rg350-9027076e5d1f7dbf8677cd7f919bab77ef30461b.tar.gz scummvm-rg350-9027076e5d1f7dbf8677cd7f919bab77ef30461b.tar.bz2 scummvm-rg350-9027076e5d1f7dbf8677cd7f919bab77ef30461b.zip |
Split Engine::pauseEngine: It now does pauseLevel handling, while engines can provide a simpler pauseEngineIntern method; provided default implementation of the latter which simply (un)pauses the mixer
svn-id: r27801
Diffstat (limited to 'engines/scumm/scumm.cpp')
-rw-r--r-- | engines/scumm/scumm.cpp | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index aa6bea45bf..2140b15544 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -121,8 +121,6 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) } _res = new ResourceManager(this); - _pauseLevel = 0; - // Convert MD5 checksum back into a digest for (int i = 0; i < 16; ++i) { char tmpStr[3] = "00"; @@ -2238,28 +2236,17 @@ void ScummEngine::startManiac() { #pragma mark --- GUI --- #pragma mark - -void ScummEngine::pauseEngine(bool pause) { - assert((pause && _pauseLevel >= 0) || (!pause && _pauseLevel)); - - if (pause) - _pauseLevel++; - else - _pauseLevel--; - - if (_pauseLevel == 1) { +void ScummEngine::pauseEngineIntern(bool pause) { + if (pause) { + // Record start of the pause, so that we can later + // adjust _engineStartTime accordingly. _pauseStartTime = _system->getMillis(); // Pause sound & video _oldSoundsPaused = _sound->_soundsPaused; _sound->pauseSounds(true); - //bool visible = CursorMan.isVisible(); - - } else if (_pauseLevel == 0) { - // Restore old cursor -- FIXME: Should be obsolete thanks to CursorMan - //updateCursor(); - //CursorMan.showMouse(visible); - + } else { // Update the screen to make it less likely that the player will see a // brief cursor palette glitch when the GUI is disabled. _system->updateScreen(); |