[Gcblue-commits] gcb_wx/include/sim tcFlightPort.h, 1.14, 1.15 tcPlatformObject.h, 1.36, 1.37
Status: Alpha
Brought to you by:
ddcforge
From: Dewitt C. <ddc...@us...> - 2006-09-28 02:01:56
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv32752/include/sim Modified Files: tcFlightPort.h tcPlatformObject.h Log Message: Initial airbase automation work Index: tcFlightPort.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcFlightPort.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tcFlightPort.h 22 Mar 2006 01:23:29 -0000 1.14 --- tcFlightPort.h 28 Sep 2006 02:01:52 -0000 1.15 *************** *** 1,4 **** ! /* ! ** Copyright (C) 2003 Dewitt Colclough (de...@gc...) ** All rights reserved. --- 1,9 ---- ! /** ! ** @file tcFlightPort.h ! ** ! ** tcFlightPort object: descibes objects that allow air objects to take off ! ** and land. This includes land-based runways, carrier runways, helipads, VTOL pads. ! */ ! /* Copyright (C) 2003-2006 Dewitt Colclough (de...@gc...) ** All rights reserved. *************** *** 17,22 **** ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** ! ** tcFlightPort object: descibes objects that allow air objects to take off ! ** and land. This includes land-based runways, carrier runways, helipads, VTOL pads. */ --- 22,26 ---- ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** ! */ *************** *** 32,35 **** --- 36,41 ---- class tcUpdateStream; + class tcMissionManager; + namespace database { *************** *** 44,50 **** NOWHERE = 0, HANGAR = 1, ///< longer term storage or repair ! READY = 2, ///< out of hangar LAUNCH = 3, ///< ready to take off ! TRANSIT = 4 ///< moving }; enum teOperation --- 50,56 ---- NOWHERE = 0, HANGAR = 1, ///< longer term storage or repair ! READY = 2, ///< out of hangar, on deck LAUNCH = 3, ///< ready to take off ! TAKEOFF = 5 ///< move to launch and take off }; enum teOperation *************** *** 69,72 **** --- 75,79 ---- teLocation goal_location; int goal_spot; // destination within deck1, deck2, or launch + bool inTransit; teOperation op; double ready_time; // time for op to be completed *************** *** 115,120 **** int FindEmptySpot(teLocation loc, std::vector<tsSpotInfo>*& loc_vector); tcAirState* GetAirState(unsigned n); int GetAirStateIdx(long id); ! size_t GetCount() {return units.size();} tsSpotInfo* GetCurrentSpotInfo(tcAirState *airstate); tcFlightportDBObject* GetDatabaseObject() const; --- 122,128 ---- int FindEmptySpot(teLocation loc, std::vector<tsSpotInfo>*& loc_vector); tcAirState* GetAirState(unsigned n); + const tcAirState* GetAirState(unsigned n) const; int GetAirStateIdx(long id); ! size_t GetCount() const {return units.size();} tsSpotInfo* GetCurrentSpotInfo(tcAirState *airstate); tcFlightportDBObject* GetDatabaseObject() const; *************** *** 122,125 **** --- 130,134 ---- tcTrack GetLandingData(const tcGameObject* obj); tcGameObject* GetObject(unsigned n); + tcGameObject* GetObjectById(long id); std::vector<tsSpotInfo>* GetLocVector(teLocation loc); *************** *** 129,142 **** int Launch(int runway); // order unit on runway to take off int LaunchID(long id); // order unit with id to take off (if on runway) ! void MoveObjectToGoal(tcAirState *airstate); bool MoveToLaunchQueue(tcAirState *airstate); void SetObjectDestination(unsigned n, teLocation loc, unsigned int position = 0); void SetParent(tcGameObject *newparent) {parent=newparent;} void SetHangarCapacity(unsigned cap) {hangarCapacity = cap;} ! void Update(double afStatusTime); void UpdateLanded(); void UpdateRelPos(tcAirState *airstate, double time); void UpdateUnitKin(tcAirState *airstate); // update unit kinematics based on parent info and rel_pos tcCommandStream& operator<<(tcCommandStream& stream); tcCreateStream& operator<<(tcCreateStream& stream); --- 138,154 ---- int Launch(int runway); // order unit on runway to take off int LaunchID(long id); // order unit with id to take off (if on runway) ! bool MoveToLaunchQueue(tcAirState *airstate); void SetObjectDestination(unsigned n, teLocation loc, unsigned int position = 0); + void SetObjectDestination(tcAirState* airstate, teLocation loc, unsigned int position = 0); void SetParent(tcGameObject *newparent) {parent=newparent;} void SetHangarCapacity(unsigned cap) {hangarCapacity = cap;} ! void Update(double t); void UpdateLanded(); void UpdateRelPos(tcAirState *airstate, double time); void UpdateUnitKin(tcAirState *airstate); // update unit kinematics based on parent info and rel_pos + tcMissionManager* GetMissionManager(); + tcCommandStream& operator<<(tcCommandStream& stream); tcCreateStream& operator<<(tcCreateStream& stream); *************** *** 171,175 **** --- 183,190 ---- }; std::vector<CommandInfo> commandList; + tcMissionManager* missionManager; + teLocation GetNextStop(teLocation current, teLocation destination); + void MoveObjectToDestination(tcAirState *airstate, teLocation destination, int spot); bool IsSpotEmpty(teLocation loc, unsigned int spot); void ResyncSpots(); Index: tcPlatformObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcPlatformObject.h,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** tcPlatformObject.h 5 Sep 2006 01:04:24 -0000 1.36 --- tcPlatformObject.h 28 Sep 2006 02:01:52 -0000 1.37 *************** *** 126,129 **** --- 126,136 ---- bool IsRefueling() const; + bool IsCapableVsTargetType(int targetFlag); + bool IsEquippedForTargetType(int targetFlag); + bool AllLaunchersEmpty(); + void UnloadAllLaunchers(); + void EquipForTargetType(int targetFlag); + void EquipForTargetType(const std::string& targetType); + virtual void Launch(tnPoolIndex& rnKey, unsigned& rnLauncher); virtual void RandInitNear(float afLon_deg, float afLat_deg); |