[Scummvm-cvs-logs] SF.net SVN: scummvm:[35212] scummvm/trunk/engines/m4/mads_anim.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Wed Dec 3 09:27:09 CET 2008


Revision: 35212
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35212&view=rev
Author:   thebluegr
Date:     2008-12-03 08:27:08 +0000 (Wed, 03 Dec 2008)

Log Message:
-----------
readLine_OLD -> readLine_NEW

Modified Paths:
--------------
    scummvm/trunk/engines/m4/mads_anim.cpp

Modified: scummvm/trunk/engines/m4/mads_anim.cpp
===================================================================
--- scummvm/trunk/engines/m4/mads_anim.cpp	2008-12-02 22:22:23 UTC (rev 35211)
+++ scummvm/trunk/engines/m4/mads_anim.cpp	2008-12-03 08:27:08 UTC (rev 35212)
@@ -247,14 +247,14 @@
 }
 
 void TextviewView::processLines() {
-	_script->readLine_OLD(_currentLine, 79);
-	if (_script->eos())
+	_script->readLine_NEW(_currentLine, 79);
+	if (_script->eos() || _script->err())
 		error("Attempted to read past end of response file");
 
-	while (!_script->eos()) {
+	while (!_script->eos() && !_script->err()) {
 		// Commented out line, so go loop for another
 		if (_currentLine[0] == '#') {
-			_script->readLine_OLD(_currentLine, 79);
+			_script->readLine_NEW(_currentLine, 79);
 			continue;
 		}
 
@@ -267,7 +267,7 @@
 				if (!cEnd)
 					error("Unterminated command '%s' in response file", _currentLine);
 
-				*cEnd = '\0';
+				*(cEnd + 1)= '\0';
 				processCommand();
 
 				// Copy rest of line (if any) to start of buffer
@@ -286,7 +286,7 @@
 			break;
 		}
 
-		_script->readLine_OLD(_currentLine, 79);
+		_script->readLine_NEW(_currentLine, 79);
 	}
 }
 
@@ -597,14 +597,14 @@
 }
 
 void AnimviewView::processLines() {
-	_script->readLine_OLD(_currentLine, 79);
-	if (_script->eos()) {
+	_script->readLine_NEW(_currentLine, 79);
+	if (_script->eos() || _script->err()) {
 		// end of script, end animation
 		scriptDone();
 		return;
 	}
 
-	while (!_script->eos()) {
+	while (!_script->eos() && !_script->err()) {
 		// Process the line
 		char *cStart = strchr(_currentLine, '-');
 		if (cStart) {
@@ -638,7 +638,7 @@
 			break;
 		}
 
-		_script->readLine_OLD(_currentLine, 79);
+		_script->readLine_NEW(_currentLine, 79);
 	}
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list