aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorFilippos Karapetis2009-05-14 10:24:39 +0000
committerFilippos Karapetis2009-05-14 10:24:39 +0000
commit891a8fae05d81f7cbc8da1e191e2da84107e0737 (patch)
treeac0450bff88f98ca7bcaea15b358aa29293eb12d /engines/sci/engine
parent999d46b241a4aade493f76b4f3623a39c4fed930 (diff)
downloadscummvm-rg350-891a8fae05d81f7cbc8da1e191e2da84107e0737.tar.gz
scummvm-rg350-891a8fae05d81f7cbc8da1e191e2da84107e0737.tar.bz2
scummvm-rg350-891a8fae05d81f7cbc8da1e191e2da84107e0737.zip
- Removed SCI_VERSION_FTU_NEW_GETTIME
- Added defines for SCI0 flags, to simplify game entries - Removed the leftover version_lock_flag from EngineState svn-id: r40553
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/game.cpp9
-rw-r--r--engines/sci/engine/kernel.cpp2
-rw-r--r--engines/sci/engine/state.cpp1
-rw-r--r--engines/sci/engine/state.h1
4 files changed, 2 insertions, 11 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index c7909b76c1..ca88ff1731 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -386,15 +386,8 @@ static int create_class_table_sci0(EngineState *s) {
int script_init_engine(EngineState *s, sci_version_t version) {
int result;
- s->version = 0;
s->kernel_opt_flags = 0;
-
- if (!version) {
- s->version_lock_flag = 0;
- } else {
- s->version = version;
- s->version_lock_flag = 1; // Lock version
- }
+ s->version = version;
if (s->version >= SCI_VERSION(1, 001, 000))
result = create_class_table_sci11(s);
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 8c4fc596ce..d22e04ea05 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -359,7 +359,7 @@ reg_t kGetTime(EngineState *s, int funct_nr, int argc, reg_t *argv) {
g_system->getTimeAndDate(loc_time);
start_time = g_system->getMillis() - s->game_start_time;
- if (argc && s->version < SCI_VERSION_FTU_NEW_GETTIME) { // Use old semantics
+ if (argc && s->flags & GF_SCI0_OLDGETTIME) { // Use old semantics
retval = loc_time.tm_sec + loc_time.tm_min * 60 + (loc_time.tm_hour % 12) * 3600;
debugC(2, kDebugLevelTime, "GetTime(timeofday) returns %d", retval);
return make_reg(0, retval);
diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp
index 948e10ff71..a1f6c4096f 100644
--- a/engines/sci/engine/state.cpp
+++ b/engines/sci/engine/state.cpp
@@ -98,7 +98,6 @@ EngineState::EngineState() : _dirseeker(this) {
last_wait_time = 0;
- version_lock_flag = 0;
version = 0;
_fileHandles.resize(5);
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index 8e7b92f5a1..1a98cc4349 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -194,7 +194,6 @@ public:
uint32 game_start_time; /**< The time at which the interpreter was started */
uint32 last_wait_time; /**< The last time the game invoked Wait() */
- byte version_lock_flag; /**< Set to 1 to disable any autodetection mechanisms */
sci_version_t version; /**< The approximated patchlevel of the version to emulate */
uint32 flags; /* Specific game flags */