[Scummvm-cvs-logs] SF.net SVN: scummvm:[41255] scummvm/trunk/engines/agi

sev at users.sourceforge.net sev at users.sourceforge.net
Sat Jun 6 19:46:19 CEST 2009


Revision: 41255
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41255&view=rev
Author:   sev
Date:     2009-06-06 17:46:19 +0000 (Sat, 06 Jun 2009)

Log Message:
-----------
Implement hold.key and release.key opcodes

Modified Paths:
--------------
    scummvm/trunk/engines/agi/agi.cpp
    scummvm/trunk/engines/agi/agi.h
    scummvm/trunk/engines/agi/op_cmd.cpp

Modified: scummvm/trunk/engines/agi/agi.cpp
===================================================================
--- scummvm/trunk/engines/agi/agi.cpp	2009-06-06 17:45:52 UTC (rev 41254)
+++ scummvm/trunk/engines/agi/agi.cpp	2009-06-06 17:46:19 UTC (rev 41255)
@@ -246,6 +246,11 @@
 			if (key)
 				keyEnqueue(key);
 			break;
+
+		case Common::EVENT_KEYUP:
+			if (_egoHoldKey)	
+				_game.viewTable[0].direction = 0;
+
 		default:
 			break;
 		}
@@ -466,6 +471,8 @@
 	loadDict();
 #endif
 
+	_egoHoldKey = false;
+
 	return ec;
 }
 

Modified: scummvm/trunk/engines/agi/agi.h
===================================================================
--- scummvm/trunk/engines/agi/agi.h	2009-06-06 17:45:52 UTC (rev 41254)
+++ scummvm/trunk/engines/agi/agi.h	2009-06-06 17:46:19 UTC (rev 41255)
@@ -940,6 +940,7 @@
 	void motionFollowEgo(VtEntry *v);
 	void motionMoveObj(VtEntry *v);
 	void checkMotion(VtEntry *v);
+
 public:
 	void checkAllMotions();
 	void moveObj(VtEntry *);
@@ -948,6 +949,8 @@
 	void updatePosition();
 	int getDirection(int x0, int y0, int x, int y, int s);
 
+	bool _egoHoldKey;
+
 	// Keyboard
 	void initWords();
 	void cleanInput();

Modified: scummvm/trunk/engines/agi/op_cmd.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_cmd.cpp	2009-06-06 17:45:52 UTC (rev 41254)
+++ scummvm/trunk/engines/agi/op_cmd.cpp	2009-06-06 17:46:19 UTC (rev 41255)
@@ -636,7 +636,9 @@
 }
 
 cmd(hold_key) {
-	report("hold.key\n");
+	if (g_agi->getVersion() >= 0x3098) {
+		g_agi->_egoHoldKey = true;
+	}
 }
 
 cmd(discard_sound) {
@@ -671,7 +673,9 @@
 }
 
 cmd(release_key) {
-	report("release.key\n");
+	if (g_agi->getVersion() >= 0x3098) {
+		g_agi->_egoHoldKey = false;
+	}
 }
 
 cmd(adj_ego_move_to_x_y) {


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