aboutsummaryrefslogtreecommitdiff
path: root/engines/m4
diff options
context:
space:
mode:
authorFilippos Karapetis2008-12-03 08:27:08 +0000
committerFilippos Karapetis2008-12-03 08:27:08 +0000
commit318f71673796817cc4692ec5565fb8758a795b6b (patch)
tree4f480e65f6c1ba2258c44e8692850ed9b4967659 /engines/m4
parentd34865d054dd00acacca4e9b715e7824b1964b58 (diff)
downloadscummvm-rg350-318f71673796817cc4692ec5565fb8758a795b6b.tar.gz
scummvm-rg350-318f71673796817cc4692ec5565fb8758a795b6b.tar.bz2
scummvm-rg350-318f71673796817cc4692ec5565fb8758a795b6b.zip
readLine_OLD -> readLine_NEW
svn-id: r35212
Diffstat (limited to 'engines/m4')
-rw-r--r--engines/m4/mads_anim.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/m4/mads_anim.cpp b/engines/m4/mads_anim.cpp
index 71b45ca77c..fe95f85e40 100644
--- a/engines/m4/mads_anim.cpp
+++ b/engines/m4/mads_anim.cpp
@@ -247,14 +247,14 @@ void TextviewView::scriptDone() {
}
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 @@ void TextviewView::processLines() {
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 @@ void TextviewView::processLines() {
break;
}
- _script->readLine_OLD(_currentLine, 79);
+ _script->readLine_NEW(_currentLine, 79);
}
}
@@ -597,14 +597,14 @@ void AnimviewView::scriptDone() {
}
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 @@ void AnimviewView::processLines() {
break;
}
- _script->readLine_OLD(_currentLine, 79);
+ _script->readLine_NEW(_currentLine, 79);
}
}