blob: 7e2ef7f63e1566a4311add81e11caa0023387c8c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#include "gamebuilder.h"
#include "game.h"
#include "gamestate.h"
#include "options.h"
#include <stdlib.h>
#include <time.h>
#ifdef WIN32
#define srandom( x ) srand( x )
#endif
#include <bu/sio.h>
using namespace Bu;
int main( int argc, char *argv[] )
{
Options &opt = Options::getInstance();
opt.parse( argc, argv );
srandom( time( NULL ) );
GameBuilder bld;
bld.parse( argv[1] );
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;
}
|