[Gcblue-commits] gcb_wx/include/ai Brain.h, 1.10, 1.11 Nav.h, 1.6, 1.7 ScriptedTask.h, 1.2, 1.3 Sel
Status: Alpha
Brought to you by:
ddcforge
From: Dewitt C. <ddc...@us...> - 2006-08-27 21:28:58
|
Update of /cvsroot/gcblue/gcb_wx/include/ai In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv21970/include/ai Modified Files: Brain.h Nav.h ScriptedTask.h SelfPreservation.h Task.h Log Message: Added attributes (hidden and permanent) to AI tasks so that automation tasks can be hidden and not distract player Index: SelfPreservation.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/ai/SelfPreservation.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SelfPreservation.h 8 Mar 2006 01:10:22 -0000 1.2 --- SelfPreservation.h 27 Aug 2006 21:28:53 -0000 1.3 *************** *** 52,56 **** SelfPreservation(tcPlatformObject* platform_, Blackboard* bb, ! long id_, double priority_, const std::string& taskName_); ~SelfPreservation(); --- 52,56 ---- SelfPreservation(tcPlatformObject* platform_, Blackboard* bb, ! long id_, double priority_, int attributes_, const std::string& taskName_); ~SelfPreservation(); Index: Brain.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/ai/Brain.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Brain.h 8 Mar 2006 01:10:22 -0000 1.10 --- Brain.h 27 Aug 2006 21:28:53 -0000 1.11 *************** *** 66,70 **** NAV_TASK = 1 }; ! void AddTask(const std::string& taskName, double priority_); /// gets a low priority, anonymous interface to board BlackboardInterface GetBlackboardInterface(); --- 66,72 ---- NAV_TASK = 1 }; ! ! ! void AddTask(const std::string& taskName, double priority_, int attributes_ = 0); /// gets a low priority, anonymous interface to board BlackboardInterface GetBlackboardInterface(); *************** *** 100,104 **** bool updating; ///< true if in the middle of Update bool hasNewCommand; ///< for multiplayer, true if task or bb state has been changed - Blackboard board; ///< for inter-task communication std::map<std::string, Task*> taskMap; --- 102,105 ---- Index: Nav.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/ai/Nav.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Nav.h 8 Mar 2006 01:10:22 -0000 1.6 --- Nav.h 27 Aug 2006 21:28:53 -0000 1.7 *************** *** 66,70 **** Nav(tcPlatformObject* platform_, Blackboard* bb, ! long id_, double priority_, const std::string& taskName_); ~Nav(); --- 66,70 ---- Nav(tcPlatformObject* platform_, Blackboard* bb, ! long id_, double priority_, int attributes_, const std::string& taskName_); ~Nav(); Index: ScriptedTask.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/ai/ScriptedTask.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ScriptedTask.h 8 Mar 2006 01:10:22 -0000 1.2 --- ScriptedTask.h 27 Aug 2006 21:28:53 -0000 1.3 *************** *** 55,59 **** ScriptedTask(tcPlatformObject* platform_, Blackboard* bb, ! long id_, double priority_, const std::string& scriptName_); ~ScriptedTask(); --- 55,59 ---- ScriptedTask(tcPlatformObject* platform_, Blackboard* bb, ! long id_, double priority_, int attributes_, const std::string& scriptName_); ~ScriptedTask(); Index: Task.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/ai/Task.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Task.h 8 Mar 2006 01:10:22 -0000 1.6 --- Task.h 27 Aug 2006 21:28:54 -0000 1.7 *************** *** 53,56 **** --- 53,65 ---- { public: + /** task type bit field */ + enum + { + DEFAULT_ATTRIBUTES = 0, + HIDDEN = 1, ///< task not displayed on user task list + PERMANENT = 2 ///< task not removed when user clears tasks + }; + + tcPlatformInterface GetPlatformInterface(); *************** *** 60,63 **** --- 69,77 ---- bool IsReadyForUpdate(double t) const; + int GetAttributes() const; + void SetAttributes(int attributes_); + bool IsHidden() const; + bool IsPermanent() const; + void SetUpdateInterval(float interval); virtual void Update(double t); *************** *** 65,69 **** Task(tcPlatformObject* platform_, Blackboard* bb, ! long id_, double priority_, const std::string& taskName_); virtual ~Task(); --- 79,83 ---- Task(tcPlatformObject* platform_, Blackboard* bb, ! long id_, double priority_, int attributes_, const std::string& taskName_); virtual ~Task(); *************** *** 72,76 **** const std::string taskName; ! private: double lastUpdateTime; --- 86,91 ---- const std::string taskName; ! int attributes; ///< bitfield of task attributes ! private: double lastUpdateTime; |