[Scummvm-cvs-logs] CVS: residual scene.cpp,1.6,1.7

James Brown ender at users.sourceforge.net
Mon Aug 18 07:32:04 CEST 2003


Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1:/tmp/cvs-serv4898

Modified Files:
	scene.cpp 
Log Message:
Lights can be optional on some sets (eg, 'ul')


Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/scene.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- scene.cpp	18 Aug 2003 13:59:33 -0000	1.6
+++ scene.cpp	18 Aug 2003 14:31:05 -0000	1.7
@@ -47,6 +47,12 @@
     setups_[i].load(ts);
   currSetup_ = setups_;
 
+  numSectors_ = -1;
+  numLights_ = -1;
+  // Lights are optional
+  if (ts.eof())
+   return;
+
   ts.expectString("section: lights");
   ts.scanString(" numlights %d", 1, &numLights_);
   lights_ = new Light[numLights_];
@@ -54,9 +60,8 @@
     lights_[i].load(ts);
 
   // Calculate the number of sectors
-  numSectors_ = -1;
   ts.expectString("section: sectors");
-  if (ts.eof()) 	// Sometimes there ARE no sectors (eg, inv room)
+  if (ts.eof()) 	// Sectors are optional, but section: doesn't seem to be
 	return;
   ts.scanString(" sector %256s", 1, tempBuf);
   ts.scanString(" id %d", 1, &numSectors_);





More information about the Scummvm-git-logs mailing list