[Gcblue-commits] gcb_wx/include/ai tcAIData.h,NONE,1.1 ScriptedTaskInterface.h,1.2,1.3 Task.h,1.4,1.
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2005-06-01 00:14:10
|
Update of /cvsroot/gcblue/gcb_wx/include/ai In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9387/include/ai Modified Files: ScriptedTaskInterface.h Task.h Added Files: tcAIData.h Log Message: namespace housekeeping --- NEW FILE: tcAIData.h --- /* ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _AIDATA_H_ #define _AIDATA_H_ #if _MSC_VER > 1000 #pragma once #endif #include "simmath.h" #include <string> #include <vector> #ifndef NULL_INDEX #define NULL_INDEX -1 #endif namespace ai { class tcOrder { public: std::string mstrOrdername; GeoPoint msDestination; ///< destination for order double mfTime; ///< time for order long data; ///< additional data for order (e.g. target ID) void SetDestinationDeg(float lon_deg, float lat_deg); void SetOrderName(std::string ordername) {mstrOrdername = ordername;} tcOrder(); ~tcOrder(); }; /** * holds data for basic order navigation and AI at the platform (unit) level */ class tcAIData { enum { MAX_WAYPOINTS = 8, N_VAR = 4 }; public: std::vector<tcOrder> maOrder; unsigned mnCurrentOrder; UINT32 mnScriptVar[N_VAR]; ///< variables for use in scripts double mfNextUpdate; ///< time for next update of AI float mfUpdateInterval; ///< interval for AI updates std::string mzActionText; ///< text for script to set to describe current platform action // order methods void AddOrder(const tcOrder& wp); int GetCurrentOrderIdx(void) {return (int)mnCurrentOrder;} int GetOrderCount(void) {return (int)maOrder.size();} void GetOrder(tcOrder& wp, unsigned n); void SetOrder(const tcOrder& wp, unsigned n); void DeleteOrder(unsigned n); void InsertOrderBefore(const tcOrder& wp, unsigned n); void ClearOrders(void); bool HasOrders(void); tcOrder GetCurrentOrder(void); void CompletedOrder(void); void GetNavPoints(std::vector<tcPoint> *mpPoints); // script variable methods UINT32 GetVar(int n); void SetVar(int n, UINT32 val); void Clear(void); void ClearVars(); void GetActionText(std::string& text) {text = mzActionText;} void SetTarget(long anId) {mnTargetID = anId;} long GetTarget(void) {return mnTargetID;} // long to work better with Python void ClearTarget(void) {mnTargetID = NULL_INDEX;} tcAIData(void); virtual ~tcAIData(void); private: long mnTargetID; ///< target for AI engagements }; } #endif Index: ScriptedTaskInterface.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/ai/ScriptedTaskInterface.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ScriptedTaskInterface.h 24 Feb 2005 22:19:13 -0000 1.2 --- ScriptedTaskInterface.h 1 Jun 2005 00:13:25 -0000 1.3 *************** *** 33,37 **** #include <vector> ! namespace ScriptInterface { class tcPlatformInterface; --- 33,37 ---- #include <vector> ! namespace scriptinterface { class tcPlatformInterface; Index: Task.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/ai/Task.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Task.h 24 Feb 2005 22:19:13 -0000 1.4 --- Task.h 1 Jun 2005 00:13:25 -0000 1.5 *************** *** 33,42 **** #include <vector> ! namespace ScriptInterface { class tcPlatformInterface; } ! using ScriptInterface::tcPlatformInterface; class tcPlatformObject; --- 33,42 ---- #include <vector> ! namespace scriptinterface { class tcPlatformInterface; } ! using scriptinterface::tcPlatformInterface; class tcPlatformObject; |