diff options
author | Gregory Montoir | 2006-12-29 23:44:08 +0000 |
---|---|---|
committer | Gregory Montoir | 2006-12-29 23:44:08 +0000 |
commit | 7f01700ac53c5d1afe74cd4a289b18cdc2540dce (patch) | |
tree | 3b788f4b02d81dacef5684c128c57f5ed23ce8bf /engines | |
parent | c553807bfcbab50ff9c5fe063e0bdb6e6088d950 (diff) | |
download | scummvm-rg350-7f01700ac53c5d1afe74cd4a289b18cdc2540dce.tar.gz scummvm-rg350-7f01700ac53c5d1afe74cd4a289b18cdc2540dce.tar.bz2 scummvm-rg350-7f01700ac53c5d1afe74cd4a289b18cdc2540dce.zip |
workaround a scripting bug (see tracker item #1622114)
svn-id: r24949
Diffstat (limited to 'engines')
-rw-r--r-- | engines/touche/opcodes.cpp | 13 | ||||
-rw-r--r-- | engines/touche/touche.cpp | 4 |
2 files changed, 15 insertions, 2 deletions
diff --git a/engines/touche/opcodes.cpp b/engines/touche/opcodes.cpp index c553c9aa61..ad0b8b2e31 100644 --- a/engines/touche/opcodes.cpp +++ b/engines/touche/opcodes.cpp @@ -544,6 +544,19 @@ void ToucheEngine::op_initKeyCharScript() { int16 f3 = _script.readNextWord(); setKeyCharTextColor(keyChar, color); initKeyCharScript(keyChar, f1, f2, f3); + + // Workaround for bug #1622114. KeyChar 3 script must be running in order to complete the + // rope+torch puzzle. + // + // FLAG[500] : 1 if Cardinal cutscene has already been played + // FLAG[501] : 1 if cathedral is lightened (by the two torches) + // + // [00D3] (38) INIT_KEY_CHAR_SCRIPT(keychar=1, 254, 1, 1, 0) + + if (_currentEpisodeNum == 109 && keyChar == 1 && _flagsTable[500] == 1 && _flagsTable[501] == 1 && _keyCharsTable[3].scriptDataOffset == 0) { + debug(0, "Workaround disappearing rope bug"); + initKeyCharScript(3, 3, 3, 0); + } } void ToucheEngine::op_setKeyCharFrame() { diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp index 22459f4a18..c09039a873 100644 --- a/engines/touche/touche.cpp +++ b/engines/touche/touche.cpp @@ -588,7 +588,7 @@ void ToucheEngine::runCurrentKeyCharScript(int mode) { } void ToucheEngine::executeScriptOpcode(int16 param) { - debugC(9, kDebugEngine, "executeScriptOpcode(%d) offset=%04X", param, _script.dataOffset); + debugC(9, kDebugOpcodes, "ToucheEngine::executeScriptOpcode(%d) offset=%04X", param, _script.dataOffset); _script.keyCharNum = param; _script.opcodeNum = _script.readNextByte(); if (_script.opcodeNum < _numOpcodes) { @@ -1279,7 +1279,7 @@ int ToucheEngine::restartKeyCharScriptOnAction(int action, int obj1, int obj2) { for (uint i = 0; i < _programActionScriptOffsetTable.size(); ++i) { const ProgramActionScriptOffsetData *pasod = &_programActionScriptOffsetTable[i]; if (pasod->object1 == obj1 && pasod->action == action && pasod->object2 == obj2) { - debug(0, "Found matching action i=%d %d,%d,%d", i, pasod->action, pasod->object1, pasod->object2); + debug(0, "Found matching action i=%d %d,%d,%d offset=0x%X", i, pasod->action, pasod->object1, pasod->object2, pasod->offset); KeyChar *key = &_keyCharsTable[_currentKeyCharNum]; key->scriptDataOffset = pasod->offset; key->scriptStackPtr = &key->scriptStackTable[39]; |