#include "interfaceconsole.h" #include "smlnode.h" #include "gamestate.h" #include #include #include "smlrenderervt100.h" #include #include #include PluginInterface3( plugin_interface_console, console, InterfaceConsole, Interface, "Mike Buland", 1, 0 ); using namespace Bu; InterfaceConsole::InterfaceConsole() { } InterfaceConsole::~InterfaceConsole() { } void InterfaceConsole::run( Game *pGame ) { GameState gs( pGame, this ); gs.init(); int iStep = 0; while( gs.isRunning() ) { char buf[1024]; sio << sio.nl << "command> " << sio.flush; fgets( buf, 1024, stdin ); gs.execCommand( buf ); } } void InterfaceConsole::display( const class SmlNode *pSml ) { SmlRendererVt100 rend; rend.render( sio, pSml ); }