#include "gamebuilder.h" #include "game.h" #include "gamestate.h" #include "options.h" #include #include #ifdef WIN32 #define srandom( x ) srand( x ) #endif #include using namespace Bu; int main( int argc, char *argv[] ) { Options &opt = Options::getInstance(); opt.parse( argc, argv ); if( opt.sFile.isEmpty() ) { sio << "You must specify a stage script filename." << sio.nl; return 1; } srandom( time( NULL ) ); GameBuilder bld; bld.parse( opt.sFile ); Game *pGame = bld.getGame(); GameState gs( pGame ); gs.init(); while( gs.isRunning() ) { char buf[1024]; sio << sio.nl << "command> " << sio.flush; fgets( buf, 1024, stdin ); gs.execCommand( buf ); } return 0; }