diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-12-29 14:13:21 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-12-29 14:13:21 -0700 |
commit | 533310f646f1b1a00250a361f627967c420f1eef (patch) | |
tree | 0ade5ffb70259af7f4e2be56497e4e4707bc079a /src/gamestate.h | |
parent | 1bc10d1408eb29b0675a030e029155dd046b1dd8 (diff) | |
download | stage-533310f646f1b1a00250a361f627967c420f1eef.tar.gz stage-533310f646f1b1a00250a361f627967c420f1eef.tar.bz2 stage-533310f646f1b1a00250a361f627967c420f1eef.tar.xz stage-533310f646f1b1a00250a361f627967c420f1eef.zip |
Situations & their modes are built.
Diffstat (limited to 'src/gamestate.h')
-rw-r--r-- | src/gamestate.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gamestate.h b/src/gamestate.h index cb02322..7a8f81a 100644 --- a/src/gamestate.h +++ b/src/gamestate.h | |||
@@ -20,6 +20,17 @@ public: | |||
20 | 20 | ||
21 | void callFunction( const Bu::String &sName ); | 21 | void callFunction( const Bu::String &sName ); |
22 | 22 | ||
23 | enum ScopeId | ||
24 | { | ||
25 | sidLocal, | ||
26 | sidGlobal, | ||
27 | sidPlayer, | ||
28 | sidSituation | ||
29 | }; | ||
30 | |||
31 | Variable getVariable( const Bu::String &sName, ScopeId id=sidLocal ); | ||
32 | void setVariable( const Bu::String &sName, const Variable &v, ScopeId id=sidLocal ); | ||
33 | |||
23 | private: | 34 | private: |
24 | void parse( const AstBranch::NodeList &lCode ); | 35 | void parse( const AstBranch::NodeList &lCode ); |
25 | 36 | ||
@@ -28,8 +39,10 @@ private: | |||
28 | typedef Bu::Hash<Bu::String, Scope *> ScopeHash; | 39 | typedef Bu::Hash<Bu::String, Scope *> ScopeHash; |
29 | Game *pGame; | 40 | Game *pGame; |
30 | Scope sGlobal; | 41 | Scope sGlobal; |
42 | Scope sPlayer; | ||
31 | ScopeList lsLocal; | 43 | ScopeList lsLocal; |
32 | ScopeHash hsSituation; | 44 | ScopeHash hsSituation; |
45 | Bu::String sCurSituation; | ||
33 | 46 | ||
34 | VariableList lStack; | 47 | VariableList lStack; |
35 | }; | 48 | }; |