From c17495d8952e03de03288829c487a60014d2656e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 6 Oct 2009 17:45:57 +0000 Subject: - 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 --- engines/sci/engine/kmisc.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'engines/sci/engine') 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 : -- cgit v1.2.3