[Scummvm-cvs-logs] CVS: scummvm/saga rscfile.cpp,1.22,1.23

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Tue Jun 21 11:39:26 CEST 2005


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

Modified Files:
	rscfile.cpp 
Log Message:
Fixed crash when talking to the money changer about the Orb of Storms. The
sound resources were being substituted with animation resources. Now the
substitutions are identified by a resource number *and* a file name. 

Could someone verify that ite.rsc is the correct file for all of them?


Index: rscfile.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/rscfile.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- rscfile.cpp	4 Jun 2005 12:25:25 -0000	1.22
+++ rscfile.cpp	21 Jun 2005 13:55:18 -0000	1.23
@@ -32,15 +32,16 @@
 
 static struct Substitutes {
 	uint32 id;
+	const char *resfile;
 	const char *fname;
 } substitutes[] = {
-	{ 1529, "wyrm.pak" },
-	{ 1530, "wyrm1.dlt" },
-	{ 1531, "wyrm2.dlt" },
-	{ 1532, "wyrm3.dlt" },
-	{ 1533, "wyrm4.dlt" },
-	{ 1796, "credit3n.dlt" },
-	{ 1797, "credit4n.dlt" }
+	{ 1529, "ite.rsc", "wyrm.pak" },
+	{ 1530, "ite.rsc", "wyrm1.dlt" },
+	{ 1531, "ite.rsc", "wyrm2.dlt" },
+	{ 1532, "ite.rsc", "wyrm3.dlt" },
+	{ 1533, "ite.rsc", "wyrm4.dlt" },
+	{ 1796, "ite.rsc", "credit3n.dlt" },
+	{ 1797, "ite.rsc", "credit4n.dlt" }
 };
 	
 
@@ -249,11 +250,12 @@
 	}
 
 	debug(8, "LoadResource %d", res_num);
-	for (int i = 0; i < ARRAYSIZE(substitutes); i++)
-		if (substitutes[i].id == res_num) {
+	for (int i = 0; i < ARRAYSIZE(substitutes); i++) {
+		if (substitutes[i].id == res_num && strcmp(substitutes[i].resfile, rsc->rc_file_fspec) == 0) {
 			substnum = i;
 			break;
 		}
+	}
 
 	if (!(_vm->getFeatures() & GF_WYRMKEEP))
 		substnum = -1;





More information about the Scummvm-git-logs mailing list