From 5e83e27bf6990f316d4fb2571b213fd8689dd861 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 12 May 2009 18:57:28 +0000 Subject: Performed some cleanup on the different version checks svn-id: r40499 --- engines/sci/engine/game.cpp | 2 +- engines/sci/engine/kgraphics.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'engines/sci/engine') diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp index 905ed878f7..a8e3316a4d 100644 --- a/engines/sci/engine/game.cpp +++ b/engines/sci/engine/game.cpp @@ -388,7 +388,7 @@ int script_init_engine(EngineState *s, sci_version_t version) { s->max_version = SCI_VERSION(9, 999, 999); s->min_version = 0; //Set no real limits - s->version = SCI_VERSION_DEFAULT_SCI0; + s->version = 0; s->kernel_opt_flags = 0; if (!version) { diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp index 9d1b1c88ca..abf2fc8fdb 100644 --- a/engines/sci/engine/kgraphics.cpp +++ b/engines/sci/engine/kgraphics.cpp @@ -1129,8 +1129,14 @@ void _k_base_setter(EngineState *s, reg_t object) { if (lookup_selector(s, object, s->selector_map.brLeft, NULL, NULL) != kSelectorVariable) return; // non-fatal - if (s->version <= SCI_VERSION_LTU_BASE_OB1) + // Note: there was a check here for a very old version of SCI, which supposedly needed + // to subtract 1 from absrect.top. The original check was for version 0.000.256, which + // does not exist (earliest one was KQ4 SCI, version 0.000.274). This code is left here + // for reference only +#if 0 + if (s->version <= SCI_VERSION(0,000,256)) --absrect.top; // Compensate for early SCI OB1 'bug' +#endif PUT_SEL32V(object, brLeft, absrect.left); PUT_SEL32V(object, brRight, absrect.right); -- cgit v1.2.3