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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sat Mar 15 10:57:41 CET 2008


Revision: 31125
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31125&view=rev
Author:   lordhoto
Date:     2008-03-15 02:57:41 -0700 (Sat, 15 Mar 2008)

Log Message:
-----------
Implement opcodes:
 -   7: o2_getCharacterScene
 -  54: o2_delaySecs
 - 103: o2_fillRect

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

Modified: scummvm/trunk/engines/kyra/kyra_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.cpp	2008-03-15 00:17:51 UTC (rev 31124)
+++ scummvm/trunk/engines/kyra/kyra_v2.cpp	2008-03-15 09:57:41 UTC (rev 31125)
@@ -2074,7 +2074,7 @@
 		Opcode(o2_getCharacterX),
 		Opcode(o2_getCharacterY),
 		Opcode(o2_getCharacterFacing),
-		OpcodeUnImpl(),
+		Opcode(o2_getCharacterScene),
 		// 0x08
 		Opcode(o2_setSceneComment),
 		OpcodeUnImpl(),
@@ -2133,7 +2133,7 @@
 		// 0x34
 		OpcodeUnImpl(),
 		Opcode(o2_playSoundEffect),
-		OpcodeUnImpl(),
+		Opcode(o2_delaySecs),
 		Opcode(o2_delay),
 		// 0x38
 		Opcode(o2_dummy),
@@ -2194,7 +2194,7 @@
 		OpcodeUnImpl(),
 		OpcodeUnImpl(),
 		OpcodeUnImpl(),
-		OpcodeUnImpl(),
+		Opcode(o2_fillRect),
 		// 0x68
 		OpcodeUnImpl(),
 		OpcodeUnImpl(),

Modified: scummvm/trunk/engines/kyra/kyra_v2.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.h	2008-03-15 00:17:51 UTC (rev 31124)
+++ scummvm/trunk/engines/kyra/kyra_v2.h	2008-03-15 09:57:41 UTC (rev 31125)
@@ -935,6 +935,7 @@
 	int o2_getCharacterX(ScriptState *script);
 	int o2_getCharacterY(ScriptState *script);
 	int o2_getCharacterFacing(ScriptState *script);
+	int o2_getCharacterScene(ScriptState *script);
 	int o2_setSceneComment(ScriptState *script);
 	int o2_setCharacterAnimFrame(ScriptState *script);
 	int o2_trySceneChange(ScriptState *script);
@@ -957,6 +958,7 @@
 	int o2_setMousePos(ScriptState *script);
 	int o2_showMouse(ScriptState *script);
 	//int o2_playSoundEffect(ScriptState *script);
+	int o2_delaySecs(ScriptState *script);
 	int o2_delay(ScriptState *script);
 	int o2_setScaleTableItem(ScriptState *script);
 	int o2_setDrawLayerTableItem(ScriptState *script);
@@ -975,6 +977,7 @@
 	int o2_playWanderScoreViaMap(ScriptState *script);
 	int o2_playSoundEffect(ScriptState *script);
 	int o2_getRand(ScriptState *script);
+	int o2_fillRect(ScriptState *script);
 	int o2_encodeShape(ScriptState *script);
 	int o2_defineRoomEntrance(ScriptState *script);
 	int o2_runTemporaryScript(ScriptState *script);

Modified: scummvm/trunk/engines/kyra/script_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/script_v2.cpp	2008-03-15 00:17:51 UTC (rev 31124)
+++ scummvm/trunk/engines/kyra/script_v2.cpp	2008-03-15 09:57:41 UTC (rev 31125)
@@ -100,6 +100,11 @@
 	return _mainCharacter.facing;
 }
 
+int KyraEngine_v2::o2_getCharacterScene(ScriptState *script) {
+	debugC(3, kDebugLevelScriptFuncs, "o2_getCharacterScene(%p) ()", (const void *)script);
+	return _mainCharacter.sceneId;
+}
+
 int KyraEngine_v2::o2_setSceneComment(ScriptState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "o2_setSceneComment(%p) ('%s')", (const void *)script, stackPosString(0));
 	_sceneCommentString = stackPosString(0);
@@ -348,6 +353,12 @@
 	return 0;
 }
 
+int KyraEngine_v2::o2_delaySecs(ScriptState *script) {
+	debugC(3, kDebugLevelScriptFuncs, "o2_delaySecs(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1));
+	delay(stackPos(0) * 1000, true);
+	return 0;
+}
+
 int KyraEngine_v2::o2_delay(ScriptState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "o2_delay(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1));
 	//if (stackPos(1))
@@ -532,6 +543,12 @@
 	return _rnd.getRandomNumberRng(stackPos(0), stackPos(1));
 }
 
+int	KyraEngine_v2::o2_fillRect(ScriptState *script) {
+	debugC(3, kDebugLevelScriptFuncs, "o2_fillRect(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5));
+	_screen->fillRect(stackPos(1), stackPos(2), stackPos(1)+stackPos(3), stackPos(2)+stackPos(4), stackPos(5), stackPos(0));
+	return 0;
+}
+
 int KyraEngine_v2::o2_encodeShape(ScriptState *script) {
 	debugC(3, kDebugLevelScriptFuncs, "o2_encodeShape(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1),
 		stackPos(2), stackPos(3), stackPos(4));


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