SCUMM: fix ScummEngine_v0::o_stopCurrentScript()

This commit is contained in:
Tobias Gunkel 2012-01-03 22:58:25 +01:00
parent a79f224c23
commit a709a42319
3 changed files with 7 additions and 13 deletions

View File

@ -501,14 +501,7 @@ void ScummEngine_v0::drawSentence() {
}
void ScummEngine_v0::o_stopCurrentScript() {
int script;
script = vm.slot[_currentScript].number;
if (_currentScript != 0 && vm.slot[_currentScript].number == script)
stopObjectCode();
else
stopScript(script);
stopScriptCommon(0);
}
void ScummEngine_v0::o_loadSound() {

View File

@ -1190,11 +1190,7 @@ void ScummEngine_v2::o2_startScript() {
runScript(script, 0, 0, 0);
}
void ScummEngine_v2::o2_stopScript() {
int script;
script = getVarOrDirectByte(PARAM_1);
void ScummEngine_v2::stopScriptCommon(int script) {
if (_game.id == GID_MANIAC && _roomResource == 26 && vm.slot[_currentScript].number == 10001) {
// FIXME: Nasty hack for bug #915575
// Don't let the exit script for room 26 stop the script (116), when
@ -1215,6 +1211,10 @@ void ScummEngine_v2::o2_stopScript() {
stopScript(script);
}
void ScummEngine_v2::o2_stopScript() {
stopScriptCommon(getVarOrDirectByte(PARAM_1));
}
void ScummEngine_v2::o2_panCameraTo() {
panCameraTo(getVarOrDirectByte(PARAM_1) * V12_X_MULTIPLIER, 0);
}

View File

@ -85,6 +85,7 @@ protected:
void ifNotStateCommon(byte type);
void setStateCommon(byte type);
void clearStateCommon(byte type);
void stopScriptCommon(int script);
virtual void resetSentence(bool walking);
void setUserState(byte state);