[Scummvm-cvs-logs] CVS: scummvm/sword2 resman.cpp,1.115.2.2,1.115.2.3

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Sun Jan 1 08:27:01 CET 2006


Update of /cvsroot/scummvm/scummvm/sword2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27839

Modified Files:
      Tag: branch-0-8-0
	resman.cpp 
Log Message:
Added some more cleanup/paranoia to the missing voices/music fix: If a
resource file is labelled as being present on both CDs (I haven't seen any
that is, but just in case), treat it as if it's on the hard disk, i.e. it
will not affect the "current CD" variable.


Index: resman.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/resman.cpp,v
retrieving revision 1.115.2.2
retrieving revision 1.115.2.3
diff -u -d -r1.115.2.2 -r1.115.2.3
--- resman.cpp	1 Jan 2006 14:10:06 -0000	1.115.2.2
+++ resman.cpp	1 Jan 2006 16:26:13 -0000	1.115.2.3
@@ -167,10 +167,12 @@
 
 		if (cdInf[i].cd & LOCAL_PERM)
 			cdInf[i].cd = LOCAL_PERM;
+		else if (cdInf[i].cd & CD1)
+			cdInf[i].cd = CD1;
 		else if (cdInf[i].cd & CD2)
 			cdInf[i].cd = CD2;
 		else
-			cdInf[i].cd = CD1;
+			cdInf[i].cd = LOCAL_PERM;
 	}
 
 	file.close();
@@ -598,10 +600,10 @@
 		// playing a demo, then we're in trouble if the file
 		// can't be found!
 
-		if ((_vm->_features & GF_DEMO) || (_resFiles[fileNum].cd & LOCAL_PERM))
+		if ((_vm->_features & GF_DEMO) || (_resFiles[fileNum].cd == LOCAL_PERM))
 			error("Could not find '%s'", _resFiles[fileNum].fileName);
 
-		getCd(_resFiles[fileNum].cd & 3);
+		getCd(_resFiles[fileNum].cd);
 	}
 	return file;
 }





More information about the Scummvm-git-logs mailing list