[Scummvm-cvs-logs] SF.net SVN: scummvm:[42102] scummvm/branches/gsoc2009-draci/engines/draci

dkasak13 at users.sourceforge.net dkasak13 at users.sourceforge.net
Sat Jul 4 20:36:45 CEST 2009


Revision: 42102
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42102&view=rev
Author:   dkasak13
Date:     2009-07-04 18:36:45 +0000 (Sat, 04 Jul 2009)

Log Message:
-----------
Implemented handler for the Load instruction. Removed Script::dummy().

Modified Paths:
--------------
    scummvm/branches/gsoc2009-draci/engines/draci/script.cpp
    scummvm/branches/gsoc2009-draci/engines/draci/script.h

Modified: scummvm/branches/gsoc2009-draci/engines/draci/script.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/script.cpp	2009-07-04 18:35:08 UTC (rev 42101)
+++ scummvm/branches/gsoc2009-draci/engines/draci/script.cpp	2009-07-04 18:36:45 UTC (rev 42102)
@@ -45,7 +45,7 @@
 		{ 2,  1, "Let", 				2, { 3, 4 }, NULL },
 		{ 3,  1, "if", 					2, { 4, 3 }, NULL },
 		{ 4,  1, "Start", 				2, { 3, 2 }, NULL },
-		{ 5,  1, "Load", 				2, { 3, 2 }, &Script::dummy },
+		{ 5,  1, "Load", 				2, { 3, 2 }, &Script::load },
 		{ 5,  2, "StartPlay", 			2, { 3, 2 }, NULL },
 		{ 5,  3, "JustTalk", 			0, { 0 }, NULL },
 		{ 5,  4, "JustStay", 			0, { 0 }, NULL },
@@ -146,14 +146,15 @@
 	kMathVariable
 };
 
-void Script::dummy(Common::Queue<int> &params) {
+void Script::load(Common::Queue<int> &params) {
+	int objID = params.pop() - 1;
+	int animID = params.pop() - 1;
 
-	debug(1, "- %d", params.pop());
-	debug(1, "- %d", params.pop());
+	GameObject *obj = _vm->_game->getObject(objID);
+
+	obj->_seqTab[animID - obj->_idxSeq] = _vm->_game->loadAnimation(animID);
 }
 
-// FIXME: The evaluator is now complete but I still need to implement callbacks
-
 /**
  * @brief Evaluates mathematical expressions
  * @param reader Stream reader set to the beginning of the expression

Modified: scummvm/branches/gsoc2009-draci/engines/draci/script.h
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/script.h	2009-07-04 18:35:08 UTC (rev 42101)
+++ scummvm/branches/gsoc2009-draci/engines/draci/script.h	2009-07-04 18:36:45 UTC (rev 42102)
@@ -83,14 +83,13 @@
 	/** List of all GPL commands. Initialised in the constructor. */
 	const GPL2Command *_commandList;
  
-	void dummy(Common::Queue<int> &params);
+	void load(Common::Queue<int> &params);
 
 	void setupCommandList();
 	const GPL2Command *findCommand(byte num, byte subnum);
 	int handleMathExpression(Common::MemoryReadStream &reader);
 
 	DraciEngine *_vm;
-
 };
 
 }


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