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

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Sat Jun 19 06:50:44 CEST 2010


Revision: 50039
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50039&view=rev
Author:   peres001
Date:     2010-06-19 04:50:44 +0000 (Sat, 19 Jun 2010)

Log Message:
-----------
Implemented PART command for BRA, largely based on patch #3005434 by fuzzie.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/exec_br.cpp
    scummvm/trunk/engines/parallaction/parallaction.h
    scummvm/trunk/engines/parallaction/parallaction_br.cpp

Modified: scummvm/trunk/engines/parallaction/exec_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/exec_br.cpp	2010-06-19 02:51:03 UTC (rev 50038)
+++ scummvm/trunk/engines/parallaction/exec_br.cpp	2010-06-19 04:50:44 UTC (rev 50039)
@@ -293,7 +293,7 @@
 
 
 DECLARE_COMMAND_OPCODE(part) {
-	warning("Parallaction_br::cmdOp_part not yet implemented");
+	_vm->_nextPart = ctxt._cmd->_counterValue;
 }
 
 

Modified: scummvm/trunk/engines/parallaction/parallaction.h
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.h	2010-06-19 02:51:03 UTC (rev 50038)
+++ scummvm/trunk/engines/parallaction/parallaction.h	2010-06-19 04:50:44 UTC (rev 50039)
@@ -548,6 +548,9 @@
 	const char **_audioCommandsNamesRes;
 	static const char *_partNames[];
 	int			_part;
+	int			_nextPart;
+
+
 #if 0	// disabled since I couldn't find any references to lip sync in the scripts
 	int16		_lipSyncVal;
 	uint		_subtitleLipSync;

Modified: scummvm/trunk/engines/parallaction/parallaction_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction_br.cpp	2010-06-19 02:51:03 UTC (rev 50038)
+++ scummvm/trunk/engines/parallaction/parallaction_br.cpp	2010-06-19 04:50:44 UTC (rev 50039)
@@ -86,6 +86,7 @@
 	_walker = new PathWalker_BR;
 
 	_part = -1;
+	_nextPart = -1;
 
 	_subtitle[0] = 0;
 	_subtitle[1] = 0;
@@ -260,6 +261,8 @@
 	_globalFlagsNames = 0;
 	_objectsNames = 0;
 	_countersNames = 0;
+
+	memset(_zoneFlags, 0, sizeof(_zoneFlags));
 }
 
 
@@ -272,13 +275,23 @@
 	strcpy(location, _newLocationName.c_str());
 
 	char *partStr = strrchr(location, '.');
-	if (partStr) {
+	if (partStr || _nextPart != -1) {
 		cleanupGame();
 
-		int n = partStr - location;
-		location[n] = '\0';
+		// more cleanup needed for part changes (see also saveload)
+		_globalFlags = 0;
+		cleanInventory(true);
+		strcpy(_characterName1, "null");
 
-		_part = atoi(++partStr);
+		if (partStr) {
+			int n = partStr - location;
+			location[n] = '\0';
+
+			_part = atoi(++partStr);
+		} else {
+			_part = _nextPart;
+		}
+
 		if (getFeatures() & GF_DEMO) {
 			assert(_part == 1);
 		} else {
@@ -357,6 +370,7 @@
 
 	_engineFlags &= ~kEngineChangeLocation;
 	_newLocationName.clear();
+	_nextPart = -1;
 }
 
 // FIXME: Parallaction_br::parseLocation() is now a verbatim copy of the same routine from Parallaction_ns.


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