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
This commit is contained in:
Filippos Karapetis 2010-11-17 18:46:29 +00:00
parent 4e445b9467
commit 61e02f0570

View file

@ -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);
}