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

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Sat Jun 19 06:51:31 CEST 2010


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

Log Message:
-----------
Cleanup.

Got rid of the legacy "location.part" string handling in BRA.

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

Modified: scummvm/trunk/engines/parallaction/parallaction_br.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction_br.cpp	2010-06-19 04:51:14 UTC (rev 50041)
+++ scummvm/trunk/engines/parallaction/parallaction_br.cpp	2010-06-19 04:51:31 UTC (rev 50042)
@@ -275,11 +275,7 @@
 		return;
 	}
 
-	char location[200];
-	strcpy(location, _newLocationName.c_str());
-
-	char *partStr = strrchr(location, '.');
-	if (partStr || _nextPart != -1) {
+	if (_nextPart != -1) {
 		cleanupGame();
 
 		// more cleanup needed for part changes (see also saveload)
@@ -287,15 +283,8 @@
 		cleanInventory(true);
 		strcpy(_characterName1, "null");
 
-		if (partStr) {
-			int n = partStr - location;
-			location[n] = '\0';
+		_part = _nextPart;
 
-			_part = atoi(++partStr);
-		} else {
-			_part = _nextPart;
-		}
-
 		if (getFeatures() & GF_DEMO) {
 			assert(_part == 1);
 		} else {
@@ -322,8 +311,8 @@
 
 	freeLocation(false);
 	// load new location
-	strcpy(_location._name, location);
-	parseLocation(location);
+	strcpy(_location._name, _newLocationName.c_str());
+	parseLocation(_location._name);
 
 	if (_location._startPosition.x != -1000) {
 		_char._ani->setFoot(_location._startPosition);


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