[Gcblue-commits] gcb_wx/include/sim tcAeroAirObject.h,1.10,1.11 tcCommandObject.h,1.3,1.4 tcGameObje
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-05-21 02:00:38
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19557/include/sim Modified Files: tcAeroAirObject.h tcCommandObject.h tcGameObject.h tcLauncher.h tcRadar.h tcSensorState.h tcStores.h Log Message: Mods to allow aircraft to load / unload with airbase stores, simplified flight model Index: tcGameObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcGameObject.h,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** tcGameObject.h 29 Apr 2005 18:52:02 -0000 1.37 --- tcGameObject.h 21 May 2005 02:00:28 -0000 1.38 *************** *** 121,124 **** --- 121,125 ---- float BearingToRad(tcGameObject& p) const; void AddChild(tcGameObject *child); + bool IsChild(const tcGameObject* child) const; void RemoveChild(tcGameObject *child); virtual void Clear(void); Index: tcLauncher.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcLauncher.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tcLauncher.h 5 May 2005 02:14:19 -0000 1.14 --- tcLauncher.h 21 May 2005 02:00:28 -0000 1.15 *************** *** 73,77 **** }; ///< launcher status codes ! int mbActive; std::string displayName; --- 73,77 ---- }; ///< launcher status codes ! short int mbActive; std::string displayName; *************** *** 82,99 **** float mfTimeToReady; ! int mnCurrent; ! int mnUncommitted; ///< mnCurrent - mnUncommitted = # pending launch ! int errorCode; ///< used in multiplayer to pass error code to client bool isLoading; ///< true if launcher is offline to load/unload weapons ! GeoPoint msDatum; ///< datum to pass to weapon nav guidance tnPoolIndex mnTargetID; ///< track that seeker can acquire teWeaponLaunchMode meLaunchMode; ! int mnTargetFlags; ///< 0x01 - surface, 0x02 - air, 0x03 - land float pointingAngle; ///< boresight azimuth angle in radians relative nose/bow float pointingElevation; ///< elevation angle in radians relative (to horizon?) tcRadar *fireControlSensor; ///< sensor for fire control guidance ! unsigned fireControlSensorIdx; ///< index of sensor on parent platform // torpedo programming params --- 82,100 ---- float mfTimeToReady; ! short int mnCurrent; ! short int mnUncommitted; ///< mnCurrent - mnUncommitted = # pending launch ! short int errorCode; ///< used in multiplayer to pass error code to client bool isLoading; ///< true if launcher is offline to load/unload weapons ! unsigned short capacity; ///< max capacity for current child class ! GeoPoint msDatum; ///< datum to pass to weapon nav guidance tnPoolIndex mnTargetID; ///< track that seeker can acquire teWeaponLaunchMode meLaunchMode; ! short int mnTargetFlags; ///< 0x01 - surface, 0x02 - air, 0x03 - land float pointingAngle; ///< boresight azimuth angle in radians relative nose/bow float pointingElevation; ///< elevation angle in radians relative (to horizon?) tcRadar *fireControlSensor; ///< sensor for fire control guidance ! unsigned char fireControlSensorIdx; ///< index of sensor on parent platform // torpedo programming params *************** *** 119,123 **** const std::string& GetLauncherName() const; float GetCycleTime() const; ! int GetErrorCode() const {return errorCode;} int GetLauncherStatus(); float GetSectorCenter() const; ///< returns center of engagement sector in radians --- 120,124 ---- const std::string& GetLauncherName() const; float GetCycleTime() const; ! short int GetErrorCode() const {return errorCode;} int GetLauncherStatus(); float GetSectorCenter() const; ///< returns center of engagement sector in radians *************** *** 133,136 **** --- 134,139 ---- void SetLoadState(bool state); void SetParent(tcGameObject *obj); + /// @return max quantity of item that launcher can hold, 0 if not compatible + unsigned int GetCapacityForItem(const std::string& item) const; unsigned int GetCompatibleCount() const; std::string GetCompatibleName(unsigned int idx) const; *************** *** 139,145 **** unsigned char GetStatus() const; void UpdateStatus(); ! static std::string TranslateStatus(int statusCode); ! tcLauncher(); tcLauncher(tcLauncherDBObject* dbObj, tcGameObject* par); --- 142,149 ---- unsigned char GetStatus() const; void UpdateStatus(); ! ! static void AttachSimState(tcSimState* ss); static std::string TranslateStatus(int statusCode); ! tcLauncher(); tcLauncher(tcLauncherDBObject* dbObj, tcGameObject* par); Index: tcAeroAirObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcAeroAirObject.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcAeroAirObject.h 17 Apr 2005 22:35:00 -0000 1.10 --- tcAeroAirObject.h 21 May 2005 02:00:28 -0000 1.11 *************** *** 81,85 **** float throttleFraction; ///< throttle setting from 0 to 1 military, greater than 1 to use afterburners float angleOfAttack; ///< angle of attack in radians, solved assuming level flight - const float liftCoeffToAoa; ///< factor to convert Cl to AOA --- 81,84 ---- Index: tcCommandObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcCommandObject.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcCommandObject.h 5 May 2005 02:14:19 -0000 1.3 --- tcCommandObject.h 21 May 2005 02:00:28 -0000 1.4 *************** *** 39,46 **** bool HasNewCommand() const; - /// implements rules for updating command params over multiplayer connection - void LoadCommandParam(tcCommandStream& stream, float& param, int flag); - void LoadCommandParam(tcCommandStream& stream, int& param, int flag); - void SetNewCommand(int flag); --- 39,42 ---- Index: tcRadar.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcRadar.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** tcRadar.h 11 Dec 2004 01:09:05 -0000 1.13 --- tcRadar.h 21 May 2005 02:00:28 -0000 1.14 *************** *** 66,74 **** // fire-control vars ! unsigned int fireControlTrackCount; // semi-active and command mode vars long illuminatorID; ///< id of SA illuminating platform ! unsigned illuminatorSensorIdx; ///< sensor index of illum platform virtual bool CanDetectTarget(const tcGameObject* target, float& range_km); --- 66,74 ---- // fire-control vars ! unsigned char fireControlTrackCount; // semi-active and command mode vars long illuminatorID; ///< id of SA illuminating platform ! unsigned char illuminatorSensorIdx; ///< sensor index of illum platform virtual bool CanDetectTarget(const tcGameObject* target, float& range_km); *************** *** 83,87 **** virtual bool IsSemiactive() const {return isSemiactive;} virtual void SetCommandState(bool state); ! virtual void SetIlluminator(long illum_id, unsigned sensor_idx); void Serialize(tcFile& file, bool mbLoad); --- 83,87 ---- virtual bool IsSemiactive() const {return isSemiactive;} virtual void SetCommandState(bool state); ! virtual void SetIlluminator(long illum_id, unsigned char sensor_idx); void Serialize(tcFile& file, bool mbLoad); Index: tcStores.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcStores.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcStores.h 29 Nov 2004 03:54:49 -0000 1.1 --- tcStores.h 21 May 2005 02:00:28 -0000 1.2 *************** *** 37,40 **** --- 37,41 ---- using namespace Database; + class tcGameObject; class tcPlatformObject; *************** *** 70,73 **** --- 71,75 ---- unsigned int launcherIdx; ///< launcher idx to transfer to/from int transferType; ///< UNLOAD or LOAD + tcGameObject* obj; ///< 0 for local platform, otherwise child obj }; *************** *** 77,83 **** bool IsCompatible(const std::string& item) const; bool IsFull() const; ! bool LoadLauncher(unsigned int idx, const std::string& item); void SetParent(tcPlatformObject* obj); ! bool UnloadLauncher(unsigned int idx); void Update(double t); --- 79,86 ---- bool IsCompatible(const std::string& item) const; bool IsFull() const; ! bool LoadLauncher(unsigned int idx, const std::string& item, ! tcGameObject* child = 0); void SetParent(tcPlatformObject* obj); ! bool UnloadLauncher(unsigned int idx, tcGameObject* child = 0); void Update(double t); *************** *** 105,108 **** --- 108,112 ---- void CompleteOperation(StoreOperation& op); + tcGameObject* GetChildOrParent(tcGameObject* child); }; #endif \ No newline at end of file Index: tcSensorState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorState.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tcSensorState.h 29 Mar 2005 00:12:24 -0000 1.16 --- tcSensorState.h 21 May 2005 02:00:28 -0000 1.17 *************** *** 55,65 **** { public: ! int mbActive; ! tcGameObject *parent; ! tnPoolIndex mnDBKey; tcSensorDBObject* mpDBObj; double mfLastScan; float mfCurrentScanPeriod_s; ! int mnMode; tcTrack mcTrack; //GeoPoint msCurrentPos; ///< current true position of sensor --- 55,65 ---- { public: ! short int mbActive; ! tcGameObject* parent; ! long mnDBKey; tcSensorDBObject* mpDBObj; double mfLastScan; float mfCurrentScanPeriod_s; ! short int mnMode; tcTrack mcTrack; //GeoPoint msCurrentPos; ///< current true position of sensor |