summaryrefslogtreecommitdiff
path: root/src/gamestate.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/gamestate.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/gamestate.cpp')
-rw-r--r--src/gamestate.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gamestate.cpp b/src/gamestate.cpp
index ec6bf72..0a82b99 100644
--- a/src/gamestate.cpp
+++ b/src/gamestate.cpp
@@ -233,6 +233,11 @@ Variable GameState::gatsToVariable( Gats::List *pLst ) const
233 throw Bu::ExceptionBase("Type unknown: %d", dynamic_cast<Gats::Integer *>(*i)->getValue() ); 233 throw Bu::ExceptionBase("Type unknown: %d", dynamic_cast<Gats::Integer *>(*i)->getValue() );
234} 234}
235 235
236class Situation *GameState::getCurSituation()
237{
238 return pGame->getSituation( sCurSituation );
239}
240
236void GameState::parse( class AstBranch *pAst ) 241void GameState::parse( class AstBranch *pAst )
237{ 242{
238 if( pAst->getType() != AstNode::tScope ) 243 if( pAst->getType() != AstNode::tScope )
@@ -297,6 +302,11 @@ void GameState::execCommand( const Bu::String &sCmd )
297 } 302 }
298} 303}
299 304
305void GameState::execOption( int idx )
306{
307 pGame->getSituation( sCurSituation )->execOption( *this, idx );
308}
309
300bool GameState::hasVariable( const Bu::String &sName, ScopeId id ) 310bool GameState::hasVariable( const Bu::String &sName, ScopeId id )
301{ 311{
302 switch( id ) 312 switch( id )