diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/parallaction/animation.cpp | 19 | ||||
-rw-r--r-- | engines/parallaction/parser.cpp | 4 | ||||
-rw-r--r-- | engines/parallaction/parser.h | 4 |
3 files changed, 19 insertions, 8 deletions
diff --git a/engines/parallaction/animation.cpp b/engines/parallaction/animation.cpp index 613721cb80..5707d6d367 100644 --- a/engines/parallaction/animation.cpp +++ b/engines/parallaction/animation.cpp @@ -259,8 +259,20 @@ void Parallaction::loadProgram(Animation *a, char *filename) { ArchivedFile *file = openArchivedFile(vC8); if (!file) errorFileNotFound(vC8); + uint32 size = getArchivedFileLength(vC8); + char* src = (char*)memAlloc(size+1); + + readArchivedFile(file, src, size); + src[size] = '\0'; + + closeArchivedFile(file); + _numLocals = 0; - scriptFillBuffers(file); + + LocScript *script = new LocScript(src); +// scriptFillBuffers(file); + + fillBuffers(*script); a->_program = (Program*)memAlloc(sizeof(Program)); memset(a->_program, 0, sizeof(Program)); @@ -278,7 +290,8 @@ void Parallaction::loadProgram(Animation *a, char *filename) { vCC = (Instruction*)memAlloc(sizeof(Instruction)); memset(vCC, 0, sizeof(Instruction)); - scriptFillBuffers(file); + fillBuffers(*script); + // scriptFillBuffers(file); } vCC->_index = INST_END; @@ -286,8 +299,6 @@ void Parallaction::loadProgram(Animation *a, char *filename) { a->_program->_ip = (Instruction*)a->_program->_node._next; - closeArchivedFile(file); - return; } diff --git a/engines/parallaction/parser.cpp b/engines/parallaction/parser.cpp index 3237004450..b17b080d5b 100644 --- a/engines/parallaction/parser.cpp +++ b/engines/parallaction/parser.cpp @@ -221,7 +221,7 @@ uint16 tableFillBuffers(Common::SeekableReadStream &stream) { return fillTokens(line); } -*/ + // FIXME // this function does the same Job as fillBuffers, except that @@ -243,5 +243,5 @@ uint16 scriptFillBuffers(ArchivedFile *file) { return fillTokens(line); } - +*/ } // namespace Parallaction diff --git a/engines/parallaction/parser.h b/engines/parallaction/parser.h index 622d3ec719..ea9b70ee5c 100644 --- a/engines/parallaction/parser.h +++ b/engines/parallaction/parser.h @@ -36,8 +36,8 @@ char *parseComment(ArchivedFile *file); uint16 fillBuffers(Common::SeekableReadStream &stream, bool errorOnEOF = false); char *parseNextToken(char *s, char *tok, uint16 count, const char *brk); -uint16 tableFillBuffers(Common::SeekableReadStream &stream); -uint16 scriptFillBuffers(ArchivedFile *file); +//uint16 tableFillBuffers(Common::SeekableReadStream &stream); +//uint16 scriptFillBuffers(ArchivedFile *file); extern char _tokens[][40]; |