diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2012-02-06 01:27:41 -0700 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2012-02-06 01:27:41 -0700 |
| commit | 19e2b8cae9c66a6c971fa088642bec739067c7ad (patch) | |
| tree | 9817e9b7a943c54e2c9092a5528fa1d2baae1051 | |
| parent | e10e9ee07c03d7ee5752b8122ecddaef40dfd5d5 (diff) | |
| download | stage-19e2b8cae9c66a6c971fa088642bec739067c7ad.tar.gz stage-19e2b8cae9c66a6c971fa088642bec739067c7ad.tar.bz2 stage-19e2b8cae9c66a6c971fa088642bec739067c7ad.tar.xz stage-19e2b8cae9c66a6c971fa088642bec739067c7ad.zip | |
Option input type works now.
| -rw-r--r-- | src/commandset.cpp | 6 | ||||
| -rw-r--r-- | src/commandset.h | 1 | ||||
| -rw-r--r-- | src/situation.cpp | 1 |
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 | ||
| 39 | void 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 | ||
| 63 | void Situation::execOption( class GameState &gState, int idx ) | 63 | void Situation::execOption( class GameState &gState, int idx ) |
| 64 | { | 64 | { |
| 65 | csLocal.exec( gState, idx ); | ||
| 65 | } | 66 | } |
| 66 | 67 | ||
| 67 | Bu::Formatter &operator<<( Bu::Formatter &f, Situation::Mode m ) | 68 | Bu::Formatter &operator<<( Bu::Formatter &f, Situation::Mode m ) |
