[Scummvm-cvs-logs] SF.net SVN: scummvm:[43534] scummvm/trunk/engines/kyra/script_hof.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Wed Aug 19 10:54:42 CEST 2009
Revision: 43534
http://scummvm.svn.sourceforge.net/scummvm/?rev=43534&view=rev
Author: lordhoto
Date: 2009-08-19 08:54:41 +0000 (Wed, 19 Aug 2009)
Log Message:
-----------
Cleanup.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/script_hof.cpp
Modified: scummvm/trunk/engines/kyra/script_hof.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_hof.cpp 2009-08-19 08:46:59 UTC (rev 43533)
+++ scummvm/trunk/engines/kyra/script_hof.cpp 2009-08-19 08:54:41 UTC (rev 43534)
@@ -186,20 +186,14 @@
int backUp = stackPos(8);
_screen->hideMouse();
- uint32 endTime = _system->getMillis() + waitTime * _tickLength;
+ const uint32 endTime = _system->getMillis() + waitTime * _tickLength;
_wsaSlots[slot]->displayFrame(frame, dstPage, x, y, copyParam | 0xC000, 0, 0);
_screen->updateScreen();
if (backUp)
memcpy(_gamePlayBuffer, _screen->getCPagePtr(3), 46080);
- while (_system->getMillis() < endTime) {
- if (doUpdate)
- update();
-
- if (endTime - _system->getMillis() >= 10)
- delay(10);
- }
+ delayUntil(endTime, false, doUpdate != 0);
_screen->showMouse();
return 0;
}
@@ -224,34 +218,22 @@
while (curTime < maxTimes) {
if (startFrame < endFrame) {
for (int i = startFrame; i <= endFrame; ++i) {
- uint32 endTime = _system->getMillis() + waitTime * _tickLength;
+ const uint32 endTime = _system->getMillis() + waitTime * _tickLength;
_wsaSlots[slot]->displayFrame(i, 0, x, y, 0xC000 | copyFlags, 0, 0);
if (!skipFlag()) {
_screen->updateScreen();
-
- do {
- update();
-
- if (endTime - _system->getMillis() >= 10)
- delay(10);
- } while (_system->getMillis() < endTime);
+ delayUntil(endTime, false, true);
}
}
} else {
for (int i = startFrame; i >= endFrame; --i) {
- uint32 endTime = _system->getMillis() + waitTime * _tickLength;
+ const uint32 endTime = _system->getMillis() + waitTime * _tickLength;
_wsaSlots[slot]->displayFrame(i, 0, x, y, 0xC000 | copyFlags, 0, 0);
if (!skipFlag()) {
_screen->updateScreen();
-
- do {
- update();
-
- if (endTime - _system->getMillis() >= 10 && !skipFlag())
- delay(10);
- } while (_system->getMillis() < endTime && !skipFlag());
+ delayUntil(endTime, false, true);
}
}
}
@@ -282,7 +264,7 @@
_screen->hideMouse();
while (currentFrame <= lastFrame) {
- uint32 endTime = _system->getMillis() + frameDelay;
+ const uint32 endTime = _system->getMillis() + frameDelay;
_wsaSlots[index]->displayFrame(currentFrame++, 0, stackPos(0), stackPos(1), copyParam, 0, 0);
if (!skipFlag()) {
_screen->updateScreen();
@@ -310,7 +292,7 @@
const int lastFrame = _wsaSlots[index]->frames();
while (currentFrame <= lastFrame) {
- uint32 endTime = _system->getMillis() + frameDelay;
+ const uint32 endTime = _system->getMillis() + frameDelay;
_wsaSlots[index]->displayFrame(currentFrame++, 0, stackPos(0), stackPos(1), copyParam, 0, 0);
if (!skipFlag()) {
if (doUpdate)
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