Update of /cvsroot/gcblue/gcb_wx/include/scriptinterface
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15614/include/scriptinterface
Modified Files:
tcPlatformInterface.h tcScenarioInterface.h
Log Message:
Better sensor ageout behavior, more ai work, misc cleanup
Index: tcPlatformInterface.h
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/include/scriptinterface/tcPlatformInterface.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** tcPlatformInterface.h 24 Feb 2005 22:19:14 -0000 1.34
--- tcPlatformInterface.h 2 Mar 2005 22:28:38 -0000 1.35
***************
*** 39,42 ****
--- 39,46 ----
class tcAllianceSensorMap;
}
+ namespace ai
+ {
+ class BlackboardInterface;
+ }
class tcSimState;
class tcSoundConsole;
***************
*** 176,185 ****
tcSubInterface GetSubInterface();
- // script variables
- /// returns user variable n
- UINT32 GetVar(int n) {return mpPlatformObj->mcAI.GetVar(n);}
- /// sets user variable n
- void SetVar(int n, UINT32 val) {mpPlatformObj->mcAI.SetVar(n,val);}
-
// target commands
/// set target for platform
--- 180,183 ----
***************
*** 237,258 ****
// order related commands
- /// true if platform has any orders
- bool HasOrders();
- /// gets order info object for current platform order
- tcOrder GetCurrentOrder();
- /// called to indicate current order is complete and to move to next order
- void CompletedOrder();
/// adds generic order
! void AddOrder(std::string order_text, long data = -1);
! /// adds navigation order
! void AddNavOrder(float afLon_rad, float afLat_rad);
! /// clear all orders
! void ClearOrders();
/// delete task
void DeleteTask(const std::string& taskName);
! /// get total number of orders
! int GetOrderCount();
! /// get order info object for order n
! tcOrder GetOrder(int n);
// sensor map and sensor commands
--- 235,250 ----
// order related commands
/// adds generic order
! void AddTask(const std::string& taskName, double priority);
! /// adds navigation waypoint (creates nav task if necessary)
! void AddNavWaypoint(float afLon_rad, float afLat_rad);
! /// clear all tasks
! void ClearTasks();
/// delete task
void DeleteTask(const std::string& taskName);
! /// gets low-priority, anonymous interface to unit blackboard
! ai::BlackboardInterface GetBlackboardInterface();
! /// @return true if task exists
! bool TaskExists(const std::string& taskName);
// sensor map and sensor commands
***************
*** 303,306 ****
--- 295,305 ----
// miscellaneous
+
+ /// Gets id from unit name, -1 if not found or not own-alliance
+ long LookupFriendlyId(const std::string& unitName);
+ /// Gets name from unit id, "" if not found or not own-alliance
+ std::string LookupFriendlyName(long id);
+ /// Get sim time for last platform update (current time)
+ double GetTime() const;
void GetUserInput(std::string callback, std::string uitype);
bool IsValid() const;
***************
*** 312,317 ****
/// sets text displayed in platform info panel
void SetActionText(std::string text) {mpPlatformObj->mcAI.mzActionText = text;}
- /// sets update interval for AI script revisits
- void SetUpdateInterval(float afInterval) {mpPlatformObj->mcAI.mfUpdateInterval = (afInterval >= 0.25) ? afInterval : 0.25f;}
/// returns a random number between 0 and 1
float GetRand() {return randf();}
--- 311,314 ----
Index: tcScenarioInterface.h
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/include/scriptinterface/tcScenarioInterface.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** tcScenarioInterface.h 16 Feb 2005 23:13:38 -0000 1.14
--- tcScenarioInterface.h 2 Mar 2005 22:28:39 -0000 1.15
***************
*** 56,59 ****
--- 56,61 ----
};
+ class tcPlatformInterface;
+
/**
*
***************
*** 90,93 ****
--- 92,96 ----
void AddToUnitMagazine(const std::string& unitName,
const std::string& item, unsigned int quantity);
+ tcPlatformInterface GetUnitInterface(const std::string& unitName);
void SetUnitLauncherItem(const std::string& unitName,
unsigned int launcherIdx, const std::string& item, unsigned int quantity);
|