diff options
author | Travis Howell | 2004-08-03 04:26:30 +0000 |
---|---|---|
committer | Travis Howell | 2004-08-03 04:26:30 +0000 |
commit | 55c291a9b7499e287ffc1a20390891c2cf9f4ef8 (patch) | |
tree | ede40d4c2c9f4b671a409031389779266a361ebb /scumm | |
parent | fd2e14f33c92d15fc49157d435aa9b80b1983bb7 (diff) | |
download | scummvm-rg350-55c291a9b7499e287ffc1a20390891c2cf9f4ef8.tar.gz scummvm-rg350-55c291a9b7499e287ffc1a20390891c2cf9f4ef8.tar.bz2 scummvm-rg350-55c291a9b7499e287ffc1a20390891c2cf9f4ef8.zip |
Shouldn't error out in early scumm 1 - 4 games.
svn-id: r14454
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/script.cpp | 21 | ||||
-rw-r--r-- | scumm/scumm.cpp | 11 |
2 files changed, 17 insertions, 15 deletions
diff --git a/scumm/script.cpp b/scumm/script.cpp index 04815b48c0..e81797165d 100644 --- a/scumm/script.cpp +++ b/scumm/script.cpp @@ -212,7 +212,8 @@ void ScummEngine::stopScript(int script) { if (script == ss->number && ss->status != ssDead && (ss->where == WIO_GLOBAL || ss->where == WIO_LOCAL)) { if (ss->cutsceneOverride) - error("Script %d stopped with active cutscene/override", script); + if (_version >= 5) + error("Script %d stopped with active cutscene/override", script); ss->number = 0; ss->status = ssDead; nukeArrays(script); @@ -251,7 +252,8 @@ void ScummEngine::stopObjectScript(int script) { if (script == ss->number && ss->status != ssDead && (ss->where == WIO_ROOM || ss->where == WIO_INVENTORY || ss->where == WIO_FLOBJECT)) { if (ss->cutsceneOverride) - error("Object %d stopped with active cutscene/override", script); + if (_version >= 5) + error("Object %d stopped with active cutscene/override", script); ss->number = 0; ss->status = ssDead; nukeArrays(script); @@ -681,14 +683,14 @@ void ScummEngine::stopObjectCode() { if (ss->where != WIO_GLOBAL && ss->where != WIO_LOCAL) { if (ss->cutsceneOverride) { - // Earlier games only checked global scripts at this point if (_version >= 5) warning("Object %d ending with active cutscene/override (%d)", ss->number, ss->cutsceneOverride); ss->cutsceneOverride = 0; } } else { if (ss->cutsceneOverride) { - warning("Script %d ending with active cutscene/override (%d)", ss->number, ss->cutsceneOverride); + if (_version >= 5) + warning("Script %d ending with active cutscene/override (%d)", ss->number, ss->cutsceneOverride); ss->cutsceneOverride = 0; } } @@ -846,16 +848,17 @@ void ScummEngine::killScriptsAndResources() { ss = vm.slot; for (i = 0; i < NUM_SCRIPT_SLOT; i++, ss++) { if (ss->where == WIO_ROOM || ss->where == WIO_FLOBJECT) { - if (ss->cutsceneOverride != 0) { - warning("Object %d stopped with active cutscene/override in exit", ss->number); + if (ss->cutsceneOverride) { + if (_version >= 5) + warning("Object %d stopped with active cutscene/override in exit", ss->number); ss->cutsceneOverride = 0; } nukeArrays(i); ss->status = ssDead; } else if (ss->where == WIO_LOCAL) { - // Earlier games only checked global scripts at this point - if (ss->cutsceneOverride != 0 && _version >= 5) { - warning("Script %d stopped with active cutscene/override in exit", ss->number); + if (ss->cutsceneOverride) { + if ( _version >= 5) + warning("Script %d stopped with active cutscene/override in exit", ss->number); ss->cutsceneOverride = 0; } nukeArrays(i); diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index a9c5ce7e17..0c820cc6ec 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -2164,16 +2164,15 @@ void ScummEngine::startScene(int room, Actor *a, int objectNr) { if (_currentScript != 0xFF) { if (ss->where == WIO_ROOM || ss->where == WIO_FLOBJECT) { - if (ss->cutsceneOverride != 0) + if (ss->cutsceneOverride && _version >= 5) error("Object %d stopped with active cutscene/override in exit", ss->number); + nukeArrays(_currentScript); _currentScript = 0xFF; } else if (ss->where == WIO_LOCAL) { - if (ss->cutsceneOverride != 0) { - // Earlier games only checked global scripts at this point - if (_version >= 5) - error("Script %d stopped with active cutscene/override in exit", ss->number); - } + if (ss->cutsceneOverride && _version >= 5) + error("Script %d stopped with active cutscene/override in exit", ss->number); + nukeArrays(_currentScript); _currentScript = 0xFF; } |