[Gcblue-commits] gcb_wx/include/scriptinterface tcFlightPortInterface.h,1.7,1.8 tcPlatformInterface.
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-06-22 01:21:35
|
Update of /cvsroot/gcblue/gcb_wx/include/scriptinterface In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2118/include/scriptinterface Modified Files: tcFlightPortInterface.h tcPlatformInterface.h tcSubInterface.h tcTrackInterface.h Log Message: Misc housekeeping, updates for infrared and anti-radiation seekers, more info for multiplayer airfield units, icon gui enhancements Index: tcPlatformInterface.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/scriptinterface/tcPlatformInterface.h,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** tcPlatformInterface.h 1 Jun 2005 00:13:27 -0000 1.41 --- tcPlatformInterface.h 22 Jun 2005 01:21:26 -0000 1.42 *************** *** 56,63 **** int mnQuantity; int mnTargetFlags; ///< 0x01 - surface, 0x02 - air, 0x04 - land ! float mfRange_km; float maxDepth_m; ///< max depth for subsurface launch int mnLaunchMode; ///< 0 - datum, 1 - handoff ! int launcherStatus; double sectorCenter; ///< az of center of launch engagement sector in deg double sectorWidth; ///< width of engagement sector in deg --- 56,63 ---- int mnQuantity; int mnTargetFlags; ///< 0x01 - surface, 0x02 - air, 0x04 - land ! float mfRange_km; ///< range that ai uses for engaging with this launcher float maxDepth_m; ///< max depth for subsurface launch int mnLaunchMode; ///< 0 - datum, 1 - handoff ! int launcherStatus; ///< see @see tcLauncher::teLauncherStatus double sectorCenter; ///< az of center of launch engagement sector in deg double sectorWidth; ///< width of engagement sector in deg *************** *** 75,79 **** }; ! // wrapper around tcSensorMapTrack with additional info for iterating class tcTrackIterator : public tcSensorMapTrack { --- 75,79 ---- }; ! /// wrapper around tcSensorMapTrack with additional info for iterating class tcTrackIterator : public tcSensorMapTrack { *************** *** 108,116 **** // basic nav commands: heading, speed, altitude ! /// gets platform altitude in meters float GetAltitude() {return mpPlatformObj->mcKin.mfAlt_m;} /// gets fraction of fuel remaining from 0 - 1 float GetFuel() const; ! /// gets max altitude in meters indicated in database entry. float GetMaxAltitude(); /// gets current platform speed in kts --- 108,116 ---- // basic nav commands: heading, speed, altitude ! /// [Python: GetAlt] gets platform altitude in meters float GetAltitude() {return mpPlatformObj->mcKin.mfAlt_m;} /// gets fraction of fuel remaining from 0 - 1 float GetFuel() const; ! /// [Python: GetMaxAlt] gets max altitude in meters indicated in database entry float GetMaxAltitude(); /// gets current platform speed in kts *************** *** 129,133 **** --- 129,135 ---- bool HasThrottle(); /// set goal altitude for platform in meters + /** + * [Python: SetAlt] * For air objects * @param alt_m goal altitude of platform in meters *************** *** 169,180 **** --- 171,185 ---- ||(nModelType == MTYPE_AIR)||(nModelType == MTYPE_HELO); } + /// returns true if platform is a helo bool IsHelo() { return (mpPlatformObj->mnModelType == MTYPE_HELO); } + /// returns true if platform is a submarine bool IsSub() { return (mpPlatformObj->mnModelType == MTYPE_SUBMARINE); } + /// returns a sub interface object, @see scriptinterface::tcSubInterface tcSubInterface GetSubInterface(); *************** *** 215,220 **** /// true if launcher can launch using datum only (i.e. no track just a set of coordinates) bool IsDatumLaunch(int anLauncher) {return mpPlatformObj->mcLauncherState.IsDatumLaunch(anLauncher);} bool GetLauncherInfo(tcLauncherInfo& info, int anLauncher); ! /// version for python tcLauncherInfo GetLauncherInfoByValue(int launcher); --- 220,226 ---- /// true if launcher can launch using datum only (i.e. no track just a set of coordinates) bool IsDatumLaunch(int anLauncher) {return mpPlatformObj->mcLauncherState.IsDatumLaunch(anLauncher);} + /// C++ only bool GetLauncherInfo(tcLauncherInfo& info, int anLauncher); ! /// [Python: GetLauncherInfo] returns launcher info object tcLauncherInfo GetLauncherInfoByValue(int launcher); *************** *** 234,238 **** // order related commands ! /// adds generic order void AddTask(const std::string& taskName, double priority); /// adds navigation waypoint (creates nav task if necessary) --- 240,244 ---- // order related commands ! /// add a task void AddTask(const std::string& taskName, double priority); /// adds navigation waypoint (creates nav task if necessary) *************** *** 288,301 **** --- 294,316 ---- /// true if platform has a flight port (e.g. carrier) bool HasFlightPort(); + /// return flightport interface object tcFlightPortInterface GetFlightPortInfo(); + /// returns track with landing data for landing on platform matching id tcTrack GetLandingData(long id); + /// Get landing state (gear up = 0, down = 1) int GetLandingState(); + /// Set gear up (state = 0) or gear down (state = 1) void SetLandingState(int state); // multiplayer related + /// return name of player controlling this platform std::string GetController() const; + /// true if platform is available for control by client bool IsAvailable() const; + /// true if game is in multiplayer mode bool IsMultiplayerActive() const; + /// release control of this platform (multiplayer) void ReleaseControl(); + /// take control of this platform (multiplayer) void TakeControl(); *************** *** 313,317 **** bool IsPlayerControlled() const; bool IsValid() const; ! void SendCommand(std::string command); /// display text message in user console void DisplayMessage(const std::string& text); --- 328,332 ---- bool IsPlayerControlled() const; bool IsValid() const; ! void SendCommand(const std::string& command); /// display text message in user console void DisplayMessage(const std::string& text); Index: tcTrackInterface.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/scriptinterface/tcTrackInterface.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcTrackInterface.h 1 Jun 2005 00:13:27 -0000 1.7 --- tcTrackInterface.h 22 Jun 2005 01:21:26 -0000 1.8 *************** *** 39,42 **** --- 39,43 ---- public: // platform info + /// Sets affiliation of track, see @see teAffiliation void SetAffiliation(UINT8 anAffil); void DeclareFriendly(); *************** *** 44,47 **** --- 45,49 ---- void DeclareHostile(); void DropTrack(); + /// Updates the ambiguity list for this track based on ESM intercepts void UpdateAmbiguityList(); Index: tcSubInterface.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/scriptinterface/tcSubInterface.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcSubInterface.h 1 Jun 2005 00:13:27 -0000 1.2 --- tcSubInterface.h 22 Jun 2005 01:21:26 -0000 1.3 *************** *** 42,54 **** --- 42,64 ---- { public: + /// max depth of this sub float GetMaxDepth() const; + /// command depth to periscope depth void GoToPeriscopeDepth(); + /// true if at periscope depth bool IsAtPeriscopeDepth(); + /// true if periscope is raised bool IsPeriscopeRaised() const; + /// true if radar mast is raised bool IsRadarMastRaised() const; + /// true if this is a valid interface bool IsValid() const; + /// lower the scope void LowerPeriscope(); + /// lower the radar mast void LowerRadarMast(); + /// raise the scope (must be at periscope depth or shallower) void RaisePeriscope(); + /// raise the radar mast (must be at periscope depth or shallower) void RaiseRadarMast(); Index: tcFlightPortInterface.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/scriptinterface/tcFlightPortInterface.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcFlightPortInterface.h 1 Jun 2005 00:13:27 -0000 1.7 --- tcFlightPortInterface.h 22 Jun 2005 01:21:26 -0000 1.8 *************** *** 43,46 **** --- 43,49 ---- namespace scriptinterface { + /** + * + */ class tcFlightUnitStatus { *************** *** 51,55 **** bool atDestination; bool isIdle; ! int runway; // -1 if not on a runway, otherwise runway number double ready_time; }; --- 54,58 ---- bool atDestination; bool isIdle; ! int runway; ///< -1 if not on a runway, otherwise runway number double ready_time; }; *************** *** 58,61 **** --- 61,67 ---- ** associated with the static vars, etc. */ + /** + * Interface for control of flightport (airfield, helo deck, carrier deck) + */ class tcFlightPortInterface { *************** *** 75,88 **** // Interface functions to be called through Python bool IsValid(); double GetTime(); ! int GetUnitCount(void); long GetUnitID(int n); // long used for compatibility with Python tcFlightUnitStatus GetUnitStatus(int n); std::string GetUnitName(int n); std::string GetUnitLocation(int n); std::string GetUnitGoalLocation(int n); void Launch(int runway); void LaunchID(long id); ! void SetDestination(int n, int dest_code); // 0 - hangar, 1 - ready, 2 - runway/launch tcFlightPortInterface(); --- 81,103 ---- // Interface functions to be called through Python bool IsValid(); + /// @returns simulation time of last update of this flightport double GetTime(); ! /// @returns number of air units in this flightport ! int GetUnitCount(); ! /// @returns id of unit n (index starts at 0) long GetUnitID(int n); // long used for compatibility with Python + /// @returns status object for unit n, @see scriptinterface::tcFlightUnitStatus tcFlightUnitStatus GetUnitStatus(int n); std::string GetUnitName(int n); + /// @returns string for loc, @see tcAirState::LocationToString std::string GetUnitLocation(int n); + /// @returns string for goal loc, @see tcAirState::LocationToString std::string GetUnitGoalLocation(int n); + /// launch unit on indicated runway void Launch(int runway); + /// launch unit matching id (if unit is on runway) void LaunchID(long id); ! /// sets destination of unit n; dest_code: 0 - hangar, 1 - ready, 2 - runway/launch ! void SetDestination(int n, int dest_code); tcFlightPortInterface(); |