diff options
Diffstat (limited to 'src/interfaceconsole.cpp')
-rw-r--r-- | src/interfaceconsole.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/interfaceconsole.cpp b/src/interfaceconsole.cpp index caa13bf..e07bffe 100644 --- a/src/interfaceconsole.cpp +++ b/src/interfaceconsole.cpp | |||
@@ -8,6 +8,9 @@ | |||
8 | #include <bu/plugger.h> | 8 | #include <bu/plugger.h> |
9 | 9 | ||
10 | #include "smlrenderervt100.h" | 10 | #include "smlrenderervt100.h" |
11 | #include <gats/types.h> | ||
12 | #include <gats/gatsstream.h> | ||
13 | #include <bu/file.h> | ||
11 | 14 | ||
12 | PluginInterface3( plugin_interface_console, console, InterfaceConsole, | 15 | PluginInterface3( plugin_interface_console, console, InterfaceConsole, |
13 | Interface, "Mike Buland", 1, 0 ); | 16 | Interface, "Mike Buland", 1, 0 ); |
@@ -27,6 +30,7 @@ void InterfaceConsole::run( Game *pGame ) | |||
27 | GameState gs( pGame, this ); | 30 | GameState gs( pGame, this ); |
28 | gs.init(); | 31 | gs.init(); |
29 | 32 | ||
33 | int iStep = 0; | ||
30 | while( gs.isRunning() ) | 34 | while( gs.isRunning() ) |
31 | { | 35 | { |
32 | char buf[1024]; | 36 | char buf[1024]; |
@@ -34,6 +38,13 @@ void InterfaceConsole::run( Game *pGame ) | |||
34 | fgets( buf, 1024, stdin ); | 38 | fgets( buf, 1024, stdin ); |
35 | 39 | ||
36 | 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; | ||
37 | } | 48 | } |
38 | } | 49 | } |
39 | 50 | ||