aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2008-04-17 04:18:53 +0000
committerTravis Howell2008-04-17 04:18:53 +0000
commit45d7a68902c2aefe12338d2fa693858593d0430e (patch)
tree7273f27a78dc9bde502744cde6002824050c6602 /engines
parent09d468e884f92604e414227dc1fa0d1909accf74 (diff)
downloadscummvm-rg350-45d7a68902c2aefe12338d2fa693858593d0430e.tar.gz
scummvm-rg350-45d7a68902c2aefe12338d2fa693858593d0430e.tar.bz2
scummvm-rg350-45d7a68902c2aefe12338d2fa693858593d0430e.zip
Fix Bug #1555117 - SIMON2: Cannot load Savegame.
svn-id: r31526
Diffstat (limited to 'engines')
-rw-r--r--engines/agos/subroutine.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/agos/subroutine.cpp b/engines/agos/subroutine.cpp
index 823e87ccb9..44ada82585 100644
--- a/engines/agos/subroutine.cpp
+++ b/engines/agos/subroutine.cpp
@@ -540,6 +540,18 @@ int AGOSEngine::startSubroutine(Subroutine *sub) {
if (++_recursionDepth > 40)
error("Recursion error");
+ // WORKAROUND: If the game is saved, right after Simon is thrown in the dungeon of Sordid's Fortress of Doom,
+ // the saved game fails to load correctly. When loading the saved game, the sequence of Simon waking is started,
+ // before the scene is actually reloaded, due to a script bug. We manually add the extra script code from DOS CD
+ // release, which fixed this particular script bug.
+ if (getGameType() == GType_SIMON2 && !(getFeatures() & GF_TALKIE) && sub->id == 12101) {
+ const byte bit = 228;
+ if ((_bitArrayTwo[bit / 16] & (1 << (bit & 15))) != 0 && (int)readVariable(34) == -1) {
+ _bitArrayTwo[228 / 16] &= ~(1 << (bit & 15));
+ writeVariable(34, 1);
+ }
+ }
+
_currentTable = sub;
restart:
while ((byte *)sl != (byte *)sub) {