diff options
author | Filippos Karapetis | 2009-10-09 23:15:54 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-10-09 23:15:54 +0000 |
commit | d95ed757895e0afd70f21819a28124ce954dd899 (patch) | |
tree | b12e1d5b14521d2e7ce0e1ba5b9168ff8d2a24b0 /engines/sci/engine/kmisc.cpp | |
parent | 8b3ff337beadb78a8baca971043266f9a019d104 (diff) | |
download | scummvm-rg350-d95ed757895e0afd70f21819a28124ce954dd899.tar.gz scummvm-rg350-d95ed757895e0afd70f21819a28124ce954dd899.tar.bz2 scummvm-rg350-d95ed757895e0afd70f21819a28124ce954dd899.zip |
Removed the wrong code for kGetTime case 1 in some SCI0 games - that case has always remained the same in all SCI versions. Added a warning in case we got some other case than 0 or 1 in SCI0 games
svn-id: r44855
Diffstat (limited to 'engines/sci/engine/kmisc.cpp')
-rw-r--r-- | engines/sci/engine/kmisc.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index 46533f4e34..7f8667af18 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -120,14 +120,11 @@ reg_t kGetTime(EngineState *s, int argc, reg_t *argv) { g_system->getTimeAndDate(loc_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; - debugC(2, kDebugLevelTime, "GetTime(timeofday) returns %d", retval); - return make_reg(0, retval); - } - int mode = (argc > 0) ? argv[0].toUint16() : 0; + if (getSciVersion() <= SCI_VERSION_0_LATE && mode > 1) + warning("kGetTime called in SCI0 with mode %d (expected 0 or 1)", mode); + switch (mode) { case K_NEW_GETTIME_TICKS : retval = elapsedTime * 60 / 1000; |