aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/parser.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2007-08-24 20:14:51 +0000
committerNicola Mettifogo2007-08-24 20:14:51 +0000
commit37cdd1c69ad4a1750c3041d5cceeed676da9061f (patch)
treedfd19d7e1b667e16d319c5e599907c61ba16e18e /engines/parallaction/parser.cpp
parent2bfc4466df238fea2162466cca06de88c773e6c5 (diff)
downloadscummvm-rg350-37cdd1c69ad4a1750c3041d5cceeed676da9061f.tar.gz
scummvm-rg350-37cdd1c69ad4a1750c3041d5cceeed676da9061f.tar.bz2
scummvm-rg350-37cdd1c69ad4a1750c3041d5cceeed676da9061f.zip
First step in restructuring engine code:
- code has been consolidated in fewer files - new table-driven parsers/execution - some functions has been pushed down the engine hierarchy - Parallaction_br now inherits from Parallaction_ns svn-id: r28711
Diffstat (limited to 'engines/parallaction/parser.cpp')
-rw-r--r--engines/parallaction/parser.cpp35
1 files changed, 8 insertions, 27 deletions
diff --git a/engines/parallaction/parser.cpp b/engines/parallaction/parser.cpp
index 34b5e02f8e..dfda083392 100644
--- a/engines/parallaction/parser.cpp
+++ b/engines/parallaction/parser.cpp
@@ -82,33 +82,6 @@ void Script::seek(int32 offset, int whence) {
error("seek not supported on Script streams");
}
-//
-// a comment can appear both at location and Zone levels
-// comments are displayed into rectangles on the screen
-//
-char *Parallaction::parseComment(Script &script) {
-
- char _tmp_comment[1000] = "\0";
- char *v194;
-
- do {
- char v190[400];
- v194 = script.readLine(v190, 400);
-
- v194[strlen(v194)-1] = '\0';
- if (!scumm_stricmp(v194, "endtext"))
- break;
-
- strcat(_tmp_comment, v194);
- strcat(_tmp_comment, " ");
- } while (true);
-
- v194 = strdup(_tmp_comment);
- _tmp_comment[0] = '\0';
-
- return v194;
-}
-
void clearTokens() {
for (uint16 i = 0; i < 20; i++)
@@ -118,6 +91,14 @@ void clearTokens() {
}
+void skip(Script* script, const char* endToken) {
+
+ while (scumm_stricmp(_tokens[0], endToken)) {
+ fillBuffers(*script, true);
+ }
+
+}
+
//
// Scans 's' until one of the stop-chars in 'brk' is found, building a token.
// If the routine encounters quotes, it will extract the contained text and