[Scummvm-cvs-logs] CVS: scummvm/kyra script.cpp,1.10,1.11

Max Horn fingolfin at users.sourceforge.net
Fri Apr 22 10:40:48 CEST 2005


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

Modified Files:
	script.cpp 
Log Message:
* Added new virtual base class 'Stream', ReadStream and
  WriteStream are now subclasses of it.
* Added new methods eos(), ioFailed(), clearIOFailed() to
  all streams. This allows better error checking.
* SaveFile classes take advantage of these new standard
  stream APIS
* Removed File::gets()
* Added SeekableReadStream::readLine() (replaces File::gets)
* Added WriteStream::writeString, for convenience


Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/script.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- script.cpp	9 Jan 2005 16:06:29 -0000	1.10
+++ script.cpp	22 Apr 2005 17:40:08 -0000	1.11
@@ -413,10 +413,7 @@
 	uint8 chunkName[sizeof("EMC2ORDR") + 1];
 	
 	// so lets look for our chunks :)
-	while(true) {
-		if (script.eof()) {
-			break;
-		}
+	while (!script.eos()) {
 		// lets read only the first 4 chars
 		script.read(chunkName, sizeof(uint8) * 4);
 		chunkName[4] = '\0';





More information about the Scummvm-git-logs mailing list