Shouldn't error out in early scumm 1 - 4 games.

svn-id: r14454
This commit is contained in:
Travis Howell 2004-08-03 04:26:30 +00:00
parent fd2e14f33c
commit 55c291a9b7
2 changed files with 17 additions and 15 deletions

View File

@ -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);

View File

@ -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;
}