diff options
author | Nicola Mettifogo | 2007-08-13 23:44:13 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-08-13 23:44:13 +0000 |
commit | 0f489597aa63ebd4460506f7231d7c2bca0c8639 (patch) | |
tree | 0c2d721259bd0b05ed82dd8d781bc314fbb11f36 /engines/parallaction/parallaction.h | |
parent | a2a450dfaec31651a8c84fc6aeccab2816375d2a (diff) | |
download | scummvm-rg350-0f489597aa63ebd4460506f7231d7c2bca0c8639.tar.gz scummvm-rg350-0f489597aa63ebd4460506f7231d7c2bca0c8639.tar.bz2 scummvm-rg350-0f489597aa63ebd4460506f7231d7c2bca0c8639.zip |
Changed instruction parsing to array of function pointers.
svn-id: r28601
Diffstat (limited to 'engines/parallaction/parallaction.h')
-rw-r--r-- | engines/parallaction/parallaction.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index 9907f9a956..d491e1f807 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -302,6 +302,8 @@ struct BackgroundInfo { #define DECLARE_COMMAND_OPCODE(op) void Parallaction::cmdOp_##op() #define COMMAND_OPCODE(op) &Parallaction::cmdOp_##op +#define DECLARE_INSTRUCTION_PARSER(sig) void Parallaction::instParse_##sig() +#define INSTRUCTION_PARSER(sig) &Parallaction::instParse_##sig #define DECLARE_INSTRUCTION_OPCODE(op) void Parallaction::instOp_##op() #define INSTRUCTION_OPCODE(op) &Parallaction::instOp_##op @@ -365,6 +367,29 @@ public: DECLARE_COMMAND_OPCODE(move); DECLARE_COMMAND_OPCODE(stop); + const Opcode *_instructionParsers; + + struct { + Animation *a; + Instruction *inst; + LocalVariable *locals; + } _instParseCtxt; + + DECLARE_INSTRUCTION_PARSER(animation); + DECLARE_INSTRUCTION_PARSER(loop); + DECLARE_INSTRUCTION_PARSER(x); + DECLARE_INSTRUCTION_PARSER(y); + DECLARE_INSTRUCTION_PARSER(z); + DECLARE_INSTRUCTION_PARSER(f); + DECLARE_INSTRUCTION_PARSER(inc); + DECLARE_INSTRUCTION_PARSER(set); + DECLARE_INSTRUCTION_PARSER(move); + DECLARE_INSTRUCTION_PARSER(put); + DECLARE_INSTRUCTION_PARSER(call); + DECLARE_INSTRUCTION_PARSER(sound); + DECLARE_INSTRUCTION_PARSER(null); + DECLARE_INSTRUCTION_PARSER(defLocal); + const Opcode *_instructionOpcodes; struct { |