diff options
author | Eugene Sandulenko | 2016-06-29 07:43:38 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 7013f6bb40d9be0b3620ab331be4d4d1b60ac477 (patch) | |
tree | 89cbb3cd1a91514bbffbeabb9bea9e42293c2fe9 /engines/director/lingo/lingo.h | |
parent | 4b871b62e5fea82517301c7377118244420723d7 (diff) | |
download | scummvm-rg350-7013f6bb40d9be0b3620ab331be4d4d1b60ac477.tar.gz scummvm-rg350-7013f6bb40d9be0b3620ab331be4d4d1b60ac477.tar.bz2 scummvm-rg350-7013f6bb40d9be0b3620ab331be4d4d1b60ac477.zip |
DIRECTOR: Lingo: Implemented 'global' keyword. Start of local/global var implementation
Diffstat (limited to 'engines/director/lingo/lingo.h')
-rw-r--r-- | engines/director/lingo/lingo.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index e40aa634e4..137b8f7c5b 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -77,8 +77,8 @@ typedef void (*inst)(void); typedef Common::Array<inst> ScriptData; typedef struct Symbol { /* symbol table entry */ - char *name; - int type; + char *name; + int type; union { int val; /* VAR */ float fval; /* FLOAT */ @@ -86,6 +86,7 @@ typedef struct Symbol { /* symbol table entry */ char *str; /* STRING */ } u; int nargs; + bool global; Symbol(); } Symbol; @@ -134,7 +135,7 @@ public: public: void execute(int pc); - Symbol *lookupVar(const char *name); + Symbol *lookupVar(const char *name, bool create = true, bool putInLocalList = true); void define(Common::String &s, int start, int nargs); void codeArg(Common::String *s); void codeArgStore(); @@ -172,6 +173,7 @@ public: static void c_gotoloop(); static void c_gotonext(); static void c_gotoprevious(); + static void c_global(); void func_mci(Common::String &s); void func_mciwait(Common::String &s); @@ -200,6 +202,7 @@ private: ScriptHash _scripts[kMaxScriptType + 1]; SymbolHash _vars; + Common::HashMap<Common::String, bool, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> _localvars; SymbolHash _handlers; int _pc; |