[Scummvm-cvs-logs] SF.net SVN: scummvm: [30112] scummvm/trunk/engines/scumm/scumm.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Tue Jan 1 12:41:47 CET 2008
Revision: 30112
http://scummvm.svn.sourceforge.net/scummvm/?rev=30112&view=rev
Author: fingolfin
Date: 2008-01-01 03:41:47 -0800 (Tue, 01 Jan 2008)
Log Message:
-----------
SCUMM: Moved tick duration into a constant
Modified Paths:
--------------
scummvm/trunk/engines/scumm/scumm.cpp
Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp 2008-01-01 11:27:29 UTC (rev 30111)
+++ scummvm/trunk/engines/scumm/scumm.cpp 2008-01-01 11:41:47 UTC (rev 30112)
@@ -1722,6 +1722,10 @@
#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 @@
_rnd.getRandomNumber(2);
diff -= _system->getMillis();
- waitForTimer(delta * 15 + diff);
+ waitForTimer(delta * kTickDuration + diff);
diff = _system->getMillis();
delta = scummLoop(delta);
@@ -1834,7 +1838,7 @@
// 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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list