diff options
author | Nicola Mettifogo | 2008-06-03 00:49:27 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-06-03 00:49:27 +0000 |
commit | b87c11a4a14343a23c35e43b02bc8f4ff6b40922 (patch) | |
tree | 15313d47e1d291231e6bb68e0f5d038249a5693e /engines/parallaction/parallaction_br.cpp | |
parent | 220dd330c2f7418e2d20217507569551f22fc0d5 (diff) | |
download | scummvm-rg350-b87c11a4a14343a23c35e43b02bc8f4ff6b40922.tar.gz scummvm-rg350-b87c11a4a14343a23c35e43b02bc8f4ff6b40922.tar.bz2 scummvm-rg350-b87c11a4a14343a23c35e43b02bc8f4ff6b40922.zip |
Fixed initialization of parsers, necessary after the latest removal of static arrays.
svn-id: r32509
Diffstat (limited to 'engines/parallaction/parallaction_br.cpp')
-rw-r--r-- | engines/parallaction/parallaction_br.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index f07d201ae9..62cc702222 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -74,7 +74,9 @@ int Parallaction_br::init() { initCursors(); initOpcodes(); _locationParser = new LocationParser_br(this); + _locationParser->init(); _programParser = new ProgramParser_br(this); + _programParser->init(); _part = -1; @@ -258,6 +260,25 @@ void Parallaction_br::parseLocation(const char *filename) { return; } +void Parallaction_br::loadProgram(AnimationPtr a, const char *filename) { + debugC(1, kDebugParser, "loadProgram(Animation: %s, script: %s)", a->_name, filename); + + Script *script = _disk->loadScript(filename); + ProgramPtr program(new Program); + program->_anim = a; + + _programParser->parse(script, program); + + delete script; + + _vm->_location._programs.push_back(program); + + debugC(1, kDebugParser, "loadProgram() done"); + + return; +} + + void Parallaction_br::changeCharacter(const char *name) { |