[Gcblue-commits] gcb_wx/include/sim Game.h,1.34,1.35 tcSensorMap.h,1.5,1.6 tcSimState.h,1.22,1.23
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-05-08 21:25:34
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19946/include/sim Modified Files: Game.h tcSensorMap.h tcSimState.h Log Message: Index: tcSimState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSimState.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** tcSimState.h 27 Apr 2004 01:24:17 -0000 1.22 --- tcSimState.h 8 May 2004 21:25:25 -0000 1.23 *************** *** 106,110 **** void AddPlatform(tcGameObject *pplat); void AddPlatformWithKey(tcGameObject *pplat, tnPoolIndex key); ! void AddRandomPlatform(void); void AttachCommandInterface(tcCommandQueue *apCommandInterface) {mpCommandInterface=apCommandInterface;} void AttachDB(tcDatabase *pDatabase); --- 106,110 ---- void AddPlatform(tcGameObject *pplat); void AddPlatformWithKey(tcGameObject *pplat, tnPoolIndex key); ! void AddRandomPlatform(); void AttachCommandInterface(tcCommandQueue *apCommandInterface) {mpCommandInterface=apCommandInterface;} void AttachDB(tcDatabase *pDatabase); *************** *** 146,152 **** tcGameObject* GetObjectByName(std::string unitName); int GetPlatformsWithinRegion(tnPoolIndex *apKeyList, int anLength, tcRect *apRegion); ! long GetRandomPlatform(void); int GetSeekerTrack(long anKey, tcTrack& track); ! double GetTime(void) {return mfSimTime;} long GetTimeAcceleration() const; bool IsLauncherReady(tcGameObject *apGameObj, unsigned anLauncher); --- 146,153 ---- tcGameObject* GetObjectByName(std::string unitName); int GetPlatformsWithinRegion(tnPoolIndex *apKeyList, int anLength, tcRect *apRegion); ! long GetRandomPlatform(); int GetSeekerTrack(long anKey, tcTrack& track); ! tcSensorMap* GetSensorMap(); ! double GetTime() {return mfSimTime;} long GetTimeAcceleration() const; bool IsLauncherReady(tcGameObject *apGameObj, unsigned anLauncher); *************** *** 157,161 **** bool RadarCanDetect(tnPoolIndex anSensorKey, const tcGameObject* target, tcGameObject* reference, float afSensorAz, long fcID = -1, unsigned fcIdx = 0); ! void RandInit(void); void RemoveDestroyedObjects(void); void RequestLaunch(long anKey,int anLauncher); --- 158,162 ---- bool RadarCanDetect(tnPoolIndex anSensorKey, const tcGameObject* target, tcGameObject* reference, float afSensorAz, long fcID = -1, unsigned fcIdx = 0); ! void RandInit(); void RemoveDestroyedObjects(void); void RequestLaunch(long anKey,int anLauncher); *************** *** 171,175 **** void SetTime(double afNewTime) {mfSimTime=afNewTime;} /////< Sets sim time, normally 0 at start of sim void SetTimeAcceleration(long accel); ! void Update(void); void UpdateAI(double afSimTime); void UpdateLandings(double afSimTime); --- 172,176 ---- void SetTime(double afNewTime) {mfSimTime=afNewTime;} /////< Sets sim time, normally 0 at start of sim void SetTimeAcceleration(long accel); ! void Update(); void UpdateAI(double afSimTime); void UpdateLandings(double afSimTime); *************** *** 178,184 **** void UpdateObjEngagements(double afSimTime); void UpdateObjFormations(double afSimTime); ! void UpdateObjTerrainInfo(void); ! void UpdateSensors(void); ! void UpdateWeaponHits(void); private: tcSimState(); --- 179,184 ---- void UpdateObjEngagements(double afSimTime); void UpdateObjFormations(double afSimTime); ! void UpdateObjTerrainInfo(); ! void UpdateWeaponHits(); private: tcSimState(); Index: tcSensorMap.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorMap.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcSensorMap.h 16 Feb 2004 01:06:22 -0000 1.5 --- tcSensorMap.h 8 May 2004 21:25:25 -0000 1.6 *************** *** 32,40 **** class tcSimState; ! namespace Sensor { ! // stores all state information needed by sensor for surveillance tracks ! class tcSensorReport { public: float mfLon_rad; --- 32,45 ---- class tcSimState; + class tcUpdateStream; ! namespace Sensor ! { ! /** ! * stores all state information needed by sensor for surveillance tracks ! */ ! class tcSensorReport ! { public: float mfLon_rad; *************** *** 44,48 **** float mfHeading_rad; double mfTimestamp; ! double mfStartTime; // birth time of track from report tnPoolIndex mnTrackID; tnPoolIndex mnSensorPlatformID; --- 49,53 ---- float mfHeading_rad; double mfTimestamp; ! double mfStartTime; ///< birth time of track from report tnPoolIndex mnTrackID; tnPoolIndex mnSensorPlatformID; *************** *** 50,54 **** std::vector<UINT32> maEmitter; unsigned mbClassified : 1; ! void Clear() { mfLon_rad=0;mfLat_rad=0;mfAlt_m=0; mfSpeed_kts=0;mfHeading_rad=0; --- 55,60 ---- std::vector<UINT32> maEmitter; unsigned mbClassified : 1; ! void Clear() ! { mfLon_rad=0;mfLat_rad=0;mfAlt_m=0; mfSpeed_kts=0;mfHeading_rad=0; *************** *** 63,68 **** }; ! struct tsEmitterInfo { ! tnPoolIndex mnEmitterID; // database ID of emitter double mfTimestamp; int mnMode; --- 69,75 ---- }; ! struct tsEmitterInfo ! { ! tnPoolIndex mnEmitterID; ///< database ID of emitter double mfTimestamp; int mnMode; *************** *** 80,88 **** //tcTrack track; double mfLastUpdateTime; ! tcSensorReport maSensorReport[MAX_SENSOR_REPORTS]; // most recent data from contributing sensors int mnContributors; tsEmitterInfo maEmitterInfo[MAX_EMITTERS]; int mnEmitters; ! tnPoolIndex mnDatabaseID; // database ID of track float matchupRating; ///< matchup rating for platforms that have targeted this track float expectedDamage; ///< rating of expected fractional damage of weapons launched at target, 0 - none, 1.0 - totally destroyed --- 87,95 ---- //tcTrack track; double mfLastUpdateTime; ! tcSensorReport maSensorReport[MAX_SENSOR_REPORTS]; ///< most recent data from contributing sensors int mnContributors; tsEmitterInfo maEmitterInfo[MAX_EMITTERS]; int mnEmitters; ! tnPoolIndex mnDatabaseID; ///< database ID of track float matchupRating; ///< matchup rating for platforms that have targeted this track float expectedDamage; ///< rating of expected fractional damage of weapons launched at target, 0 - none, 1.0 - totally destroyed *************** *** 103,107 **** int GetEmitterCount() {return mnEmitters;} ! const tsEmitterInfo* GetEmitter(int anIdx) { if ((anIdx < 0)||(anIdx >= mnEmitters)) {return NULL;} return &maEmitterInfo[anIdx]; --- 110,115 ---- int GetEmitterCount() {return mnEmitters;} ! const tsEmitterInfo* GetEmitter(int anIdx) ! { if ((anIdx < 0)||(anIdx >= mnEmitters)) {return NULL;} return &maEmitterInfo[anIdx]; *************** *** 130,134 **** bool UpdatePassiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID); ! void UpdateTrack(void); tcSensorMapTrack* operator= (tcSensorMapTrack *pa) {return pa;} --- 138,146 ---- bool UpdatePassiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID); ! void UpdateTrack(); ! ! ! tcUpdateStream& operator<<(tcUpdateStream& stream); ! tcUpdateStream& operator>>(tcUpdateStream& stream); tcSensorMapTrack* operator= (tcSensorMapTrack *pa) {return pa;} *************** *** 148,155 **** enum {MAX_SMTRACKS = 512, MAX_TRACKS = 512}; public: ! int GetTrackCount(void); ! tnPoolIndex GetStartTrackPosition(void); void GetNextTrack(tnPoolIndex& pos, tcSensorMapTrack*& pTrack); ! void Clear(void); void DropTrack(tnPoolIndex anID); --- 160,167 ---- enum {MAX_SMTRACKS = 512, MAX_TRACKS = 512}; public: ! int GetTrackCount(); ! tnPoolIndex GetStartTrackPosition(); void GetNextTrack(tnPoolIndex& pos, tcSensorMapTrack*& pTrack); ! void Clear(); void DropTrack(tnPoolIndex anID); *************** *** 164,167 **** --- 176,183 ---- bool GetTrack(unsigned long anTrackID, tcTrack& track); int Serialize(tcFile& file, bool mbLoad); + tcUpdateStream& operator<<(tcUpdateStream& stream); + tcUpdateStream& operator>>(tcUpdateStream& stream); + + tcAllianceSensorMap(); virtual ~tcAllianceSensorMap(); *************** *** 173,178 **** }; ! // holds tcAllianceSensorMaps for all alliances ! class tcSensorMap { enum {MAX_MAPS = 4, MAX_ALLIANCES = 256}; public: --- 189,198 ---- }; ! /** ! * holds tcAllianceSensorMaps for all alliances ! * @see tcAllianceSensorMap ! */ ! class tcSensorMap ! { enum {MAX_MAPS = 4, MAX_ALLIANCES = 256}; public: *************** *** 182,185 **** --- 202,206 ---- tcAllianceSensorMap* GetMap(UINT8 anAlliance); + tcAllianceSensorMap* GetOrCreateMap(UINT8 alliance); void CreateMapForAlliance(UINT8 anAlliance); *************** *** 190,194 **** tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack, UINT8 anAlliance); ! void Clear(void); void Update(double afStatusTime); --- 211,215 ---- tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack, UINT8 anAlliance); ! void Clear(); void Update(double afStatusTime); *************** *** 196,200 **** bool GetTrack(unsigned long anTrackID, tcTrack& track, UINT8 anAlliance); int Serialize(tcFile& file, bool mbLoad); ! bool Test(void); tcSensorMap(); --- 217,221 ---- bool GetTrack(unsigned long anTrackID, tcTrack& track, UINT8 anAlliance); int Serialize(tcFile& file, bool mbLoad); ! bool Test(); tcSensorMap(); Index: Game.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/Game.h,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** Game.h 27 Apr 2004 01:24:17 -0000 1.34 --- Game.h 8 May 2004 21:25:25 -0000 1.35 *************** *** 156,160 **** tcSimState *simState; tcMapData mcMapData; - tcOptions mcOptions; tcCommandQueue mcCommandQueue; tcSimPythonInterface *pythonInterface; --- 156,159 ---- |