aboutsummaryrefslogtreecommitdiff
path: root/engines/lab/anim.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2015-12-13 04:53:12 +0200
committerWillem Jan Palenstijn2015-12-23 21:34:01 +0100
commit452c20ab8abd8f01050e37f355fa2efeb6ef3743 (patch)
tree186586fa9d801f70dc19940ca874d978090ea914 /engines/lab/anim.cpp
parent1b0a7db0b604b5dddaa0e01cbafe2f3fdc760ce9 (diff)
downloadscummvm-rg350-452c20ab8abd8f01050e37f355fa2efeb6ef3743.tar.gz
scummvm-rg350-452c20ab8abd8f01050e37f355fa2efeb6ef3743.tar.bz2
scummvm-rg350-452c20ab8abd8f01050e37f355fa2efeb6ef3743.zip
LAB: Get rid of the rest of the custom time delay functions
Diffstat (limited to 'engines/lab/anim.cpp')
-rw-r--r--engines/lab/anim.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/lab/anim.cpp b/engines/lab/anim.cpp
index ac51860ed7..347841d8d1 100644
--- a/engines/lab/anim.cpp
+++ b/engines/lab/anim.cpp
@@ -46,8 +46,6 @@ Anim::Anim(LabEngine *vm) : _vm(vm) {
_headerdata._height = 0;
_headerdata._fps = 0;
_headerdata._flags = 0;
- _waitSec = 0;
- _waitMicros = 0;
_delayMicros = 0;
_continuous = false;
_isPlaying = false;
@@ -98,8 +96,9 @@ void Anim::diffNextFrame(bool onlyDiffData) {
if (!onlyDiffData) {
if (_headerdata._fps) {
- _vm->_utils->waitForTime(_waitSec, _waitMicros);
- _vm->_utils->addCurTime(0L, _delayMicros, &_waitSec, &_waitMicros);
+ uint32 targetMillis = g_system->getMillis() + _delayMicros;
+ while (g_system->getMillis() < targetMillis)
+ g_system->delayMillis(10);
}
if (_isPal && !_noPalChange) {
@@ -273,8 +272,6 @@ void Anim::stopDiffEnd() {
*/
void Anim::readDiff(byte *buffer, bool playOnce, bool onlyDiffData) {
_playOnce = playOnce;
- _waitSec = 0;
- _waitMicros = 0;
_delayMicros = 0;
_header = 0;
_curBit = 0;