00001 /* 00002 * engine.h 00003 * 00004 * Created on: November 20, 2011 00005 * Author: sushil j louis 00006 */ 00007 00008 #ifndef ENGINE_H_ 00009 #define ENGINE_H_ 00010 00011 #include <options.h> 00012 #include <entityMgr.h> 00013 #include <selectionMgr.h> 00014 #include <weaponMgr.h> 00015 #include <gameMgr.h> 00016 #include <distanceMgr.h> 00017 00018 #include <groupMgr.h> 00019 00020 00021 #include <gfxThread.h> 00022 #include <netThread.h> 00023 #include <timer.h> 00024 00025 //#include<params.h> 00026 00027 namespace FastEcslent { 00028 00029 class Engine { 00030 00031 private: 00032 void tickAll(float dt); 00033 00034 //test vars/methods 00035 FastEcslent::MilliSecondTimer* selectionTimer; 00036 FastEcslent::MilliSecondTimer* distanceTimer; 00037 void runTests(); 00038 00039 00040 00041 public: 00042 00043 Options options; 00044 int instanceId; 00045 //Params flockParameters; 00046 int rands[1000]; 00047 00048 bool quit; 00049 boost::mutex quitLock; 00050 00051 EntityMgr* entityMgr; 00052 SelectionMgr* selectionMgr; 00053 WeaponMgr* weaponMgr; 00054 GameMgr* gameMgr; 00055 DistanceMgr* distanceMgr; 00056 GroupMgr* groupMgr; 00057 00058 00059 //threads. optional Features 00060 00061 NetThread *net; 00062 GfxThread *gfx; 00063 00064 Engine(int instId, Options opts) { 00065 instanceId = instId; 00066 options = opts; 00067 quit = false; 00068 } 00069 00070 ~Engine(){ 00071 delete selectionMgr; 00072 delete distanceMgr; 00073 delete gameMgr; 00074 delete groupMgr; 00075 delete entityMgr; 00076 } 00077 //Managers 00078 void showMenu(); 00079 void constructManagers(); 00080 void init(); 00081 void loadLevel(); 00082 void releaseLevel(); 00083 void run(); 00084 void stop(); 00085 00086 } ; 00087 00088 typedef Engine * EnginePtr; 00089 } 00090 00091 00092 00093 #endif /* ENGINE_H_ */