aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2010-09-13 13:47:56 +0000
committerFilippos Karapetis2010-09-13 13:47:56 +0000
commitce657cc0dc3f4aec781aca590f4795477364c985 (patch)
treef57c05ce1c3a1cb7a9f65207abdbbe4559e2a963
parente242814990862998c2af9289f88f0cbc8060fb13 (diff)
downloadscummvm-rg350-ce657cc0dc3f4aec781aca590f4795477364c985.tar.gz
scummvm-rg350-ce657cc0dc3f4aec781aca590f4795477364c985.tar.bz2
scummvm-rg350-ce657cc0dc3f4aec781aca590f4795477364c985.zip
SCI: Changed the script protection code to be a hack for Hoyle 3 only
This shouldn't be happening normally, but apparently it does, which would indicate a potential issue with the object locking code svn-id: r52703
-rw-r--r--engines/sci/engine/seg_manager.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index 43e572d071..1cbe9a56f4 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -1070,10 +1070,15 @@ void SegManager::uninstantiateScriptSci0(int script_nr) {
if (scr->getLockers())
scr->decrementLockers(); // Decrease lockers if this is us ourselves
} else {
- // Uninstantiate superclass, but never uninstantiate
- // system scripts, i.e. script 0 and scripts 900-999 - bug #3038837
- if (superclass_script != 0 && superclass_script < 900)
+ if (g_sci->getGameId() == GID_HOYLE3 && (superclass_script == 0 || superclass_script >= 990)) {
+ // HACK for Hoyle 3: when exiting Checkers or Pachisi, scripts 0, 999 and some others
+ // are deleted but are never instantiated again. We ignore deletion of these scripts
+ // here for Hoyle 3 - bug #3038837
+ // TODO/FIXME: find out why this happens, seems like there is a problem with the object
+ // lock code
+ } else {
uninstantiateScript(superclass_script);
+ }
}
// Recurse to assure that the superclass lockers number gets decreased
}