[Scummvm-cvs-logs] CVS: residual textsplit.h,1.1,1.2 textsplit.cpp,1.2,1.3 scene.cpp,1.5,1.6

James Brown ender at users.sourceforge.net
Mon Aug 18 07:11:02 CEST 2003


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

Modified Files:
	textsplit.h textsplit.cpp scene.cpp 
Log Message:
Some set objects (eg, 'al') do not have ZBuffers.


Index: textsplit.h
===================================================================
RCS file: /cvsroot/scummvm/residual/textsplit.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- textsplit.h	15 Aug 2003 19:41:26 -0000	1.1
+++ textsplit.h	18 Aug 2003 13:59:33 -0000	1.2
@@ -38,6 +38,9 @@
   const char *currentLine() const { return curr_line_; }
   bool eof() const { return curr_line_ == NULL; }
 
+  // Check if the current line contains 'needle'
+  bool TextSplitter::checkString(const char *needle);
+
   // Expect a certain fixed string; bail out with an error if not
   // found.  Advance to the next line.
   void expectString(const char *expected);

Index: textsplit.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/textsplit.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- textsplit.cpp	15 Aug 2003 20:39:55 -0000	1.2
+++ textsplit.cpp	18 Aug 2003 13:59:33 -0000	1.3
@@ -50,6 +50,13 @@
   processLine();
 }
 
+bool TextSplitter::checkString(const char *needle) {
+ if (std::strstr(currentLine(), needle))
+   return true;
+ else
+   return false;
+}
+
 void TextSplitter::expectString(const char *expected) {
   if (eof())
     error("Expected `%s', got EOF\n", expected);

Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/scene.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- scene.cpp	17 Aug 2003 08:11:59 -0000	1.5
+++ scene.cpp	18 Aug 2003 13:59:33 -0000	1.6
@@ -130,8 +130,14 @@
 
   ts.scanString(" background %256s", 1, buf);
   bkgnd_bm_ = ResourceLoader::instance()->loadBitmap(buf);
-  ts.scanString(" zbuffer %256s", 1, buf);
-  bkgnd_zbm_ = ResourceLoader::instance()->loadBitmap(buf);
+
+  // ZBuffer is optional
+  if (!ts.checkString("zbuffer")) {
+    bkgnd_zbm_ = NULL;
+  } else {
+    ts.scanString(" zbuffer %256s", 1, buf);
+    bkgnd_zbm_ = ResourceLoader::instance()->loadBitmap(buf);
+  }
 
   ts.scanString(" position %f %f %f", 3, &pos_.x(), &pos_.y(), &pos_.z());
   ts.scanString(" interest %f %f %f", 3, &interest_.x(), &interest_.y(),





More information about the Scummvm-git-logs mailing list