aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v6.cpp
diff options
context:
space:
mode:
authorMax Horn2004-08-02 18:32:19 +0000
committerMax Horn2004-08-02 18:32:19 +0000
commit4289da7d3eb6be36ab02e3c7549b76fc0dd45f88 (patch)
treeffa73cff0a0c4a71735c8566459bc7bd94508632 /scumm/script_v6.cpp
parent76862bec654c8362a17afd2d71c00015b87dc83e (diff)
downloadscummvm-rg350-4289da7d3eb6be36ab02e3c7549b76fc0dd45f88.tar.gz
scummvm-rg350-4289da7d3eb6be36ab02e3c7549b76fc0dd45f88.tar.bz2
scummvm-rg350-4289da7d3eb6be36ab02e3c7549b76fc0dd45f88.zip
WORKAROUND bug #645711 (FT: regression segfault in minefield)
svn-id: r14447
Diffstat (limited to 'scumm/script_v6.cpp')
-rw-r--r--scumm/script_v6.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index 20b13cce3d..ee07cd0011 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -507,6 +507,18 @@ int ScummEngine_v6::readArray(int array, int idx, int base) {
if (ah == NULL || ah->data == NULL) {
error("readArray: invalid array %d (%d)", array, readVar(array));
}
+
+ // WORKAROUND bug #645711. This is clearly a script bug, as this script
+ // excerpt shows nicely:
+ // ...
+ // [03A7] (5D) if (isAnyOf(array-447[localvar13][localvar14],[0,4])) {
+ // [03BD] (5D) if ((localvar13 != -1) && (localvar14 != -1)) {
+ // [03CF] (B6) printDebug.begin()
+ // ...
+ if (_gameId == GID_FT && array == 447 && _currentRoom == 95 && vm.slot[_currentScript].number == 2010 && idx == -1 && base == -1) {
+ return 0;
+ }
+
const int offset = base + idx * FROM_LE_16(ah->dim1);
@@ -2926,7 +2938,7 @@ void ScummEngine_v6::o6_stampObject() {
if (state == 0)
state = 255;
- debug(6, "o6_stampObject: (%d at (%d,%d) scale %d)", object, x, y, state);
+ //debug(6, "o6_stampObject: (%d at (%d,%d) scale %d)", object, x, y, state);
Actor *a = derefActor(object, "o6_stampObject");
a->scalex = state;
a->scaley = state;
@@ -2952,7 +2964,7 @@ void ScummEngine_v6::o6_stampObject() {
putState(object, state);
drawObject(objnum, 0);
- debug(6, "o6_stampObject: (%d at (%d,%d) state %d)", object, x, y, state);
+ //debug(6, "o6_stampObject: (%d at (%d,%d) state %d)", object, x, y, state);
}
void ScummEngine_v6::o6_stopTalking() {