aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2018-09-06 22:01:17 +0300
committerFilippos Karapetis2018-09-06 22:04:13 +0300
commit205ee4d0d00a8aab333e4c743c27fc86d0af5b2e (patch)
tree3eeba0c0602760a586322fd7f398b76097019c7b
parentc239a18620a9ecbfc0a160647263aa59180112df (diff)
downloadscummvm-rg350-205ee4d0d00a8aab333e4c743c27fc86d0af5b2e.tar.gz
scummvm-rg350-205ee4d0d00a8aab333e4c743c27fc86d0af5b2e.tar.bz2
scummvm-rg350-205ee4d0d00a8aab333e4c743c27fc86d0af5b2e.zip
SCI32: Allow malformed calls to kLock in PQ:SWAT, after the training videos
Fixes bug #10699
-rw-r--r--engines/sci/engine/kernel_tables.h2
-rw-r--r--engines/sci/engine/workarounds.cpp7
-rw-r--r--engines/sci/engine/workarounds.h1
3 files changed, 9 insertions, 1 deletions
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h
index 74c50cd5cf..547c5c3683 100644
--- a/engines/sci/engine/kernel_tables.h
+++ b/engines/sci/engine/kernel_tables.h
@@ -745,7 +745,7 @@ static SciKernelMapEntry s_kernelMap[] = {
#ifdef ENABLE_SCI32
{ "LocalToGlobal", kLocalToGlobal32, SIG_SCI32, SIGFOR_ALL, "oo", NULL, NULL },
#endif
- { MAP_CALL(Lock), SIG_EVERYWHERE, "ii(i)", NULL, NULL },
+ { MAP_CALL(Lock), SIG_EVERYWHERE, "ii(i)", NULL, kLock_workarounds },
{ MAP_CALL(MapKeyToDir), SIG_EVERYWHERE, "o", NULL, NULL },
{ MAP_CALL(Memory), SIG_EVERYWHERE, "i(.*)", NULL, kMemory_workarounds }, // subop
{ MAP_CALL(MemoryInfo), SIG_EVERYWHERE, "i", NULL, NULL },
diff --git a/engines/sci/engine/workarounds.cpp b/engines/sci/engine/workarounds.cpp
index 8f1714c393..05a6742ebc 100644
--- a/engines/sci/engine/workarounds.cpp
+++ b/engines/sci/engine/workarounds.cpp
@@ -854,6 +854,13 @@ const SciWorkaroundEntry kListAt_workarounds[] = {
};
// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
+const SciWorkaroundEntry kLock_workarounds[] = {
+ { GID_PQSWAT, 6400, 6400, 0, "rookerTrains3", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // After completing Small Arms Training, at the end of the Tactics Training
+ { GID_PQSWAT, 6400, 6400, 0, "rookerTrains5", "changeState", NULL, 0, 0, { WORKAROUND_STILLCALL, 0 } }, // After completing Small Arms Training, at the end of the Tactics Training
+ SCI_WORKAROUNDENTRY_TERMINATOR
+};
+
+// gameID, room,script,lvl, object-name, method-name, local-call-signature, index-range, workaround
const SciWorkaroundEntry kMemory_workarounds[] = {
{ GID_LAURABOW2, -1, 999, 0, "", "export 6", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // during the intro, when exiting the train (room 160), talking to Mr. Augustini, etc. - bug #4944
{ GID_SQ1, -1, 999, 0, "", "export 6", NULL, 0, 0, { WORKAROUND_FAKE, 0 } }, // during walking Roger around Ulence Flats - bug #6017
diff --git a/engines/sci/engine/workarounds.h b/engines/sci/engine/workarounds.h
index ff1f5c6a87..284936b4a5 100644
--- a/engines/sci/engine/workarounds.h
+++ b/engines/sci/engine/workarounds.h
@@ -87,6 +87,7 @@ extern const SciWorkaroundEntry kGraphFillBoxAny_workarounds[];
extern const SciWorkaroundEntry kGraphRedrawBox_workarounds[];
extern const SciWorkaroundEntry kIsObject_workarounds[];
extern const SciWorkaroundEntry kListAt_workarounds[];
+extern const SciWorkaroundEntry kLock_workarounds[];
extern const SciWorkaroundEntry kMemory_workarounds[];
extern const SciWorkaroundEntry kMoveCursor_workarounds[];
extern const SciWorkaroundEntry kNewWindow_workarounds[];