[Scummvm-cvs-logs] SF.net SVN: scummvm: [24949] scummvm/trunk/engines/touche

cyx at users.sourceforge.net cyx at users.sourceforge.net
Sat Dec 30 00:44:11 CET 2006


Revision: 24949
          http://scummvm.svn.sourceforge.net/scummvm/?rev=24949&view=rev
Author:   cyx
Date:     2006-12-29 15:44:08 -0800 (Fri, 29 Dec 2006)

Log Message:
-----------
workaround a scripting bug (see tracker item #1622114)

Modified Paths:
--------------
    scummvm/trunk/engines/touche/opcodes.cpp
    scummvm/trunk/engines/touche/touche.cpp

Modified: scummvm/trunk/engines/touche/opcodes.cpp
===================================================================
--- scummvm/trunk/engines/touche/opcodes.cpp	2006-12-29 23:43:36 UTC (rev 24948)
+++ scummvm/trunk/engines/touche/opcodes.cpp	2006-12-29 23:44:08 UTC (rev 24949)
@@ -544,6 +544,19 @@
 	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() {

Modified: scummvm/trunk/engines/touche/touche.cpp
===================================================================
--- scummvm/trunk/engines/touche/touche.cpp	2006-12-29 23:43:36 UTC (rev 24948)
+++ scummvm/trunk/engines/touche/touche.cpp	2006-12-29 23:44:08 UTC (rev 24949)
@@ -588,7 +588,7 @@
 }
 
 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 @@
 	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];


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list