[Scummvm-cvs-logs] SF.net SVN: scummvm: [26294] scummvm/trunk/engines/parallaction

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Sat Mar 24 20:55:35 CET 2007


Revision: 26294
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26294&view=rev
Author:   peres001
Date:     2007-03-24 12:55:34 -0700 (Sat, 24 Mar 2007)

Log Message:
-----------
made more functions members of Parallaction

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/animation.cpp
    scummvm/trunk/engines/parallaction/commands.cpp
    scummvm/trunk/engines/parallaction/dialogue.cpp
    scummvm/trunk/engines/parallaction/parallaction.h
    scummvm/trunk/engines/parallaction/walk.cpp
    scummvm/trunk/engines/parallaction/zone.cpp
    scummvm/trunk/engines/parallaction/zone.h

Modified: scummvm/trunk/engines/parallaction/animation.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/animation.cpp	2007-03-24 17:14:04 UTC (rev 26293)
+++ scummvm/trunk/engines/parallaction/animation.cpp	2007-03-24 19:55:34 UTC (rev 26294)
@@ -152,7 +152,7 @@
 
 
 
-void  freeScript(Program *program) {
+void  Parallaction::freeScript(Program *program) {
 
 	if (!program) return;
 
@@ -587,7 +587,7 @@
 			case INST_END:	// exit
 				if ((a->_flags & kFlagsLooping) == 0) {
 					a->_flags &= ~kFlagsActing;
-					runCommands(a->_commands, a);
+					_vm->runCommands(a->_commands, a);
 				}
 				a->_program->_ip = (Instruction*)a->_program->_next;
 				goto label1;

Modified: scummvm/trunk/engines/parallaction/commands.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/commands.cpp	2007-03-24 17:14:04 UTC (rev 26293)
+++ scummvm/trunk/engines/parallaction/commands.cpp	2007-03-24 19:55:34 UTC (rev 26294)
@@ -46,7 +46,7 @@
 #define CMD_STOP			16
 
 
-Command *parseCommands(Script &script) {
+Command *Parallaction::parseCommands(Script &script) {
 //	printf("parseCommands()");
 
 	Node root;
@@ -193,7 +193,7 @@
 }
 
 
-void freeCommands(Command *list) {
+void Parallaction::freeCommands(Command *list) {
 
 	Command *cmd = list;
 
@@ -211,7 +211,7 @@
 
 
 
-void runCommands(Command *list, Zone *z) {
+void Parallaction::runCommands(Command *list, Zone *z) {
 	debugC(1, kDebugLocation, "runCommands");
 
 	Command *cmd = list;

Modified: scummvm/trunk/engines/parallaction/dialogue.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/dialogue.cpp	2007-03-24 17:14:04 UTC (rev 26293)
+++ scummvm/trunk/engines/parallaction/dialogue.cpp	2007-03-24 19:55:34 UTC (rev 26294)
@@ -196,7 +196,7 @@
 }
 
 
-void freeDialogue(Dialogue *d) {
+void Parallaction::freeDialogue(Dialogue *d) {
 
 	if (!d) return;
 
@@ -368,7 +368,7 @@
 	return answer;
 }
 
-void runDialogue(SpeakData *data) {
+void Parallaction::runDialogue(SpeakData *data) {
 	debugC(1, kDebugDialogue, "runDialogue: starting dialogue '%s'", data->_name);
 
 	enterDialogue();

Modified: scummvm/trunk/engines/parallaction/parallaction.h
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.h	2007-03-24 17:14:04 UTC (rev 26293)
+++ scummvm/trunk/engines/parallaction/parallaction.h	2007-03-24 19:55:34 UTC (rev 26294)
@@ -158,11 +158,7 @@
 void removeNode(Node *n);
 void freeNodeList(Node *list);
 
-Command *parseCommands(Script &script);
-void runCommands(Command *list, Zone *z = NULL);
-void freeCommands(Command*);
 
-void runDialogue(SpeakData*);
 
 void jobRemovePickedItem(void*, Job *j);
 void jobDisplayDroppedItem(void*, Job *j);
@@ -313,6 +309,11 @@
 	void		sortAnimations();
 	void 		freeLocation();
 
+	uint16		runZone(Zone*);
+	void 		runDialogue(SpeakData*);
+	void 		freeDialogue(Dialogue *d);
+	void 		runCommands(Command *list, Zone *z = NULL);
+
 public:
 	int getGameType() const;
 	uint32 getFeatures() const;
@@ -413,6 +414,11 @@
 	void 		pickMusic(const char *location);
 	void		selectCharacterMusic(const char *name);
 
+	void 		freeScript(Program*);
+
+	Command 	*parseCommands(Script &script);
+	void 		freeCommands(Command*);
+
 };
 
 // FIXME: remove global

Modified: scummvm/trunk/engines/parallaction/walk.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/walk.cpp	2007-03-24 17:14:04 UTC (rev 26293)
+++ scummvm/trunk/engines/parallaction/walk.cpp	2007-03-24 19:55:34 UTC (rev 26294)
@@ -402,7 +402,7 @@
 			_zoneTrap = NULL;
 
 		} else {
-			runCommands(z->_commands, z);
+			_vm->runCommands(z->_commands, z);
 		}
 	}
 
@@ -410,13 +410,13 @@
 
 	if (z != NULL) {
 		_localFlags[_vm->_currentLocationIndex] |= kFlagsEnter;
-		runCommands(z->_commands, z);
+		_vm->runCommands(z->_commands, z);
 		_localFlags[_vm->_currentLocationIndex] &= ~kFlagsEnter;
 		_zoneTrap = z;
 	} else
 	if (_zoneTrap != NULL) {
 		_localFlags[_vm->_currentLocationIndex] |= kFlagsExit;
-		runCommands(_zoneTrap->_commands, _zoneTrap);
+		_vm->runCommands(_zoneTrap->_commands, _zoneTrap);
 		_localFlags[_vm->_currentLocationIndex] &= ~kFlagsExit;
 		_zoneTrap = NULL;
 	}

Modified: scummvm/trunk/engines/parallaction/zone.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/zone.cpp	2007-03-24 17:14:04 UTC (rev 26293)
+++ scummvm/trunk/engines/parallaction/zone.cpp	2007-03-24 19:55:34 UTC (rev 26294)
@@ -29,10 +29,9 @@
 
 namespace Parallaction {
 
-void freeScript(Program*);
 
-void freeDialogue(Dialogue *d);
 
+
 Zone *Parallaction::findZone(const char *name) {
 
 	Zone *v4 = (Zone*)_zones._next;
@@ -418,7 +417,7 @@
 
 
 
-uint16 runZone(Zone *z) {
+uint16 Parallaction::runZone(Zone *z) {
 	debugC(3, kDebugLocation, "runZone (%s)", z->_label._text);
 
 	uint16 subtype = z->_type & 0xFFFF;

Modified: scummvm/trunk/engines/parallaction/zone.h
===================================================================
--- scummvm/trunk/engines/parallaction/zone.h	2007-03-24 17:14:04 UTC (rev 26293)
+++ scummvm/trunk/engines/parallaction/zone.h	2007-03-24 19:55:34 UTC (rev 26294)
@@ -204,7 +204,7 @@
 		_flags = 0;
 		_commands = NULL;
 	}
-	
+
 	virtual ~Zone() {}
 
 	void getRect(Common::Rect& r) const {
@@ -316,7 +316,7 @@
 		_frame = 0;
 		_z = 0;
 	}
-	
+
 	virtual ~Animation() {}
 
 	virtual uint16 width() const {
@@ -341,14 +341,10 @@
 };
 
 
-uint16	runZone(Zone *z);
 void	dropItem(uint16 v);
 int16	pickupItem(Zone *z);
 
 
-uint16	checkDoor();
-
-
 void		loadProgram(Animation *, char *filename);
 
 


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