diff options
author | Filippos Karapetis | 2015-12-13 04:53:12 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-12-23 21:34:01 +0100 |
commit | 452c20ab8abd8f01050e37f355fa2efeb6ef3743 (patch) | |
tree | 186586fa9d801f70dc19940ca874d978090ea914 /engines/lab/intro.cpp | |
parent | 1b0a7db0b604b5dddaa0e01cbafe2f3fdc760ce9 (diff) | |
download | scummvm-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/intro.cpp')
-rw-r--r-- | engines/lab/intro.cpp | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/engines/lab/intro.cpp b/engines/lab/intro.cpp index 0165116b00..b6fbf04f2b 100644 --- a/engines/lab/intro.cpp +++ b/engines/lab/intro.cpp @@ -75,19 +75,13 @@ void Intro::doPictText(const char *filename, TextFont *msgFont, bool isScreen) { char path[50] = "Lab:rooms/Intro/"; strcat(path, filename); - uint timeDelay; - if (isScreen) { - _vm->_music->updateMusic(); - timeDelay = 35; - } else { - _vm->_music->updateMusic(); - timeDelay = 7; - } + uint timeDelay = (isScreen) ? 35 : 7; + _vm->_music->updateMusic(); if (_quitIntro) return; - uint32 lastSecs = 0L, lastMicros = 0L, secs = 0L, micros = 0L; + uint32 lastMillis = 0; IntuiMessage *msg; bool drawNextText = true, end = false, begin = true; @@ -132,9 +126,7 @@ void Intro::doPictText(const char *filename, TextFont *msgFont, bool isScreen) { return; } - uint32 t = g_system->getMillis(); - lastSecs = t / 1000; - lastMicros = t % 1000; + lastMillis = g_system->getMillis(); } msg = _vm->getMsg(); @@ -143,12 +135,9 @@ void Intro::doPictText(const char *filename, TextFont *msgFont, bool isScreen) { _vm->_music->updateMusic(); _vm->_anim->diffNextFrame(); - uint32 t = g_system->getMillis(); - secs = t / 1000; - micros = t % 1000; - _vm->_utils->anyTimeDiff(lastSecs, lastMicros, secs, micros, &secs, µs); + uint32 elapsedSeconds = (g_system->getMillis() - lastMillis) / 1000; - if (secs > timeDelay) { + if (elapsedSeconds > timeDelay) { if (end) { if (isScreen) _vm->_graphics->fade(false, 0); |