aboutsummaryrefslogtreecommitdiff
path: root/engines/m4
diff options
context:
space:
mode:
authorFilippos Karapetis2008-12-03 11:51:51 +0000
committerFilippos Karapetis2008-12-03 11:51:51 +0000
commitc20292c0f1cfe9e3283fa71053a84c990f3e467d (patch)
treecff5925c774e8a7bcf501d7e5cd4535a800fca5d /engines/m4
parent29f59d07f475ce81674c64c22c18a220108d095f (diff)
downloadscummvm-rg350-c20292c0f1cfe9e3283fa71053a84c990f3e467d.tar.gz
scummvm-rg350-c20292c0f1cfe9e3283fa71053a84c990f3e467d.tar.bz2
scummvm-rg350-c20292c0f1cfe9e3283fa71053a84c990f3e467d.zip
Simplify line reading with the simpler readLine(), instead of readLine_NEW
svn-id: r35217
Diffstat (limited to 'engines/m4')
-rw-r--r--engines/m4/mads_anim.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/m4/mads_anim.cpp b/engines/m4/mads_anim.cpp
index fe95f85e40..f9374f866a 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_NEW(_currentLine, 79);
+ strncpy(_currentLine, _script->readLine().c_str(), 79);
if (_script->eos() || _script->err())
error("Attempted to read past end of response file");
while (!_script->eos() && !_script->err()) {
// Commented out line, so go loop for another
if (_currentLine[0] == '#') {
- _script->readLine_NEW(_currentLine, 79);
+ strncpy(_currentLine, _script->readLine().c_str(), 79);
continue;
}
@@ -267,7 +267,7 @@ void TextviewView::processLines() {
if (!cEnd)
error("Unterminated command '%s' in response file", _currentLine);
- *(cEnd + 1)= '\0';
+ *cEnd = '\0';
processCommand();
// Copy rest of line (if any) to start of buffer
@@ -286,7 +286,7 @@ void TextviewView::processLines() {
break;
}
- _script->readLine_NEW(_currentLine, 79);
+ strncpy(_currentLine, _script->readLine().c_str(), 79);
}
}
@@ -597,7 +597,7 @@ void AnimviewView::scriptDone() {
}
void AnimviewView::processLines() {
- _script->readLine_NEW(_currentLine, 79);
+ strncpy(_currentLine, _script->readLine().c_str(), 79);
if (_script->eos() || _script->err()) {
// end of script, end animation
scriptDone();
@@ -638,7 +638,7 @@ void AnimviewView::processLines() {
break;
}
- _script->readLine_NEW(_currentLine, 79);
+ strncpy(_currentLine, _script->readLine().c_str(), 79);
}
}