summaryrefslogtreecommitdiff
path: root/src/gamebuilder.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-02-06 01:21:36 -0700
committerMike Buland <eichlan@xagasoft.com>2012-02-06 01:21:36 -0700
commite10e9ee07c03d7ee5752b8122ecddaef40dfd5d5 (patch)
treea2a53a4d9ebdbc6e53079c75e294a39e7ae87877 /src/gamebuilder.cpp
parente150ee5e1ce33b0a4913d53e5df4658ea508eb6e (diff)
downloadstage-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.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