00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 #include <boost/thread.hpp>
00009 #include <boost/date_time.hpp>
00010 
00011 #include <getopt.h>
00012 #include <stdlib.h>
00013 #include <iostream>
00014 
00015 #include <engine.h>
00016 #include <entityMgr.h>
00017 
00018 #include <options.h>
00019 
00020 
00021 using namespace FastEcslent;
00022 
00023 
00024 
00025 Options makeOptions(int argc, char*argv[]){
00026         Options options;
00027         options.enableNetworking = true;
00028         options.networkPort      = 54321;
00029 
00030         
00031         options.isServer         = false;
00032         options.gameNumber = 1;
00033         options.side = BLUE;
00034         options.player = THREE;
00035 
00036 
00037         options.runAsEvaluator = true;
00038         options.instanceId = random();
00039 
00040         options.tacticalAI = true;
00041 
00042         options.enableGfx = true;
00043 
00044         options.runDebugTests = false;
00045 
00046         options.speedup = 10.0;
00047 
00048 
00049         return options;
00050 }
00051 
00052 int main(int argc, char *argv[]){
00053         srandom(time(NULL));
00054         Options options = makeOptions(argc, argv);
00055 
00056         Engine *engine = new Engine(random(), options);
00057 
00058         
00059         engine->constructManagers();
00060         
00061         engine->init();
00062         
00063         engine->loadLevel();
00064         
00065         engine->run();
00066         
00067         engine->releaseLevel();
00068         
00069         engine->stop();
00070 
00071         delete engine;
00072 
00073         return 0;
00074 }
00075 
00076 
00077 
00078 
00079 
00080 
00081 
00082 
00083 
00084 
00085 
00086 
00087 
00088 
00089 
00090 
00091 
00092 
00093 
00094 
00095 
00096 
00097 
00098 
00099 
00100 
00101 
00102 
00103 
00104 
00105 
00106 
00107 
00108 
00109 
00110 
00111