[Scummvm-cvs-logs] SF.net SVN: scummvm:[45210] scummvm/trunk/engines/kyra/lol.cpp
athrxx at users.sourceforge.net
athrxx at users.sourceforge.net
Sun Oct 18 01:52:57 CEST 2009
Revision: 45210
http://scummvm.svn.sourceforge.net/scummvm/?rev=45210&view=rev
Author: athrxx
Date: 2009-10-17 23:52:57 +0000 (Sat, 17 Oct 2009)
Log Message:
-----------
LOL: this (hopefully) fixes a minor glitch that might occur when using the freeze spell
Modified Paths:
--------------
scummvm/trunk/engines/kyra/lol.cpp
Modified: scummvm/trunk/engines/kyra/lol.cpp
===================================================================
--- scummvm/trunk/engines/kyra/lol.cpp 2009-10-17 22:50:42 UTC (rev 45209)
+++ scummvm/trunk/engines/kyra/lol.cpp 2009-10-17 23:52:57 UTC (rev 45210)
@@ -3206,24 +3206,30 @@
_screen->updateScreen();
}
- int del = (int)(delayTimer - _system->getMillis());
+ uint32 tm = _system->getMillis();
+ uint32 del = (delayTimer > tm) ? (delayTimer - tm) : 0;
+
do {
- int step = del > _tickLength ? _tickLength : del;
+ uint32 step = del > _tickLength ? _tickLength : del;
if (!pal1 || !pal2) {
- if (del > 0)
+ if (del) {
delay(step);
- del -= step;
+ del -= step;
+ }
continue;
}
- if (!_screen->fadePaletteStep(pal1, pal2, _system->getMillis() - startTime, _tickLength * fadeDelay) && !mov)
+ if (!_screen->fadePaletteStep(pal1, pal2, _system->getMillis() - startTime, _tickLength * fadeDelay) && !mov) {
+ updateInput();
return;
+ }
- if (del > 0)
+ if (del) {
delay(step);
- del -= step;
- } while (del > 0);
+ del -= step;
+ }
+ } while (del);
if (!mov)
continue;
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