aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/parallaction.h
diff options
context:
space:
mode:
authorNicola Mettifogo2007-08-14 18:58:47 +0000
committerNicola Mettifogo2007-08-14 18:58:47 +0000
commit32164ff210015297b55c27b97614a35d96bd3dd0 (patch)
tree4429f5299ad40cc262ccc59653067a5cf3fe5ab7 /engines/parallaction/parallaction.h
parentd02441a372cc63979468cf0daeec0e638f35f4d6 (diff)
downloadscummvm-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.h')
-rw-r--r--engines/parallaction/parallaction.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h
index 7c53f74215..c7d6f5529b 100644
--- a/engines/parallaction/parallaction.h
+++ b/engines/parallaction/parallaction.h
@@ -312,6 +312,9 @@ struct BackgroundInfo {
#define DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(op) void instOp_##op()
#define INSTRUCTION_OPCODE(op) &Parallaction::instOp_##op
+#define DECLARE_LOCATION_PARSER(sig) void Parallaction::locParse_##sig()
+#define DECLARE_UNQUALIFIED_LOCATION_PARSER(sig) void locParse_##sig()
+#define LOCATION_PARSER(sig) &Parallaction::locParse_##sig
class Parallaction : public Engine {
friend class Debugger;
@@ -425,6 +428,30 @@ public:
void parseLocation(const char *filename);
+ const Opcode *_locationParsers;
+
+ struct {
+ const char *filename;
+ bool end;
+ Script *script;
+ } _locParseCtxt;
+
+ DECLARE_UNQUALIFIED_LOCATION_PARSER(invalid);
+ DECLARE_UNQUALIFIED_LOCATION_PARSER(endlocation);
+ DECLARE_UNQUALIFIED_LOCATION_PARSER(location);
+ DECLARE_UNQUALIFIED_LOCATION_PARSER(disk);
+ DECLARE_UNQUALIFIED_LOCATION_PARSER(nodes);
+ DECLARE_UNQUALIFIED_LOCATION_PARSER(zone);
+ DECLARE_UNQUALIFIED_LOCATION_PARSER(animation);
+ DECLARE_UNQUALIFIED_LOCATION_PARSER(localflags);
+ DECLARE_UNQUALIFIED_LOCATION_PARSER(commands);
+ DECLARE_UNQUALIFIED_LOCATION_PARSER(acommands);
+ DECLARE_UNQUALIFIED_LOCATION_PARSER(flags);
+ DECLARE_UNQUALIFIED_LOCATION_PARSER(comment);
+ DECLARE_UNQUALIFIED_LOCATION_PARSER(endcomment);
+ DECLARE_UNQUALIFIED_LOCATION_PARSER(sound);
+ DECLARE_UNQUALIFIED_LOCATION_PARSER(music);
+
void changeCursor(int32 index);
void showCursor(bool visible);
void changeCharacter(const char *name);
@@ -468,6 +495,7 @@ public:
Table *_callableNames;
Table *_instructionNames;
Table *_localFlagNames;
+ Table *_locationStmt;