summaryrefslogtreecommitdiff
path: root/src/gamebuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gamebuilder.cpp')
-rw-r--r--src/gamebuilder.cpp20
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
99void GameBuilder::beginSituation( const Bu::String &sName ) 99void 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
222void GameBuilder::beginOption( const Bu::String &sValue )
223{
224 pCurNode = pCurRoot = new AstBranch( AstNode::tScope );
225 pCurCmd = new Command();
226 pCurCmd->addLiteral( sValue );
227}
228
229void GameBuilder::closeOption()
230{
231 pCurCmd->setAst( pCurRoot );
232 pCurRoot = pCurNode = NULL;
233 //pCurCmd->print();
234 pCurSit->csLocal.addCommand( pCurCmd );
235 pCurCmd = NULL;
236}
237