[Scummvm-cvs-logs] SF.net SVN: scummvm:[41117] scummvm/trunk/engines/kyra
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Tue Jun 2 01:38:56 CEST 2009
Revision: 41117
http://scummvm.svn.sourceforge.net/scummvm/?rev=41117&view=rev
Author: lordhoto
Date: 2009-06-01 23:38:56 +0000 (Mon, 01 Jun 2009)
Log Message:
-----------
- Remove LoLEngine::delayUntil it was identical to KyraEngine_v1 in its functionallity anyway
- Change KyraEngine_v1::delayUntil to a somewhat more LoLEngine::delayUntil like implementation
Modified Paths:
--------------
scummvm/trunk/engines/kyra/kyra_v1.cpp
scummvm/trunk/engines/kyra/lol.cpp
scummvm/trunk/engines/kyra/lol.h
Modified: scummvm/trunk/engines/kyra/kyra_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v1.cpp 2009-06-01 23:30:06 UTC (rev 41116)
+++ scummvm/trunk/engines/kyra/kyra_v1.cpp 2009-06-01 23:38:56 UTC (rev 41117)
@@ -476,9 +476,15 @@
}
void KyraEngine_v1::delayUntil(uint32 timestamp, bool updateTimers, bool update, bool isMainLoop) {
- while (_system->getMillis() < timestamp && !shouldQuit()) {
- if (timestamp - _system->getMillis() >= 10)
- delay(10, update, isMainLoop);
+ const uint32 curTime = _system->getMillis();
+ if (curTime > timestamp)
+ return;
+
+ uint32 del = timestamp - curTime;
+ while (del && !shouldQuit()) {
+ uint32 step = MIN<uint32>(del, _tickLength);
+ delay(step, update, isMainLoop);
+ del -= step;
}
}
Modified: scummvm/trunk/engines/kyra/lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/lol.cpp 2009-06-01 23:30:06 UTC (rev 41116)
+++ scummvm/trunk/engines/kyra/lol.cpp 2009-06-01 23:38:56 UTC (rev 41117)
@@ -1792,21 +1792,6 @@
}
}
-void LoLEngine::delayUntil(uint32 timeStamp) {
- const uint32 curTime = _system->getMillis();
- if (curTime < timeStamp)
- return;
-
- uint32 del = timeStamp - curTime;
- while (del && !shouldQuit()) {
- updateInput();
-
- uint32 step = MIN<uint32>(del, _tickLength);
- _system->delayMillis(step);
- del -= step;
- }
-}
-
uint8 LoLEngine::getRandomNumberSpecial() {
uint8 a = _rndSpecial & 0xff;
uint8 b = (_rndSpecial >> 8) & 0xff;
Modified: scummvm/trunk/engines/kyra/lol.h
===================================================================
--- scummvm/trunk/engines/kyra/lol.h 2009-06-01 23:30:06 UTC (rev 41116)
+++ scummvm/trunk/engines/kyra/lol.h 2009-06-01 23:38:56 UTC (rev 41117)
@@ -1292,7 +1292,6 @@
// misc
void delay(uint32 millis, bool doUpdate = false, bool isMainLoop = false);
- void delayUntil(uint32 timeStamp);
uint8 getRandomNumberSpecial();
uint8 _compassBroken;
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