diff options
author | Max Horn | 2008-01-01 11:41:47 +0000 |
---|---|---|
committer | Max Horn | 2008-01-01 11:41:47 +0000 |
commit | 0ad70c7d8474cd2f1a3edc1710fde5ec7754c5a3 (patch) | |
tree | d8fa44ab900e60bd3e4a824333b6103dc9ac16d8 | |
parent | 305f60e0dbefa3861f5ca3614a2b930aca8afc2c (diff) | |
download | scummvm-rg350-0ad70c7d8474cd2f1a3edc1710fde5ec7754c5a3.tar.gz scummvm-rg350-0ad70c7d8474cd2f1a3edc1710fde5ec7754c5a3.tar.bz2 scummvm-rg350-0ad70c7d8474cd2f1a3edc1710fde5ec7754c5a3.zip |
SCUMM: Moved tick duration into a constant
svn-id: r30112
-rw-r--r-- | engines/scumm/scumm.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 127bd76a11..2460c24fbc 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1722,6 +1722,10 @@ int ScummEngine::getTalkspeed() { #pragma mark --- Main loop --- #pragma mark - +enum { + kTickDuration = 15 // Corresponds to a tick frequency of 1000/15 = 66.6 Hz +}; + int ScummEngine::go() { _engineStartTime = _system->getMillis() / 1000; @@ -1746,7 +1750,7 @@ int ScummEngine::go() { _rnd.getRandomNumber(2); diff -= _system->getMillis(); - waitForTimer(delta * 15 + diff); + waitForTimer(delta * kTickDuration + diff); diff = _system->getMillis(); delta = scummLoop(delta); @@ -1834,7 +1838,7 @@ int ScummEngine::scummLoop(int delta) { // to get it correct for all games. Without the ability to watch/listen to the // original games, I can't do that myself. const int MUSIC_DELAY = 350; - _tempMusic += delta * 15; // Convert delta to milliseconds + _tempMusic += delta * kTickDuration; // Convert delta to milliseconds if (_tempMusic >= MUSIC_DELAY) { _tempMusic -= MUSIC_DELAY; VAR(VAR_MUSIC_TIMER) += 1; |