diff options
author | Nicola Mettifogo | 2007-02-19 22:34:00 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-02-19 22:34:00 +0000 |
commit | 07077a2be484ba96c1a10c37ab0c06ce63fd294b (patch) | |
tree | bd7cbb864475d6abbba41122883ae687a23fa374 /engines/parallaction/parser.h | |
parent | 7290d1b18c82511b2e3b9339100e882c3e1fc8b5 (diff) | |
download | scummvm-rg350-07077a2be484ba96c1a10c37ab0c06ce63fd294b.tar.gz scummvm-rg350-07077a2be484ba96c1a10c37ab0c06ce63fd294b.tar.bz2 scummvm-rg350-07077a2be484ba96c1a10c37ab0c06ce63fd294b.zip |
first step in parser simplification
svn-id: r25733
Diffstat (limited to 'engines/parallaction/parser.h')
-rw-r--r-- | engines/parallaction/parser.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/engines/parallaction/parser.h b/engines/parallaction/parser.h index 5ae42b5956..622d3ec719 100644 --- a/engines/parallaction/parser.h +++ b/engines/parallaction/parser.h @@ -24,7 +24,7 @@ #define PARALLACTION_PARSER_H #include "parallaction/defs.h" -#include "common/file.h" +#include "common/stream.h" namespace Parallaction { @@ -33,7 +33,7 @@ struct ArchivedFile; void parseInit(char *s); char *parseNextLine(char *s, uint16 count); char *parseComment(ArchivedFile *file); -uint16 parseFillBuffers(); +uint16 fillBuffers(Common::SeekableReadStream &stream, bool errorOnEOF = false); char *parseNextToken(char *s, char *tok, uint16 count, const char *brk); uint16 tableFillBuffers(Common::SeekableReadStream &stream); @@ -42,6 +42,24 @@ uint16 scriptFillBuffers(ArchivedFile *file); extern char _tokens[][40]; +class LocScript : public Common::SeekableReadStream { + + const char* _src; + +public: + LocScript(const char* s); + + uint32 read(void *dataPtr, uint32 dataSize); + + char *readLine(char *buf, size_t bufSize); + + bool eos() const; + uint32 pos() const; + uint32 size() const; + + void seek(int32 offset, int whence = SEEK_SET); +}; + } // namespace Parallaction #endif |