diff options
author | Johannes Schickel | 2010-10-27 22:37:51 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-10-27 22:37:51 +0000 |
commit | 2ad28b8cd53c363f12d920c746795e0d371dc9f9 (patch) | |
tree | f849131b939c148f7843a60dd8d68b36ffb5a772 /engines/scumm/scumm.cpp | |
parent | 8a08ca1f39a0dc5ad6003d8213fe8aec4acb7327 (diff) | |
download | scummvm-rg350-2ad28b8cd53c363f12d920c746795e0d371dc9f9.tar.gz scummvm-rg350-2ad28b8cd53c363f12d920c746795e0d371dc9f9.tar.bz2 scummvm-rg350-2ad28b8cd53c363f12d920c746795e0d371dc9f9.zip |
ENGINE: Generalize SCUMM play time counting and move it into Engine.
This implements Max's idea on -devel
("Re: [Scummvm-devel] ATTN Engine authors: Advanced engine features") from
27.10.2010 on 11:12PM CEST.
Unlike the SCUMM implementation it stores the play time as ms instead of s.
The SCUMM engine was adapted to use this instead to reduce code duplication.
svn-id: r53892
Diffstat (limited to 'engines/scumm/scumm.cpp')
-rw-r--r-- | engines/scumm/scumm.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index d711888c2c..2c654402fa 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1927,7 +1927,7 @@ int ScummEngine::getTalkSpeed() { #pragma mark - Common::Error ScummEngine::go() { - _engineStartTime = _system->getMillis() / 1000; + resetTotalPlayTime(); // If requested, load a save game instead of running the boot script if (_saveLoadFlag != 2 || !loadState(_saveLoadSlot, _saveTemporaryState)) { @@ -2505,10 +2505,6 @@ void ScummEngine::startManiac() { 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); @@ -2526,10 +2522,6 @@ void ScummEngine::pauseEngineIntern(bool pause) { // Resume sound & video _sound->pauseSounds(_oldSoundsPaused); - - // Adjust engine start time - _engineStartTime += (_system->getMillis() - _pauseStartTime) / 1000; - _pauseStartTime = 0; } } |