[Scummvm-cvs-logs] SF.net SVN: scummvm: [31168] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Tue Mar 18 00:27:33 CET 2008


Revision: 31168
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31168&view=rev
Author:   lordhoto
Date:     2008-03-17 16:27:33 -0700 (Mon, 17 Mar 2008)

Log Message:
-----------
Implemented opcode 98: o2_setDeathHandlerFlag

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/kyra_v2.cpp
    scummvm/trunk/engines/kyra/kyra_v2.h
    scummvm/trunk/engines/kyra/saveload_v2.cpp
    scummvm/trunk/engines/kyra/script_v2.cpp

Modified: scummvm/trunk/engines/kyra/kyra_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.cpp	2008-03-17 23:01:50 UTC (rev 31167)
+++ scummvm/trunk/engines/kyra/kyra_v2.cpp	2008-03-17 23:27:33 UTC (rev 31168)
@@ -130,6 +130,8 @@
 	_mainCharacter.dlgIndex = 0;
 	setNewDlgIndex(-1);
 
+	_deathHandler = -1;
+
 	_bookMaxPage = 6;
 	_bookCurPage = 0;
 	_bookNewPage = 0;
@@ -387,7 +389,7 @@
 
 	_quitFlag = false;
 	while (!_quitFlag) {
-		//if (_unk1 >= 0) {
+		//if (_deathHandler >= 0) {
 		//	removeHandItem();
 		//	waitTicks(5);
 		//	sub_270A0();
@@ -514,7 +516,7 @@
 			}
 		}
 
-		//if (_unk1 <= -1)
+		//if (_deathHandler <= -1)
 		//	skipHandling = 1;
 
 		if (skipHandling)
@@ -545,7 +547,7 @@
 }
 
 bool KyraEngine_v2::handleInputUnkSub(int x, int y) {
-	if (y > 143/* || _unk1 > -1 */|| queryGameFlag(0x164))
+	if (y > 143 || _deathHandler > -1 || queryGameFlag(0x164))
 		return false;
 
 	if (_handItemSet <= -3 && findItem(_mainCharacter.sceneId, 13) >= 0) {

Modified: scummvm/trunk/engines/kyra/kyra_v2.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.h	2008-03-17 23:01:50 UTC (rev 31167)
+++ scummvm/trunk/engines/kyra/kyra_v2.h	2008-03-17 23:27:33 UTC (rev 31168)
@@ -744,6 +744,7 @@
 		int16 x2, y2;
 	};
 
+	int8 _deathHandler;
 	Character _mainCharacter;
 	bool _useCharPal;
 	int _charPalEntry;
@@ -1016,6 +1017,7 @@
 	int o2_blockOutRegion(ScriptState *script);
 	int o2_setCauldronState(ScriptState *script);
 	int o2_getRand(ScriptState *script);
+	int o2_setDeathHandlerFlag(ScriptState *script);
 	int o2_setDrawNoShapeFlag(ScriptState *script);
 	int o2_showLetter(ScriptState *script);
 	int o2_fillRect(ScriptState *script);

Modified: scummvm/trunk/engines/kyra/saveload_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/saveload_v2.cpp	2008-03-17 23:01:50 UTC (rev 31167)
+++ scummvm/trunk/engines/kyra/saveload_v2.cpp	2008-03-17 23:27:33 UTC (rev 31168)
@@ -139,7 +139,7 @@
 
 	bool setFlag1EE = (queryGameFlag(0x1EE) != 0);
 	
-	//_unk1 = -1;
+	_deathHandler = -1;
 	if (!_unkSceneScreenFlag1) {
 		_sound->beginFadeOut();
 		_system->delayMillis(5 * _tickLength);

Modified: scummvm/trunk/engines/kyra/script_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_v2.cpp	2008-03-17 23:01:50 UTC (rev 31167)
+++ scummvm/trunk/engines/kyra/script_v2.cpp	2008-03-17 23:27:33 UTC (rev 31168)
@@ -739,6 +739,12 @@
 	return _rnd.getRandomNumberRng(stackPos(0), stackPos(1));
 }
 
+int KyraEngine_v2::o2_setDeathHandlerFlag(ScriptState *script) {
+	debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_setDeathHandlerFlag(%p) (%d)", (const void *)script, stackPos(0));
+	_deathHandler = stackPos(0);
+	return 0;
+}
+
 int KyraEngine_v2::o2_setDrawNoShapeFlag(ScriptState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_setDrawNoShapeFlag(%p) (%d)", (const void *)script, stackPos(0));
 	_drawNoShapeFlag = (stackPos(0) != 0);
@@ -1548,7 +1554,7 @@
 		// 0x60
 		Opcode(o2_getRand),
 		OpcodeUnImpl(),
-		OpcodeUnImpl(),
+		Opcode(o2_setDeathHandlerFlag),
 		Opcode(o2_setDrawNoShapeFlag),
 		// 0x64
 		OpcodeUnImpl(),


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