diff options
author | Filippos Karapetis | 2009-10-06 17:45:57 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-10-06 17:45:57 +0000 |
commit | c17495d8952e03de03288829c487a60014d2656e (patch) | |
tree | ae7e256e67214ad505156256182476de7ccea370 /engines/sci/engine | |
parent | b8f18e8ddd60c9e7cf063f449857f855ba9bd323 (diff) | |
download | scummvm-rg350-c17495d8952e03de03288829c487a60014d2656e.tar.gz scummvm-rg350-c17495d8952e03de03288829c487a60014d2656e.tar.bz2 scummvm-rg350-c17495d8952e03de03288829c487a60014d2656e.zip |
- Fixed kGetTime() again
- Removed the odd way of calculating elapsed time in SciGui(). We got _system->getMillis() for that purpose
- Replaced the code in SciGui::wait() with the one in SciGui32::wait (which works fine, and is correct). The code in SciGui() was not polling for events while waiting, either
svn-id: r44712
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kmisc.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index 6650810dc6..dbe562b25a 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -116,11 +116,11 @@ enum { reg_t kGetTime(EngineState *s, int argc, reg_t *argv) { tm loc_time; - uint32 start_time; + uint32 elapsedTime; int retval = 0; // Avoid spurious warning g_system->getTimeAndDate(loc_time); - start_time = g_system->getMillis() - s->game_start_time; + elapsedTime = g_system->getMillis() - s->game_start_time; if ((s->_flags & GF_SCI0_OLDGETTIME) && argc) { // Use old semantics retval = (loc_time.tm_hour % 12) * 3600 + loc_time.tm_min * 60 + loc_time.tm_sec; @@ -132,8 +132,7 @@ reg_t kGetTime(EngineState *s, int argc, reg_t *argv) { switch (mode) { case K_NEW_GETTIME_TICKS : - retval = s->gui->getTimeTicks(); // FIXME - //retval = start_time * 60 / 1000; + retval = elapsedTime * 60 / 1000; debugC(2, kDebugLevelTime, "GetTime(elapsed) returns %d", retval); break; case K_NEW_GETTIME_TIME_12HOUR : |