diff options
Diffstat (limited to 'engines/parallaction/animation.cpp')
-rw-r--r-- | engines/parallaction/animation.cpp | 19 |
1 files changed, 15 insertions, 4 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; } |