aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/parser.h
diff options
context:
space:
mode:
authorNicola Mettifogo2009-03-23 11:38:09 +0000
committerNicola Mettifogo2009-03-23 11:38:09 +0000
commitd18274d0ee2bf8effcb36b726fc833503f7924aa (patch)
tree33eb6cd429e8d86e0f923370661765f30086f55d /engines/parallaction/parser.h
parentca993d8b00e54c8523b5b9e708c94d3fc871e6db (diff)
downloadscummvm-rg350-d18274d0ee2bf8effcb36b726fc833503f7924aa.tar.gz
scummvm-rg350-d18274d0ee2bf8effcb36b726fc833503f7924aa.tar.bz2
scummvm-rg350-d18274d0ee2bf8effcb36b726fc833503f7924aa.zip
Implemented all variants of IF script instruction. Program class has been changed to store an Array of instruction instead of a List, so that references to instructions are integers.
svn-id: r39631
Diffstat (limited to 'engines/parallaction/parser.h')
-rw-r--r--engines/parallaction/parser.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/engines/parallaction/parser.h b/engines/parallaction/parser.h
index 8385961ce3..0c9d053bf3 100644
--- a/engines/parallaction/parser.h
+++ b/engines/parallaction/parser.h
@@ -328,14 +328,13 @@ protected:
OpcodeSet _instructionParsers;
Table *_instructionNames;
+ uint32 _currentInstruction; // index of the instruction being parsed
+
struct ParserContext {
bool end;
AnimationPtr a;
InstructionPtr inst;
LocalVariable *locals;
-
- // BRA specific
- InstructionPtr openIf;
} ctxt;
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(defLocal);
@@ -377,7 +376,7 @@ public:
clearSet(_instructionParsers);
}
- void parse(Script *script, ProgramPtr program);
+ virtual void parse(Script *script, ProgramPtr program);
};
@@ -395,6 +394,10 @@ protected:
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(if_op);
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(endif);
+ int32 _openIfStatement;
+ void beginIfStatement();
+ void endIfStatement();
+
virtual void parseRValue(ScriptVar &var, const char *str);
public:
@@ -402,7 +405,7 @@ public:
}
virtual void init();
-
+ virtual void parse(Script *script, ProgramPtr program);
};