aboutsummaryrefslogtreecommitdiff
path: root/gob/parse.h
diff options
context:
space:
mode:
authorEugene Sandulenko2006-01-03 23:14:39 +0000
committerEugene Sandulenko2006-01-03 23:14:39 +0000
commitfd8ac69fc45fb346a931f61701e8aec04278159b (patch)
treefc4ca73bf00b17f7c42569a789baf0f4e64a91c3 /gob/parse.h
parentf046a14bb22f1d6c138ed82efa03d5ff89ae85e0 (diff)
downloadscummvm-rg350-fd8ac69fc45fb346a931f61701e8aec04278159b.tar.gz
scummvm-rg350-fd8ac69fc45fb346a931f61701e8aec04278159b.tar.bz2
scummvm-rg350-fd8ac69fc45fb346a931f61701e8aec04278159b.zip
Patch #1395615 "GobEngine code wrapped in classes". With some cosmetic changes.
svn-id: r19899
Diffstat (limited to 'gob/parse.h')
-rw-r--r--gob/parse.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/gob/parse.h b/gob/parse.h
index d86a99ce3f..fae387df88 100644
--- a/gob/parse.h
+++ b/gob/parse.h
@@ -24,12 +24,29 @@
namespace Gob {
-int16 parse_parseExpr(char stopToken, byte *resultPtr);
-void parse_skipExpr(char stopToken);
-int16 parse_parseValExpr(void);
-int16 parse_parseVarIndex(void);
-void parse_printExpr(char stopToken);
-void parse_printVarIndex(void);
+class Parse {
+public:
+ int16 parseExpr(char stopToken, byte *resultPtr);
+ void skipExpr(char stopToken);
+ int16 parseValExpr(void);
+ int16 parseVarIndex(void);
+ void printExpr(char stopToken);
+ void printVarIndex(void);
+
+ Parse(GobEngine *vm);
+
+protected:
+ enum PointerType {
+ kExecPtr = 0,
+ kInterVar = 1,
+ kResStr = 2
+ };
+
+ GobEngine *_vm;
+
+ int32 encodePtr(char *ptr, int type);
+ char *decodePtr(int32 n);
+};
} // End of namespace Gob