aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kscripts.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2010-11-17 18:46:29 +0000
committerFilippos Karapetis2010-11-17 18:46:29 +0000
commit61e02f0570a90c8691459bcdf348ebdd1bbcbf3f (patch)
tree0f60d86bb56b94a110e563f477fa3485bcbc2e8b /engines/sci/engine/kscripts.cpp
parent4e445b94679f330ef0653821842d13056ff159bb (diff)
downloadscummvm-rg350-61e02f0570a90c8691459bcdf348ebdd1bbcbf3f.tar.gz
scummvm-rg350-61e02f0570a90c8691459bcdf348ebdd1bbcbf3f.tar.bz2
scummvm-rg350-61e02f0570a90c8691459bcdf348ebdd1bbcbf3f.zip
SCI: Fixed the speed in the intro of PQ2, version 1.002.011 (bug #3102071)
In version 1.002.011, global 3, used for timing, is incorrectly initialized to 0, whereas it should be 6 (like in other versions). Initializing it to the correct value fixes the speed in the intro. This has been based on the patch for that version by NewRisingSun(NRS) / Belzorash svn-id: r54298
Diffstat (limited to 'engines/sci/engine/kscripts.cpp')
-rw-r--r--engines/sci/engine/kscripts.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp
index da67761b8a..9fccceebbe 100644
--- a/engines/sci/engine/kscripts.cpp
+++ b/engines/sci/engine/kscripts.cpp
@@ -258,6 +258,18 @@ reg_t kScriptID(EngineState *s, int argc, reg_t *argv) {
if (getSciVersion() >= SCI_VERSION_1_1 && getSciVersion() <= SCI_VERSION_2_1)
address += scr->getScriptSize();
+ // Bugfix for the intro speed in PQ2 version 1.002.011.
+ // This is taken from the patch by NewRisingSun(NRS) / Belzorash. Global 3
+ // is used for timing during the intro, and in the problematic version it's
+ // initialized to 0, whereas it's 6 in other versions. Thus, we assign it
+ // to 6 here, fixing the speed of the introduction. Refer to bug #3102071.
+ if (g_sci->getGameId() == GID_PQ2 && script == 200) {
+ if (s->variables[VAR_GLOBAL][3].isNull()) {
+ warning("Fixing speed in the intro of PQ2, version 1.002.011");
+ s->variables[VAR_GLOBAL][3] = make_reg(0, 6);
+ }
+ }
+
return make_reg(scriptSeg, address);
}