diff options
author | Nicola Mettifogo | 2010-02-09 01:22:24 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2010-02-09 01:22:24 +0000 |
commit | 3a1e7ccbae87aa5d515af596e5c15c478ed3c4b3 (patch) | |
tree | b1b94b4eb2480bd05cb42a79c2dfddf60264f875 /engines/drascula/drascula.cpp | |
parent | 62741adf236a8a58674c5746cf7f8ae7417f4865 (diff) | |
download | scummvm-rg350-3a1e7ccbae87aa5d515af596e5c15c478ed3c4b3.tar.gz scummvm-rg350-3a1e7ccbae87aa5d515af596e5c15c478ed3c4b3.tar.bz2 scummvm-rg350-3a1e7ccbae87aa5d515af596e5c15c478ed3c4b3.zip |
Moved text parsing to a new class.
svn-id: r48013
Diffstat (limited to 'engines/drascula/drascula.cpp')
-rw-r--r-- | engines/drascula/drascula.cpp | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 56fbe48714..7aef05357f 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -604,42 +604,6 @@ bool DrasculaEngine::runCurrentChapter() { } } -char *DrasculaEngine::getLine(Common::SeekableReadStream *stream, char *buf, int len) { - byte c; - char *b; - - for (;;) { - b = buf; - while (true) { - c = ~stream->readByte(); - if (stream->eos()) break; - - if (c == '\r') - continue; - if (c == '\n' || b - buf >= (len - 1)) - break; - *b++ = c; - } - *b = '\0'; - if (stream->eos() && b == buf) - return NULL; - if (b != buf) - break; - } - return buf; -} - -void DrasculaEngine::getIntFromLine(Common::SeekableReadStream *stream, int len, int* result) { - char buf[256]; - getLine(stream, buf, len); - sscanf(buf, "%d", result); -} - -void DrasculaEngine::getStringFromLine(Common::SeekableReadStream *stream, int len, char* result) { - char buf[256]; - getLine(stream, buf, len); - sscanf(buf, "%s", result); -} bool DrasculaEngine::verify1() { int l; |