summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-02-06 01:27:41 -0700
committerMike Buland <eichlan@xagasoft.com>2012-02-06 01:27:41 -0700
commit19e2b8cae9c66a6c971fa088642bec739067c7ad (patch)
tree9817e9b7a943c54e2c9092a5528fa1d2baae1051
parente10e9ee07c03d7ee5752b8122ecddaef40dfd5d5 (diff)
downloadstage-19e2b8cae9c66a6c971fa088642bec739067c7ad.tar.gz
stage-19e2b8cae9c66a6c971fa088642bec739067c7ad.tar.bz2
stage-19e2b8cae9c66a6c971fa088642bec739067c7ad.tar.xz
stage-19e2b8cae9c66a6c971fa088642bec739067c7ad.zip
Option input type works now.
-rw-r--r--src/commandset.cpp6
-rw-r--r--src/commandset.h1
-rw-r--r--src/situation.cpp1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/commandset.cpp b/src/commandset.cpp
index a125541..c2231d5 100644
--- a/src/commandset.cpp
+++ b/src/commandset.cpp
@@ -36,3 +36,9 @@ bool CommandSet::dispatch( class GameState &gState, const Bu::StringList &lCmd )
36 return false; 36 return false;
37} 37}
38 38
39void CommandSet::exec( class GameState &gState, int idx )
40{
41 CommandList::iterator i = lCommand.begin()+idx;
42 (*i)->exec( gState, Bu::StringList() );
43}
44
diff --git a/src/commandset.h b/src/commandset.h
index aff2e4c..d7094f0 100644
--- a/src/commandset.h
+++ b/src/commandset.h
@@ -13,6 +13,7 @@ public:
13 void addCommand( class Command *pCmd ); 13 void addCommand( class Command *pCmd );
14 14
15 bool dispatch( class GameState &gState, const Bu::StringList &lCmd ); 15 bool dispatch( class GameState &gState, const Bu::StringList &lCmd );
16 void exec( class GameState &gState, int idx );
16 17
17 typedef Bu::List<class Command *> CommandList; 18 typedef Bu::List<class Command *> CommandList;
18 const CommandList &getCommandList() const { return lCommand; } 19 const CommandList &getCommandList() const { return lCommand; }
diff --git a/src/situation.cpp b/src/situation.cpp
index 54096cc..923eea7 100644
--- a/src/situation.cpp
+++ b/src/situation.cpp
@@ -62,6 +62,7 @@ bool Situation::execCommand( class GameState &gState,
62 62
63void Situation::execOption( class GameState &gState, int idx ) 63void Situation::execOption( class GameState &gState, int idx )
64{ 64{
65 csLocal.exec( gState, idx );
65} 66}
66 67
67Bu::Formatter &operator<<( Bu::Formatter &f, Situation::Mode m ) 68Bu::Formatter &operator<<( Bu::Formatter &f, Situation::Mode m )