diff options
author | Nicola Mettifogo | 2007-08-14 18:58:47 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-08-14 18:58:47 +0000 |
commit | 32164ff210015297b55c27b97614a35d96bd3dd0 (patch) | |
tree | 4429f5299ad40cc262ccc59653067a5cf3fe5ab7 /engines/parallaction/parallaction.cpp | |
parent | d02441a372cc63979468cf0daeec0e638f35f4d6 (diff) | |
download | scummvm-rg350-32164ff210015297b55c27b97614a35d96bd3dd0.tar.gz scummvm-rg350-32164ff210015297b55c27b97614a35d96bd3dd0.tar.bz2 scummvm-rg350-32164ff210015297b55c27b97614a35d96bd3dd0.zip |
Defined new Table for location scripts level-0 statements, and changed parseLocation to use a function pointer array instead of a big switch statement.
svn-id: r28620
Diffstat (limited to 'engines/parallaction/parallaction.cpp')
-rw-r--r-- | engines/parallaction/parallaction.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index 2a53eb11a2..367b470a10 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -132,6 +132,7 @@ Parallaction::~Parallaction() { delete _instructionNames; delete _zoneTypeNames; delete _zoneFlagNames; + delete _locationStmt; _animations.remove(&_char._ani); @@ -944,6 +945,28 @@ void Parallaction::initOpcodes() { _commandOpcodes = op3; + + static const Opcode op4[] = { + LOCATION_PARSER(invalid), + LOCATION_PARSER(endlocation), + LOCATION_PARSER(location), + LOCATION_PARSER(disk), + LOCATION_PARSER(nodes), + LOCATION_PARSER(zone), + LOCATION_PARSER(animation), + LOCATION_PARSER(localflags), + LOCATION_PARSER(commands), + LOCATION_PARSER(acommands), + LOCATION_PARSER(flags), + LOCATION_PARSER(comment), + LOCATION_PARSER(endcomment), + LOCATION_PARSER(sound), + LOCATION_PARSER(music) + }; + + _locationParsers = op4; + + } } // namespace Parallaction |