[Gcblue-commits] gcb_wx/include/ai Blackboard.h, 1.3, 1.4 Brain.h, 1.11, 1.12 tcCAPMission.h, 1.1,
Status: Alpha
Brought to you by:
ddcforge
From: Dewitt C. <ddc...@us...> - 2006-10-24 01:34:31
|
Update of /cvsroot/gcblue/gcb_wx/include/ai In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv8449/include/ai Modified Files: Blackboard.h Brain.h tcCAPMission.h tcMission.h tcMissionManager.h Log Message: Index: tcMissionManager.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/ai/tcMissionManager.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcMissionManager.h 1 Oct 2006 21:07:39 -0000 1.2 --- tcMissionManager.h 24 Oct 2006 01:33:57 -0000 1.3 *************** *** 29,36 **** #include <map> #include <vector> class tcFlightPort; - class tcMission; class tcAirObject; /** --- 29,41 ---- #include <map> #include <vector> + #include "ai/MissionAircraftInfo.h" class tcFlightPort; class tcAirObject; + class tcGameObject; + + namespace ai { + + class tcMission; /** *************** *** 46,55 **** { public: - void AddMission(tcMission* mission_); void DeleteMission(unsigned int missionId); ! std::vector<long>& GetAvailableAircraft(int targetMask); tcAirObject* GetAircraft(long id); bool IsAircraftReserved(long id) const; void LaunchAircraft(long id); --- 51,61 ---- { public: void AddMission(tcMission* mission_); void DeleteMission(unsigned int missionId); ! std::vector<MissionAircraftInfo>& GetAvailableAircraft(int targetMask); tcAirObject* GetAircraft(long id); + long GetFlightportParentId() const; + tcGameObject* GetFlightportParent(); bool IsAircraftReserved(long id) const; void LaunchAircraft(long id); *************** *** 71,74 **** --- 77,83 ---- }; + } // namespace + + #endif Index: tcCAPMission.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/ai/tcCAPMission.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcCAPMission.h 28 Sep 2006 02:01:53 -0000 1.1 --- tcCAPMission.h 24 Oct 2006 01:33:57 -0000 1.2 *************** *** 33,36 **** --- 33,37 ---- class tcPoint; + namespace ai { class tcCAPMission : public tcMission *************** *** 50,57 **** unsigned int quantity; // number aircraft for mission tcPoint station; ! }; --- 51,63 ---- unsigned int quantity; // number aircraft for mission tcPoint station; + float range_km; // calculated + float az_deg; // calculated ! void CalculatePatrolOffset(); ! void MonitorMissionInProgress(); + }; + } // namespace Index: Blackboard.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/ai/Blackboard.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Blackboard.h 12 Dec 2005 02:37:01 -0000 1.3 --- Blackboard.h 24 Oct 2006 01:33:57 -0000 1.4 *************** *** 30,33 **** --- 30,36 ---- #include <string> + class tcStream; + class tcCommandStream; + namespace scriptinterface { *************** *** 43,46 **** --- 46,52 ---- { public: + static bool GetMultiplayerClientMode(); + static void SetMultiplayerClientMode(bool state); + void Erase(const std::string& key, double priority); void EraseAll(); *************** *** 56,63 **** bool Write(const std::string& key, long author, double priority, const std::string& message); ! Blackboard(); ~Blackboard(); private: std::map<std::string, BlackboardItem> content; }; } --- 62,78 ---- bool Write(const std::string& key, long author, double priority, const std::string& message); ! tcCommandStream& operator<<(tcCommandStream& stream); ! tcCommandStream& operator>>(tcCommandStream& stream); ! void ClearNewCommand(); ! bool HasNewCommand() const; ! ! Blackboard(); ~Blackboard(); private: std::map<std::string, BlackboardItem> content; + + std::map<std::string, BlackboardItem> clientContent; // for multiplayer client + bool hasNewCommand; ///< for multiplayer, true if task or bb state has been changed + static bool multiplayerClientMode; ///< true to use multiplayer client mode }; } Index: tcMission.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/ai/tcMission.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcMission.h 1 Oct 2006 21:07:39 -0000 1.2 --- tcMission.h 24 Oct 2006 01:33:57 -0000 1.3 *************** *** 29,35 **** #include <string> #include <vector> ! class tcMissionManager; /** --- 29,37 ---- #include <string> #include <vector> + #include "ai/MissionAircraftInfo.h" ! namespace ai { + class tcMissionManager; /** *************** *** 43,47 **** void EndMission(); unsigned int GetId() const; ! const std::vector<long>& GetMissionAircraft() const; bool AllMissionAircraftDeparted() const; --- 45,49 ---- void EndMission(); unsigned int GetId() const; ! const std::vector<MissionAircraftInfo>& GetMissionAircraft() const; bool AllMissionAircraftDeparted() const; *************** *** 56,61 **** protected: tcMissionManager* missionManager; ! std::vector<long> missionAircraft; std::string stage; private: --- 58,64 ---- protected: tcMissionManager* missionManager; ! std::vector<MissionAircraftInfo> missionAircraft; std::string stage; + double lastUpdate; private: *************** *** 65,69 **** ! --- 68,72 ---- ! } // namespace Index: Brain.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/ai/Brain.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Brain.h 27 Aug 2006 21:28:53 -0000 1.11 --- Brain.h 24 Oct 2006 01:33:57 -0000 1.12 *************** *** 69,72 **** --- 69,73 ---- void AddTask(const std::string& taskName, double priority_, int attributes_ = 0); + void AddTaskDirectly(const std::string& taskName, double priority_, int attributes_); /// gets a low priority, anonymous interface to board BlackboardInterface GetBlackboardInterface(); *************** *** 95,98 **** --- 96,106 ---- ~Brain(); private: + struct AddTaskCommand + { + std::string taskName; + float priority; + int attributes; + }; + tcPlatformObject* const platform; const float updateInterval; *************** *** 105,108 **** --- 113,117 ---- std::map<std::string, Task*> taskMap; std::queue<std::string> removeList; ///< list of tasks to remove at next update + std::vector<AddTaskCommand> clientTasks; static std::map<std::string, int> taskNameLookup; |