diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2012-01-19 15:00:41 -0700 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2012-01-19 15:00:41 -0700 |
| commit | 22170e030efdeadc1dfbd548a8f0b24b0e10ceee (patch) | |
| tree | a0710fc6ab4543cab2f15f0f29ac7afdce857dfa | |
| parent | a2aa36ea6ad0cc5b5fb746202883ef0bc18585cb (diff) | |
| download | stage-22170e030efdeadc1dfbd548a8f0b24b0e10ceee.tar.gz stage-22170e030efdeadc1dfbd548a8f0b24b0e10ceee.tar.bz2 stage-22170e030efdeadc1dfbd548a8f0b24b0e10ceee.tar.xz stage-22170e030efdeadc1dfbd548a8f0b24b0e10ceee.zip | |
Errors on bad commands make sense now.
| -rw-r--r-- | src/gamestate.cpp | 6 | ||||
| -rw-r--r-- | src/interfaceconsole.cpp | 7 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/gamestate.cpp b/src/gamestate.cpp index 10cfafa..ec6bf72 100644 --- a/src/gamestate.cpp +++ b/src/gamestate.cpp | |||
| @@ -4,6 +4,8 @@ | |||
| 4 | 4 | ||
| 5 | #include "astleaf.h" | 5 | #include "astleaf.h" |
| 6 | #include "astleafliteral.h" | 6 | #include "astleafliteral.h" |
| 7 | #include "smlnode.h" | ||
| 8 | #include "interface.h" | ||
| 7 | 9 | ||
| 8 | #include <gats/types.h> | 10 | #include <gats/types.h> |
| 9 | 11 | ||
| @@ -287,7 +289,9 @@ void GameState::execCommand( const Bu::String &sCmd ) | |||
| 287 | { | 289 | { |
| 288 | if( !pGame->execCommand( *this, lCmd ) ) | 290 | if( !pGame->execCommand( *this, lCmd ) ) |
| 289 | { | 291 | { |
| 290 | sio << "I don't understand that command." << sio.nl; | 292 | pIface->display( SmlNode::parse( |
| 293 | "I don't understand that command." | ||
| 294 | ) ); | ||
| 291 | return; | 295 | return; |
| 292 | } | 296 | } |
| 293 | } | 297 | } |
diff --git a/src/interfaceconsole.cpp b/src/interfaceconsole.cpp index e07bffe..49be5c1 100644 --- a/src/interfaceconsole.cpp +++ b/src/interfaceconsole.cpp | |||
| @@ -38,13 +38,6 @@ void InterfaceConsole::run( Game *pGame ) | |||
| 38 | fgets( buf, 1024, stdin ); | 38 | fgets( buf, 1024, stdin ); |
| 39 | 39 | ||
| 40 | gs.execCommand( buf ); | 40 | gs.execCommand( buf ); |
| 41 | |||
| 42 | Gats::Object *pObj = gs.toGats(); | ||
| 43 | File fOut( Bu::String("test-%1.save").arg( iStep++ ), File::WriteNew ); | ||
| 44 | Gats::GatsStream gs( fOut ); | ||
| 45 | gs.writeObject( pObj ); | ||
| 46 | |||
| 47 | delete pObj; | ||
| 48 | } | 41 | } |
| 49 | } | 42 | } |
| 50 | 43 | ||
