diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-02-06 01:21:36 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-02-06 01:21:36 -0700 |
commit | e10e9ee07c03d7ee5752b8122ecddaef40dfd5d5 (patch) | |
tree | a2a53a4d9ebdbc6e53079c75e294a39e7ae87877 /src/gamebuilder.cpp | |
parent | e150ee5e1ce33b0a4913d53e5df4658ea508eb6e (diff) | |
download | stage-e10e9ee07c03d7ee5752b8122ecddaef40dfd5d5.tar.gz stage-e10e9ee07c03d7ee5752b8122ecddaef40dfd5d5.tar.bz2 stage-e10e9ee07c03d7ee5752b8122ecddaef40dfd5d5.tar.xz stage-e10e9ee07c03d7ee5752b8122ecddaef40dfd5d5.zip |
Option input type situations almost done.
Interfaces just need some work.
Diffstat (limited to 'src/gamebuilder.cpp')
-rw-r--r-- | src/gamebuilder.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/gamebuilder.cpp b/src/gamebuilder.cpp index 83cbe79..353e254 100644 --- a/src/gamebuilder.cpp +++ b/src/gamebuilder.cpp | |||
@@ -96,9 +96,9 @@ void GameBuilder::endFunction() | |||
96 | pGame->hFunction.insert( pCurFnc->getName(), pCurFnc ); | 96 | pGame->hFunction.insert( pCurFnc->getName(), pCurFnc ); |
97 | } | 97 | } |
98 | 98 | ||
99 | void GameBuilder::beginSituation( const Bu::String &sName ) | 99 | void GameBuilder::beginSituation( const Bu::String &sName, Situation::InputType tInput ) |
100 | { | 100 | { |
101 | pCurSit = new Situation( sName ); | 101 | pCurSit = new Situation( sName, tInput ); |
102 | //sio << "New situation: " << sName << sio.nl; | 102 | //sio << "New situation: " << sName << sio.nl; |
103 | } | 103 | } |
104 | 104 | ||
@@ -219,3 +219,19 @@ void GameBuilder::closeCommand() | |||
219 | pCurCmd = NULL; | 219 | pCurCmd = NULL; |
220 | } | 220 | } |
221 | 221 | ||
222 | void GameBuilder::beginOption( const Bu::String &sValue ) | ||
223 | { | ||
224 | pCurNode = pCurRoot = new AstBranch( AstNode::tScope ); | ||
225 | pCurCmd = new Command(); | ||
226 | pCurCmd->addLiteral( sValue ); | ||
227 | } | ||
228 | |||
229 | void GameBuilder::closeOption() | ||
230 | { | ||
231 | pCurCmd->setAst( pCurRoot ); | ||
232 | pCurRoot = pCurNode = NULL; | ||
233 | //pCurCmd->print(); | ||
234 | pCurSit->csLocal.addCommand( pCurCmd ); | ||
235 | pCurCmd = NULL; | ||
236 | } | ||
237 | |||