gcblue-commits Mailing List for Global Conflict Blue (Page 24)
Status: Alpha
Brought to you by:
ddcforge
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(112) |
Feb
(106) |
Mar
(88) |
Apr
(111) |
May
(53) |
Jun
(60) |
Jul
(58) |
Aug
(61) |
Sep
(45) |
Oct
(31) |
Nov
(71) |
Dec
(70) |
| 2005 |
Jan
(33) |
Feb
(57) |
Mar
(98) |
Apr
(47) |
May
(53) |
Jun
(79) |
Jul
(79) |
Aug
|
Sep
(33) |
Oct
(1) |
Nov
(20) |
Dec
(64) |
| 2006 |
Jan
(20) |
Feb
(1) |
Mar
(43) |
Apr
(11) |
May
(8) |
Jun
(23) |
Jul
|
Aug
(28) |
Sep
(58) |
Oct
(25) |
Nov
(47) |
Dec
(70) |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:05:16
|
Update of /cvsroot/gcblue/gcb_wx/images/icons/torp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7400/images/icons/torp Added Files: torp_unk.jpg Log Message: Initial commit for drag and drop icon gui --- NEW FILE: torp_unk.jpg --- (This appears to be a binary file; contents omitted.) |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:05:13
|
Update of /cvsroot/gcblue/gcb_wx/images/icons/air In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7400/images/icons/air Added Files: jet_unk.jpg Log Message: Initial commit for drag and drop icon gui --- NEW FILE: jet_unk.jpg --- (This appears to be a binary file; contents omitted.) |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:04:09
|
Update of /cvsroot/gcblue/gcb_wx/images/icons In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6834/images/icons Added Files: unknown.jpg Log Message: Initial commit for drag and drop icon gui --- NEW FILE: unknown.jpg --- (This appears to be a binary file; contents omitted.) |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:03:54
|
Update of /cvsroot/gcblue/gcb_wx/images/icons/torp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6758/torp Log Message: Directory /cvsroot/gcblue/gcb_wx/images/icons/torp added to the repository |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:03:46
|
Update of /cvsroot/gcblue/gcb_wx/images/icons/mis In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6705/mis Log Message: Directory /cvsroot/gcblue/gcb_wx/images/icons/mis added to the repository |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:03:42
|
Update of /cvsroot/gcblue/gcb_wx/images/icons/air In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6689/air Log Message: Directory /cvsroot/gcblue/gcb_wx/images/icons/air added to the repository |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:03:21
|
Update of /cvsroot/gcblue/gcb_wx/images/icons In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6565/icons Log Message: Directory /cvsroot/gcblue/gcb_wx/images/icons added to the repository |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:02:23
|
Update of /cvsroot/gcblue/gcb_wx/include/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5785/include/database Modified Files: tcDatabaseObject.h Log Message: Initial commit for drag and drop icon gui Index: tcDatabaseObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcDatabaseObject.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** tcDatabaseObject.h 1 Jun 2005 00:13:26 -0000 1.22 --- tcDatabaseObject.h 11 Jun 2005 21:01:42 -0000 1.23 *************** *** 29,33 **** #include "wx/wx.h" - #include "tcString.h" #include "tcFile.h" --- 29,32 ---- *************** *** 138,142 **** UINT mnType; ///< functional classification type: helo, air, surf, sub, land UINT mnModelType; ///< model class to use, e.g. tcSurfaceObject, tcAirObject ! tcDBString mzImageFileName; tcDBString mz3DModelFileName; char mzDescription[DESCRIPTION_STRING_LENGTH]; --- 137,141 ---- UINT mnType; ///< functional classification type: helo, air, surf, sub, land UINT mnModelType; ///< model class to use, e.g. tcSurfaceObject, tcAirObject ! tcDBString mzImageFileName; ///< used for icon file name tcDBString mz3DModelFileName; char mzDescription[DESCRIPTION_STRING_LENGTH]; *************** *** 146,151 **** --- 145,152 ---- virtual tc3DModel* Copy3DModel(); ///< creates copy of model (must be deleted) virtual tc3DModel* Get3DModel(); ///< gets pointer to database model + osg::Geometry* GetIcon(); bool IsLeaf() const; ///< returns true if db obj is a leaf obj void Load3DModel(); + void LoadIcon(); void RandInit(void); virtual void PrintToFile(tcFile& file); *************** *** 169,173 **** tc3DModel *model; osg::ref_ptr<osg::Geometry> icon; ///< icon for drag/drop container gui - }; --- 170,173 ---- |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:02:23
|
Update of /cvsroot/gcblue/gcb_wx/include/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5785/include/common Modified Files: randfn.h simmath.h Log Message: Initial commit for drag and drop icon gui Index: randfn.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/randfn.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** randfn.h 27 Sep 2003 23:22:24 -0000 1.1 --- randfn.h 11 Jun 2005 21:01:42 -0000 1.2 *************** *** 3,9 **** - #include <math.h> ! //#include "math_constants.h" inline float randf(void) {return (float)(rand() % RAND_MAX)/(float)RAND_MAX;} --- 3,9 ---- #include <math.h> ! #include <stdlib.h> ! inline float randf(void) {return (float)(rand() % RAND_MAX)/(float)RAND_MAX;} Index: simmath.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/simmath.h,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** simmath.h 10 Mar 2005 03:28:26 -0000 1.29 --- simmath.h 11 Jun 2005 21:01:42 -0000 1.30 *************** *** 32,35 **** --- 32,36 ---- #include <math.h> #include "math_constants.h" + #include "randfn.h" #include <string> #include "tcFile.h" *************** *** 218,224 **** int GeoWithinRegion(GeoPoint p, tcRect *pRegion); - inline float randf(void) {return (float)(rand() % RAND_MAX)/(float)RAND_MAX;} - inline float randf(float afRange) {return afRange*randf();} - inline float randfc(float afRange) {return afRange*(randf()-0.5f);} inline float& degtoplusminus180(float& afDeg) { --- 219,222 ---- |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:02:22
|
Update of /cvsroot/gcblue/gcb_wx/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5785/database Modified Files: database.db Log Message: Initial commit for drag and drop icon gui Index: database.db =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/database/database.db,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 Binary files /tmp/cvsewINOi and /tmp/cvsPL2bic differ |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:02:22
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5785/include/graphics Modified Files: tc3DWindow.h Added Files: tcContainerGui.h tcContainerItem.h tcDragStatus.h tcDraggedIconDisplay.h tcFlightportGui.h tcLauncherContainerItem.h tcPlatformGui.h tcStoresContainerItem.h tcStoresGui.h Log Message: Initial commit for drag and drop icon gui --- NEW FILE: tcStoresContainerItem.h --- /** ** @file tcStoresContainerItem.h */ /* Copyright (C) 2005 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 _TCSTORESCONTAINERITEM_H_ #define _TCSTORESCONTAINERITEM_H_ #if _MSC_VER > 1000 #pragma once #endif #include "tcContainerItem.h" #include <string> class tcStores; /** * Item for stores gui */ class tcStoresContainerItem : public tcContainerItem { public: tcStores* GetStores() const; void SetStores(tcStores* stores); tcStoresContainerItem(); virtual ~tcStoresContainerItem(); private: tcStores* parent; ///< stores object that holds this item }; #endif --- NEW FILE: tcPlatformGui.h --- /** ** @file tcPlatformGui.h */ /* Copyright (C) 2005 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 _TCPLATFORMGUI_H_ #define _TCPLATFORMGUI_H_ #if _MSC_VER > 1000 #pragma once #endif #include "tcContainerGui.h" #include <osg/ref_ptr> namespace osg { class Geometry; } namespace database { class tcDatabaseObject; }; using database::tcDatabaseObject; class tcPlatformObject; class tcFlightOpsObject; class tcLauncher; /** * GUI class for platform operations * Functions: * Open magazine and flightport guis * Support drag between launchers and magazines (load/unload launchers) */ class tcPlatformGui : public tcContainerGui { public: virtual void Draw(); //virtual void OnChar(wxKeyEvent& event); //virtual void OnEnterWindow(wxMouseEvent& event); //virtual void OnLButtonDown(wxMouseEvent& event); //virtual void OnLButtonUp(wxMouseEvent& event); //virtual void OnLeaveWindow(wxMouseEvent& event); //virtual void OnMouseMove(wxMouseEvent& event); virtual void OnRButtonDown(wxMouseEvent& event); tcPlatformGui(tcPlatformObject* obj, const wxPoint& pos, const wxString& configFile); virtual ~tcPlatformGui(); private: tcPlatformObject* platform; tcFlightOpsObject* flightOps; osg::ref_ptr<osg::Geometry> magazineIcon; osg::ref_ptr<osg::Geometry> flightPortIcon; size_t nLaunchers; ///< number of launchers (first idx = 0) size_t magazineIdx; ///< slot index of first magazine slot size_t nMagazines; ///< number of magazines size_t flightPortIdx; ///< slot index of first flightport size_t nFlightPorts; ///< number of flightports (normally 0 or 1) float slotSize; ///< dimension of (square) slot wxRealPoint launcherLoc; ///< upper-left of first launcher wxRealPoint launcherOffset; ///< (x, y) offset between launchers wxRealPoint magazineLoc; ///< upper-left of first magazine wxRealPoint magazineOffset; ///< (x, y) offset between magazines wxRealPoint flightPortLoc; ///< upper-left of flightport void AddOrUpdateLauncherItem(tcContainerSlot& slot, tcDatabaseObject* child, tcLauncher* launcher, unsigned int launcherIdx, unsigned int quantity); void HandleDrop(size_t slotIdx, tcContainerItem* item); void InitializeGui(); void OpenFlightPortGui(tcContainerItem* item); void OpenMagazineGui(unsigned int idx, tcContainerItem* item); void ReadGuiParameters(); void UpdateGui(); }; #endif --- NEW FILE: tcLauncherContainerItem.h --- /** ** @file tcStoresContainerItem.h */ /* Copyright (C) 2005 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 _TCLAUNCHERCONTAINERITEM_H_ #define _TCLAUNCHERCONTAINERITEM_H_ #if _MSC_VER > 1000 #pragma once #endif #include "tcContainerItem.h" #include <string> class tcLauncher; /** * Item for launcher on platform gui or dragged to stores (magazine) gui */ class tcLauncherContainerItem : public tcContainerItem { public: tcLauncher* GetLauncher() const; unsigned int GetLauncherIndex() const; void SetLauncher(tcLauncher* launcher, unsigned int idx); tcLauncherContainerItem(); virtual ~tcLauncherContainerItem(); private: tcLauncher* parent; ///< launcher object that holds this item unsigned int launcherIdx; ///< index of launcher on parent platform }; #endif --- NEW FILE: tcContainerGui.h --- /** ** @file tcContainerGui.h */ /* Copyright (C) 2005 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 _TCCONTAINERGUI_H_ #define _TCCONTAINERGUI_H_ #if _MSC_VER > 1000 #pragma once #endif #include "tcXmlWindow.h" #include "tcContainerItem.h" class tcContainerSlot { public: tcRect loc; ///< location of slot within gui window tcContainerItem* item; ///< 0 if slot is empty bool updated; bool isMouseOver; ///< true if mouse is over slot void ClearItem(); osg::Geometry* GetIcon(); tcContainerItem* GetItem() const; bool IsEmpty() const; bool IsMouseOver() const; bool IsUpdated() const; void SetItem(tcContainerItem* item_); void SetMouseOver(bool state); void SetUpdated(bool state); tcContainerSlot(); tcContainerSlot(const tcContainerSlot& src); ~tcContainerSlot(); }; /** * GUI class to drag and drop and do simple operations on iconified objects */ class tcContainerGui : public tcXmlWindow { public: void AddSlot(tcRect& loc); void ClearSlots(); size_t GetNumSlots() const; virtual void DestroyGui(); virtual void Draw(); //virtual void OnChar(wxKeyEvent& event); virtual void OnCloseCommand(wxCommandEvent& event); //virtual void OnEnterWindow(wxMouseEvent& event); virtual void OnLButtonDown(wxMouseEvent& event); virtual void OnLButtonUp(wxMouseEvent& event); virtual void OnLeaveWindow(wxMouseEvent& event); virtual void OnMouseMove(wxMouseEvent& event); //virtual void OnRButtonDown(wxMouseEvent& event); virtual tcContainerItem* GetItem(long id); tcContainerItem* GetParentItem() const; void SetParentItem(tcContainerItem* item); static void SetParent(tc3DWindow* win); tcContainerGui(const wxPoint& pos, const wxString& configFile, const wxString& name = "ContainerGui"); virtual ~tcContainerGui(); protected: std::vector<tcContainerSlot> slots; unsigned int drawCount; bool dragIsArmed; ///< true to start drag when mouse is moved size_t dragSlotIdx; ///< slot idx to drag if armed bool FinishDestroy(); virtual void HandleDrop(size_t slotIdx, tcContainerItem* item); private: bool destroy; ///< workaround to delay destruction of window to safe time tcContainerItem* parentItem; ///< item that was clicked to popup this gui (if applicable) static tc3DWindow* parent; DECLARE_EVENT_TABLE() }; #endif --- NEW FILE: tcStoresGui.h --- /** ** @file tcStoresGui.h */ /* Copyright (C) 2005 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 _TCSTORESGUI_H_ #define _TCSTORESGUI_H_ #if _MSC_VER > 1000 #pragma once #endif #include "tcContainerGui.h" #include "tcStoresContainerItem.h" class tcStores; /** * GUI class for stores operations */ class tcStoresGui : public tcContainerGui { public: virtual void Draw(); //virtual void OnChar(wxKeyEvent& event); //virtual void OnEnterWindow(wxMouseEvent& event); //virtual void OnLButtonDown(wxMouseEvent& event); //virtual void OnLButtonUp(wxMouseEvent& event); //virtual void OnLeaveWindow(wxMouseEvent& event); //virtual void OnMouseMove(wxMouseEvent& event); virtual void OnRButtonDown(wxMouseEvent& event); tcStoresGui(tcStores* obj, const wxPoint& pos, const wxString& configFile); virtual ~tcStoresGui(); private: tcStores* stores; float slotSize; ///< dimension of (square) slot wxRealPoint upperLeft; ///< upper-left of first slot float horizontalSpacing; float verticalSpacing; unsigned int rowSize; void AddOrUpdateItem(tcContainerSlot& slot, const std::string& itemName, unsigned int quantity); void HandleDrop(size_t slotIdx, tcContainerItem* item); void InitializeGui(); void ReadGuiParameters(); void UpdateGui(); }; #endif --- NEW FILE: tcContainerItem.h --- /** ** @file tcContainerItem.h */ /* Copyright (C) 2005 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 _TCCONTAINERITEM_H_ #define _TCCONTAINERITEM_H_ #if _MSC_VER > 1000 #pragma once #endif #include <osg/ref_ptr> #include <string> namespace osg { class Geometry; } class tcContainerGui; /** * Item for container gui */ class tcContainerItem { public: enum { NORMAL = 0, BLINK = 1, DRAGGING = 2 ///< item is being dragged by user }; osg::ref_ptr<osg::Geometry> icon; int drawState; int GetDrawState() const; tcContainerGui* GetGui() const; osg::Geometry* GetIcon(); long GetId() const; const std::string& GetItemName() const; unsigned int GetQuantity() const; bool IdMatches(long val) const; bool ItemGuiIsActive() const; void SetDrawState(int state); void SetGui(tcContainerGui* gui_); void SetIcon(osg::Geometry* icon_); void SetId(long val); void SetItemName(const std::string& s); void SetQuantity(unsigned int n); tcContainerItem(); virtual ~tcContainerItem(); protected: long id; ///< identifier for item std::string itemName; unsigned int quantity; ///< quantity associated with this item tcContainerGui* gui; ///< for items that pop up an associated gui to allow gui to be closed or moved }; #endif Index: tc3DWindow.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DWindow.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** tc3DWindow.h 1 Jun 2005 00:13:26 -0000 1.15 --- tc3DWindow.h 11 Jun 2005 21:01:43 -0000 1.16 *************** *** 87,91 **** --- 87,93 ---- osg::Geometry* CreatePieGeometry(float width, float height, float startAngle, float stopAngle, osg::Vec4& color, int fillMode); + static osg::Geometry* CreateTexturedSymbol(const char* imageName, float width); + virtual void Draw(); virtual void DrawChildren(); // virtual void DrawChildren(Gdiplus::Graphics *graphics); --- NEW FILE: tcFlightportGui.h --- /** ** @file tcFlightPortGui.h */ /* Copyright (C) 2005 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 _TCFLIGHTPORTGUI_H_ #define _TCFLIGHTPORTGUI_H_ #if _MSC_VER > 1000 #pragma once #endif #include "tcContainerGui.h" class tcGameObject; /** * Item for container gui */ class tcEntityContainerItem : public tcContainerItem { public: const std::string& GetDescription() const; tcGameObject* GetEntity() const; void SetDescription(const std::string& s); void SetDescription(const char* s); void SetEntity(tcGameObject* obj); tcEntityContainerItem(); virtual ~tcEntityContainerItem(); private: std::string description; tcGameObject* entity; }; class tcAirState; class tcFlightPort; /** * GUI class for flightport operations */ class tcFlightPortGui : public tcContainerGui { public: virtual void Draw(); //virtual void OnChar(wxKeyEvent& event); //virtual void OnEnterWindow(wxMouseEvent& event); //virtual void OnLButtonDown(wxMouseEvent& event); //virtual void OnLButtonUp(wxMouseEvent& event); //virtual void OnLeaveWindow(wxMouseEvent& event); //virtual void OnMouseMove(wxMouseEvent& event); virtual void OnRButtonDown(wxMouseEvent& event); tcFlightPortGui(tcFlightPort* obj, const wxPoint& pos, const wxString& configFile); virtual ~tcFlightPortGui(); protected: virtual void HandleDrop(size_t slotIdx, tcContainerItem* item); private: tcFlightPort* flightPort; size_t launchOffset; ///< slot index of first launch spot (normally 0) size_t readyOffset; ///< slot index of first ready spot size_t hangarOffset; ///< slot index of first hangar spot float slotSize; ///< dimension of (square) slot wxRealPoint launchLoc; ///< upper-left of first launch spot float launchHorizontalSpacing; wxRealPoint readyLoc; float readyHorizontalSpacing; wxRealPoint hangarLoc; float hangarHorizontalSpacing; float hangarVerticalSpacing; ///< spacing between rows unsigned int hangarRowSize; ///< number of hangar spots across void AddOrUpdateItem(tcContainerSlot& slot, tcAirState* airState); void CloseAllPlatformGuis(); void InitializeGui(); void OpenPlatformGui(tcContainerItem* item); void ReadGuiParameters(); void UpdateGui(); }; #endif --- NEW FILE: tcDraggedIconDisplay.h --- /** ** @file tcDraggedIconDisplay.h */ /* Copyright (C) 2005 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 _DRAGGEDICONDISPLAY_H_ #define _DRAGGEDICONDISPLAY_H_ #if _MSC_VER > 1000 #pragma once #endif #include "wx/wx.h" #include "tc3DWindow.h" #include <osg/ref_ptr> namespace osg { class Geometry; } /** * Window class to draw icon behind mouse pointer * Parent should be the main game frame so that upper left corner of * this window is (0, 0) in screen coordinates. */ class tcDraggedIconDisplay : public tc3DWindow { public: void Draw(); osg::Geometry* GetIcon(); void SetIcon(osg::Geometry* icon_); tcDraggedIconDisplay(wxWindow *parent); virtual ~tcDraggedIconDisplay(); private: osg::ref_ptr<osg::Geometry> icon; ///< icon to draw }; #endif --- NEW FILE: tcDragStatus.h --- /** ** @file tcDragStatus.h */ /* Copyright (C) 2005 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 _DRAGSTATUS_H_ #define _DRAGSTATUS_H_ #if _MSC_VER > 1000 #pragma once #endif #include <wx/wx.h> #include <osg/ref_ptr> class tcContainerGui; class tcContainerItem; namespace osg { class Geometry; } /** * Singleton class to support drag and drop of icons across multiple windows. * Acts as a global object for windows to interact with to get * mouse pointer status. */ class tcDragStatus { public: tcContainerItem* GetDraggedItem() const; osg::Geometry* GetIcon(); unsigned int GetQuantity() const; bool IsDragging() const; ///< true if drag is in progress bool IsDraggingItem(tcContainerItem* item) const; void SetIcon(osg::Geometry* icon_); void SetQuantity(unsigned int n); void StartDrag(tcContainerGui* gui, tcContainerItem* item); void StopDrag(); static tcDragStatus* Get(); private: tcContainerGui* itemGui; long itemId; ///< 0 for none unsigned int quantity; ///< if > 0, then draw quantity label while dragging osg::ref_ptr<osg::Geometry> icon; tcDragStatus(); ~tcDragStatus(); }; #endif |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:02:22
|
Update of /cvsroot/gcblue/gcb_wx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5785 Modified Files: GCblue.vcproj Log Message: Initial commit for drag and drop icon gui Index: GCblue.vcproj =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/GCblue.vcproj,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** GCblue.vcproj 1 Jun 2005 00:13:23 -0000 1.93 --- GCblue.vcproj 11 Jun 2005 21:01:41 -0000 1.94 *************** *** 261,264 **** --- 261,267 ---- </File> <File + RelativePath=".\src\graphics\tcContainerItem.cpp"> + </File> + <File RelativePath=".\src\graphics\tcControl.cpp"> </File> *************** *** 273,276 **** --- 276,285 ---- </File> <File + RelativePath=".\src\graphics\tcDraggedIconDisplay.cpp"> + </File> + <File + RelativePath=".\src\graphics\tcDragStatus.cpp"> + </File> + <File RelativePath="src\graphics\tcEditBox.cpp"> </File> *************** *** 279,282 **** --- 288,294 ---- </File> <File + RelativePath=".\src\graphics\tcFlightPortGui.cpp"> + </File> + <File RelativePath=".\src\graphics\tcGameView.cpp"> </File> *************** *** 300,303 **** --- 312,318 ---- </File> <File + RelativePath=".\src\graphics\tcLauncherContainerItem.cpp"> + </File> + <File RelativePath=".\src\graphics\tcLauncherPopup.cpp"> </File> *************** *** 336,339 **** --- 351,357 ---- </File> <File + RelativePath=".\src\graphics\tcPlatformGui.cpp"> + </File> + <File RelativePath=".\src\graphics\tcPopupControl.cpp"> </File> *************** *** 354,357 **** --- 372,381 ---- </File> <File + RelativePath=".\src\graphics\tcStoresContainerItem.cpp"> + </File> + <File + RelativePath=".\src\graphics\tcStoresGui.cpp"> + </File> + <File RelativePath="src\graphics\tcTerrainTextureFactory.cpp"> </File> *************** *** 1149,1152 **** --- 1173,1179 ---- </File> <File + RelativePath=".\include\common\randfn.h"> + </File> + <File RelativePath="include\common\Resource.h"> </File> *************** *** 1243,1246 **** --- 1270,1276 ---- </File> <File + RelativePath=".\include\graphics\tcContainerItem.h"> + </File> + <File RelativePath=".\include\graphics\tcControl.h"> </File> *************** *** 1255,1258 **** --- 1285,1294 ---- </File> <File + RelativePath=".\include\graphics\tcDraggedIconDisplay.h"> + </File> + <File + RelativePath=".\include\graphics\tcDragStatus.h"> + </File> + <File RelativePath="include\graphics\tcEditBox.h"> </File> *************** *** 1261,1264 **** --- 1297,1303 ---- </File> <File + RelativePath=".\include\graphics\tcFlightportGui.h"> + </File> + <File RelativePath=".\include\graphics\tcGameView.h"> </File> *************** *** 1270,1273 **** --- 1309,1315 ---- </File> <File + RelativePath=".\include\graphics\tcLauncherContainerItem.h"> + </File> + <File RelativePath=".\include\graphics\tcLauncherPopup.h"> </File> *************** *** 1309,1312 **** --- 1351,1357 ---- </File> <File + RelativePath=".\include\graphics\tcPlatformGui.h"> + </File> + <File RelativePath=".\include\graphics\tcPopupControl.h"> </File> *************** *** 1327,1330 **** --- 1372,1381 ---- </File> <File + RelativePath=".\include\graphics\tcStoresContainerItem.h"> + </File> + <File + RelativePath=".\include\graphics\tcStoresGui.h"> + </File> + <File RelativePath="include\graphics\tcTerrainTextureFactory.h"> </File> |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:02:10
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5785/src/sim Modified Files: Game.cpp tcAirfieldObject.cpp tcFlightPort.cpp tcLauncher.cpp tcStores.cpp tcSurfaceObject.cpp Log Message: Initial commit for drag and drop icon gui Index: tcFlightPort.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcFlightPort.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** tcFlightPort.cpp 1 Jun 2005 00:13:32 -0000 1.19 --- tcFlightPort.cpp 11 Jun 2005 21:01:45 -0000 1.20 *************** *** 256,262 **** --- 256,264 ---- short int id; unsigned char op; + unsigned char pos; stream >> id; stream >> op; + stream >> pos; if (op == 0) // launch command *************** *** 268,272 **** bool found = false; size_t obj_count = units.size(); ! for(size_t n=0; (n<obj_count)&&(!found); n++) { tcAirState *airstate = units[n]; --- 270,274 ---- bool found = false; size_t obj_count = units.size(); ! for (size_t n=0; (n<obj_count)&&(!found); n++) { tcAirState *airstate = units[n]; *************** *** 274,278 **** { found = true; ! SetObjectDestination(n, (teLocation)op); } } --- 276,280 ---- { found = true; ! SetObjectDestination(n, (teLocation)op, pos); } } *************** *** 295,298 **** --- 297,301 ---- stream << commandList[n].id; stream << commandList[n].op; + stream << commandList[n].pos; } *************** *** 364,368 **** airstate->current_spot = emptySpotIdx; airstate->goal_location = loc; ! airstate->goal_spot = -1; units.push_back(airstate); // add to fport units vector --- 367,371 ---- airstate->current_spot = emptySpotIdx; airstate->goal_location = loc; ! airstate->goal_spot = airstate->current_spot; units.push_back(airstate); // add to fport units vector *************** *** 470,474 **** last_update_time = 0; } ! //---------------------------------------------------------------------------- /** * Search units vector and return matching index. Return -1 if not found. --- 473,477 ---- last_update_time = 0; } ! /** * Search units vector and return matching index. Return -1 if not found. *************** *** 484,488 **** return -1; // not found } ! //---------------------------------------------------------------------------- /** * Searches loc for empty spot returns spot index if found, --- 487,491 ---- return -1; // not found } ! /** * Searches loc for empty spot returns spot index if found, *************** *** 499,503 **** return -1; } ! //---------------------------------------------------------------------------- /** * Searches for empty spot at loc and returns spot index if found, --- 502,506 ---- return -1; } ! /** * Searches for empty spot at loc and returns spot index if found, *************** *** 512,521 **** return FindEmptySpot(loc_vector); } ! //---------------------------------------------------------------------------- tcAirState* tcFlightPort::GetAirState(unsigned n) { return units[n]; } ! //---------------------------------------------------------------------------- int tcFlightPort::GetAirStateIdx(long id) { --- 515,541 ---- return FindEmptySpot(loc_vector); } ! ! /** ! * Search (linear) units vector for obj ! * @return index with matching obj or -1 if not found. ! */ ! int tcFlightPort::FindAirState(tcGameObject* obj) ! { ! wxASSERT(obj); ! ! size_t nUnits = units.size(); ! for(size_t n=0; n<nUnits; n++) ! { ! tcAirState* airstate_n = units[n]; ! if (airstate_n->obj == obj) return (int)n; ! } ! return -1; // not found ! } ! tcAirState* tcFlightPort::GetAirState(unsigned n) { return units[n]; } ! int tcFlightPort::GetAirStateIdx(long id) { *************** *** 529,532 **** --- 549,557 ---- } + tcFlightportDBObject* tcFlightPort::GetDatabaseObject() const + { + return mpDBObject; + } + /** * @returns game object for unit with index n *************** *** 538,542 **** return units[n]->obj; } ! //---------------------------------------------------------------------------- int tcFlightPort::Launch(int runway) { --- 563,567 ---- return units[n]->obj; } ! int tcFlightPort::Launch(int runway) { *************** *** 564,568 **** return 1; } ! //---------------------------------------------------------------------------- /// Find runway that object with id is on int tcFlightPort::LaunchID(long id) --- 589,593 ---- return 1; } ! /// Find runway that object with id is on int tcFlightPort::LaunchID(long id) *************** *** 590,594 **** return 0; // not found on runway } ! //---------------------------------------------------------------------------- /** * Move object to new location if valid. Remove object from old location. --- 615,619 ---- return 0; // not found on runway } ! /** * Move object to new location if valid. Remove object from old location. *************** *** 638,642 **** return true; } ! //---------------------------------------------------------------------------- /** * @return pointer to tsSpotInfo for current location and spot. --- 663,667 ---- return true; } ! /** * @return pointer to tsSpotInfo for current location and spot. *************** *** 688,692 **** } - //---------------------------------------------------------------------------- /** * @return location vector corresponding to loc, or NULL if loc = HANGAR, TRANSIT, or NOWHERE. --- 713,716 ---- *************** *** 761,764 **** --- 785,809 ---- /** + * Use to check status of specific spot, e.g. runway 1 + * @return true if spot is empty, hangar spot is empty if hangar is not full + */ + bool tcFlightPort::IsSpotEmpty(teLocation loc, unsigned int spot) + { + if (loc == HANGAR) return (inHangarCount < hangarCapacity); + + std::vector<tsSpotInfo>* loc_vector = GetLocVector(loc); + + if ((loc == TRANSIT)||(loc == NOWHERE)) + { + wxASSERT(false); + return false; // error + } + + if (spot >= loc_vector->size()) return false; + + return ((*loc_vector)[spot].obj_info == 0); + } + + /** * Workaround for multiplayer client. * This clears spot info and reassigns units to spots based on the info in airstate *************** *** 797,806 **** } ! //---------------------------------------------------------------------------- ! void tcFlightPort::SetObjectDestination(unsigned n, teLocation loc) { if (n >= (unsigned)units.size()) return; // error, out of range tcAirState* airstate = units.at(n); airstate->goal_location = loc; if (parent->IsClientMode()) --- 842,854 ---- } ! /** ! * ! */ ! void tcFlightPort::SetObjectDestination(unsigned n, teLocation loc, unsigned int position) { if (n >= (unsigned)units.size()) return; // error, out of range tcAirState* airstate = units.at(n); airstate->goal_location = loc; + airstate->goal_spot = position; if (parent->IsClientMode()) *************** *** 809,812 **** --- 857,861 ---- cmd.id = (short int)airstate->obj->mnID; cmd.op = loc; + cmd.pos = position; commandList.push_back(cmd); return; *************** *** 921,928 **** if ((!inTransit)&&(airstate->current_location != airstate->goal_location)) { ! std::vector<tsSpotInfo> *loc_vector = NULL; ! int spot_idx = FindEmptySpot(airstate->goal_location, loc_vector); ! airstate->goal_spot = spot_idx; ! airstate->ready_time = afStatusTime + 30.0f; // short times for test MoveObjectToGoal(airstate); } --- 970,980 ---- if ((!inTransit)&&(airstate->current_location != airstate->goal_location)) { ! if (!IsSpotEmpty(airstate->goal_location, airstate->goal_spot)) ! { ! std::vector<tsSpotInfo> *loc_vector = 0; ! int spot_idx = FindEmptySpot(airstate->goal_location, loc_vector); ! airstate->goal_spot = spot_idx; ! } ! airstate->ready_time = afStatusTime + 30.0f; // short times for test MoveObjectToGoal(airstate); } Index: tcSurfaceObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSurfaceObject.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** tcSurfaceObject.cpp 29 Apr 2005 18:52:56 -0000 1.18 --- tcSurfaceObject.cpp 11 Jun 2005 21:01:45 -0000 1.19 *************** *** 111,114 **** --- 111,116 ---- UpdateAI(afStatusTime); + UpdateMagazines(afStatusTime); + mfStatusTime = afStatusTime; } Index: tcLauncher.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcLauncher.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** tcLauncher.cpp 1 Jun 2005 00:13:32 -0000 1.21 --- tcLauncher.cpp 11 Jun 2005 21:01:45 -0000 1.22 *************** *** 201,207 **** * @return class name of child, or "Empty" if none */ ! std::string tcLauncher::GetChildClassName() const { ! std::string s; if ((mpChildDBObj) && (isLoading || mnCurrent)) { --- 201,207 ---- * @return class name of child, or "Empty" if none */ ! const std::string& tcLauncher::GetChildClassName() const { ! static std::string s; if ((mpChildDBObj) && (isLoading || mnCurrent)) { *************** *** 215,218 **** --- 215,223 ---- } + tcDatabaseObject* tcLauncher::GetChildDatabaseObject() const + { + return mpChildDBObj; + } + /** * This can be a substitute for IsItemCompatible by testing != 0 *************** *** 289,293 **** } ! /** --- 294,301 ---- } ! tcGameObject* tcLauncher::GetParent() const ! { ! return parent; ! } /** *************** *** 372,375 **** --- 380,388 ---- } + bool tcLauncher::IsLoading() const + { + return isLoading; + } + /** * Use to change child class (e.g. while changing loadout via tcStores) Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.132 retrieving revision 1.133 diff -C2 -d -r1.132 -r1.133 *** Game.cpp 1 Jun 2005 00:13:32 -0000 1.132 --- Game.cpp 11 Jun 2005 21:01:45 -0000 1.133 *************** *** 25,31 **** #ifndef WX_PRECOMP #include "wx/wx.h" - #ifdef WIN32 - #include "wx/msw/private.h" // for MS Windows specific definitions - #endif #endif --- 25,28 ---- *************** *** 60,63 **** --- 57,64 ---- #include "tcUserSelectedGroups.h" #include "tcContainerGui.h" + #include "tcFlightPortGui.h" + #include "tcDraggedIconDisplay.h" + #include "tcStoresGui.h" + #include "tcPlatformGui.h" #if defined(_MSC_VER) *************** *** 987,990 **** --- 988,996 ---- popupControl->Raise(); // bring popup to top of windows hierarchy to receive mouse events + + // tcDraggedIconDisplay init + draggedIconDisplay = new tcDraggedIconDisplay(glCanvas); + draggedIconDisplay->SetBaseRenderBin(50); + wxASSERT(tacticalMap); *************** *** 1518,1521 **** --- 1524,1528 ---- worldMap->SetActive(false); tcMessageInterface::Get()->SetPopupChatText(false); + draggedIconDisplay->SetActive(false); } lastMode = meScreenMode; *************** *** 1558,1561 **** --- 1565,1571 ---- tcMessageInterface::Get()->SetPopupChatText(true); } + + draggedIconDisplay->SetActive(true); + draggedIconDisplay->Draw(); } else if (meScreenMode == TACTICALBRIEF) *************** *** 1591,1594 **** --- 1601,1606 ---- tcMessageInterface::Get()->SetPopupChatText(true); } + draggedIconDisplay->SetActive(true); + draggedIconDisplay->Draw(); } else if (meScreenMode == OPTIONS) *************** *** 2450,2458 **** if (s == "ShowFlightPanel") { ! // Freeze() to prevent flicker, not sure why this works ! popupControl->Freeze(); ! popupControl->SetMenu(MENUMODE_FLIGHTPANEL); ! popupControl->Track(wxPoint(mrectMap.left+220,mrectMap.top+70)); } } --- 2462,2494 ---- if (s == "ShowFlightPanel") + { + tcFlightPort* flightPort = tcSimPythonInterface::Get()->GetHookedObjFlightPort(); + if (flightPort) + { + // Freeze() to prevent flicker, not sure why this works + /* + popupControl->Freeze(); + popupControl->SetMenu(MENUMODE_FLIGHTPANEL); + popupControl->Track(wxPoint(mrectMap.left+220,mrectMap.top+70)); + */ + + tcFlightPortGui* gui = new tcFlightPortGui(flightPort, wxPoint(250, 200), "xml/flightport_gui_default.xml"); + } + } + else if (s == "ShowStoresPanel") { ! tcPlatformObject* obj = tcSimPythonInterface::Get()->GetHookedObj(); ! if (tcStores* stores = obj->GetMagazine(0)) ! { ! tcStoresGui* gui = new tcStoresGui(stores, wxPoint(500, 200), "xml/stores_gui_default.xml"); ! } ! } ! else if (s == "ShowPlatformPanel") ! { ! tcPlatformObject* obj = tcSimPythonInterface::Get()->GetHookedObj(); ! if (obj) ! { ! tcPlatformGui* gui = new tcPlatformGui(obj, wxPoint(220, 70), "xml/platform_gui_default.xml"); ! } } } Index: tcStores.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcStores.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcStores.cpp 21 May 2005 02:01:05 -0000 1.3 --- tcStores.cpp 11 Jun 2005 21:01:45 -0000 1.4 *************** *** 26,33 **** --- 26,35 ---- #include "tcLauncher.h" #include "tcMessageInterface.h" + #include "tcGameObject.h" #include "tcPlatformObject.h" #include "tcStoresDBObject.h" #include <iostream> #include "common/tcObjStream.h" + #include "tcDatabase.h" #ifdef _DEBUG *************** *** 35,54 **** #endif tcStores::StoreItem::StoreItem() { } tcStores::StoreItem::StoreItem(const StoreItem& src) ! : className(src.className), ! quantity(src.quantity) { } tcStores::StoreItem::StoreItem(const std::string& name, unsigned int qty) ! : className(name), ! quantity(qty) { } --- 37,78 ---- #endif + tcDatabaseObject* tcStores::StoreItem::GetDatabaseObject() const + { + return databaseObj; + } + /** + * Set pointer to database object associated with + * this item. + */ + void tcStores::StoreItem::LoadDatabaseObject() + { + databaseObj = tcDatabase::Get()->GetObject(className); + + if (databaseObj == 0) + { + fprintf(stderr, "tcStores::StoreItem::LoadDatabaseObject - " + "Can't find %s in database\n", className.c_str()); + wxASSERT(false); + } + } tcStores::StoreItem::StoreItem() + : databaseObj(0) { } tcStores::StoreItem::StoreItem(const StoreItem& src) ! : className(src.className), ! quantity(src.quantity), ! databaseObj(src.databaseObj) { } tcStores::StoreItem::StoreItem(const std::string& name, unsigned int qty) ! : className(name), ! quantity(qty) { + LoadDatabaseObject(); } *************** *** 220,224 **** /** ! * @return current quantity of stores, including future unloads */ unsigned int tcStores::CurrentQuantity() const --- 244,249 ---- /** ! * @return current quantity of stores, not including incoming unloads ! * @see tcStores::IncomingQuantity */ unsigned int tcStores::CurrentQuantity() const *************** *** 230,243 **** } - for (size_t k=0; k<ops.size(); k++) - { - if (ops[k].transferType == StoreOperation::UNLOAD) - { - currentCount += ops[k].quantity; - } - } return currentCount; } /** * Helper method to support operations between tcStores and --- 255,262 ---- } return currentCount; } + /** * Helper method to support operations between tcStores and *************** *** 249,253 **** wxASSERT(parent); ! if (child == 0) { return parent; --- 268,272 ---- wxASSERT(parent); ! if ((child == 0) || (child == parent)) { return parent; *************** *** 264,267 **** --- 283,354 ---- } + tcStoresDBObject* tcStores::GetDatabaseObject() const + { + return storesDBObj; + } + + /** + * Uses linear search + * @return database object for item or 0 if not found + */ + tcDatabaseObject* tcStores::GetDatabaseObjectForItem(const std::string& item) const + { + for (size_t n=0; n<stores.size(); n++) + { + if (stores[n].className == item) + { + return stores[n].GetDatabaseObject(); + } + } + + return 0; + } + + const std::string& tcStores::GetItemName(unsigned int idx) const + { + static std::string errorString = "Error"; + + if (idx >= stores.size()) + { + return errorString; + } + else + { + return stores[idx].className; + } + } + + + + unsigned int tcStores::GetNumberItemTypes() const + { + return stores.size(); + } + + + tcGameObject* tcStores::GetParent() const + { + return parent; + } + + /** + * @return quantity of stores being unloaded into stores + * @see tcStores::CurrentQuantity + */ + unsigned int tcStores::IncomingQuantity() const + { + unsigned currentCount = 0; + + for (size_t k=0; k<ops.size(); k++) + { + if (ops[k].transferType == StoreOperation::UNLOAD) + { + currentCount += ops[k].quantity; + } + } + + return currentCount; + } + /** * *************** *** 290,295 **** { unsigned currentQuantity = CurrentQuantity(); ! return (currentQuantity >= storesDBObj->capacity); } --- 377,383 ---- { unsigned currentQuantity = CurrentQuantity(); + unsigned incomingQuantity = IncomingQuantity(); ! return ((currentQuantity + incomingQuantity) >= storesDBObj->capacity); } *************** *** 532,536 **** if (obj->IsOwnAlliance()) { ! wxString s = wxString::Format("%s (%s) - Unloading %s from %s\n", obj->mzUnit.mz, obj->mzClass.mz, item.c_str(), storesDBObj->displayName.c_str()); --- 620,624 ---- if (obj->IsOwnAlliance()) { ! wxString s = wxString::Format("%s (%s) - Unloading %s to %s\n", obj->mzUnit.mz, obj->mzClass.mz, item.c_str(), storesDBObj->displayName.c_str()); Index: tcAirfieldObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcAirfieldObject.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcAirfieldObject.cpp 29 Apr 2005 18:52:55 -0000 1.4 --- tcAirfieldObject.cpp 11 Jun 2005 21:01:45 -0000 1.5 *************** *** 220,223 **** --- 220,225 ---- UpdateSensors(afStatusTime); + UpdateMagazines(afStatusTime); + mfStatusTime = afStatusTime; } |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:02:10
|
Update of /cvsroot/gcblue/gcb_wx/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5785/scripts Modified Files: HotKey.py UnitCommands.py Log Message: Initial commit for drag and drop icon gui Index: HotKey.py =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/scripts/HotKey.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** HotKey.py 10 Mar 2005 03:28:28 -0000 1.4 --- HotKey.py 11 Jun 2005 21:01:44 -0000 1.5 *************** *** 22,25 **** --- 22,27 ---- elif (key == 'f'): UnitInfo.SendCommand('ShowFlightPanel') + elif (key == 's'): + UnitInfo.SendCommand('ShowPlatformPanel') elif (key == 'g'): # toggle landing gear/landing state for air units if (UnitInfo.GetLandingState()): Index: UnitCommands.py =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/scripts/UnitCommands.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** UnitCommands.py 17 May 2005 00:20:40 -0000 1.17 --- UnitCommands.py 11 Jun 2005 21:01:44 -0000 1.18 *************** *** 272,275 **** --- 272,278 ---- UI.SendCommand('ShowFlightPanel') + def ShowStoresPanel(UI): + UI.Sendcommand('ShowStoresPanel') + def ToggleRadars(UI): n_sensors = UI.GetSensorCount() |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:02:08
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5785/include/sim Modified Files: Game.h tcFlightPort.h tcLauncher.h tcStores.h Log Message: Initial commit for drag and drop icon gui Index: tcFlightPort.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcFlightPort.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcFlightPort.h 1 Jun 2005 00:13:28 -0000 1.12 --- tcFlightPort.h 11 Jun 2005 21:01:43 -0000 1.13 *************** *** 110,114 **** int CheckLanding(tcGameObject *obj); void Clear(); ! int FindAirState(tcAirState *airstate); int FindEmptySpot(std::vector<tsSpotInfo> *loc_vector); int FindEmptySpot(teLocation loc, std::vector<tsSpotInfo>*& loc_vector); --- 110,115 ---- int CheckLanding(tcGameObject *obj); void Clear(); ! int FindAirState(tcAirState* airstate); ! int FindAirState(tcGameObject* obj); int FindEmptySpot(std::vector<tsSpotInfo> *loc_vector); int FindEmptySpot(teLocation loc, std::vector<tsSpotInfo>*& loc_vector); *************** *** 117,120 **** --- 118,122 ---- size_t GetCount() {return units.size();} tsSpotInfo* GetCurrentSpotInfo(tcAirState *airstate); + tcFlightportDBObject* GetDatabaseObject() const; unsigned GetHangarCapacity() const {return hangarCapacity;} tcTrack GetLandingData(const tcGameObject* obj); *************** *** 129,133 **** void MoveObjectToGoal(tcAirState *airstate); bool MoveToLaunchQueue(tcAirState *airstate); ! void SetObjectDestination(unsigned n, teLocation loc); void SetParent(tcGameObject *newparent) {parent=newparent;} void SetHangarCapacity(unsigned cap) {hangarCapacity = cap;} --- 131,135 ---- void MoveObjectToGoal(tcAirState *airstate); bool MoveToLaunchQueue(tcAirState *airstate); ! void SetObjectDestination(unsigned n, teLocation loc, unsigned int position = 0); void SetParent(tcGameObject *newparent) {parent=newparent;} void SetHangarCapacity(unsigned cap) {hangarCapacity = cap;} *************** *** 166,172 **** --- 168,176 ---- short int id; ///< id of unit that command applies to unsigned char op; ///< 0, launch unit, 1-3 move unit + unsigned char pos; ///< position parameter to specify which launch or ready spot to move to }; std::vector<CommandInfo> commandList; + bool IsSpotEmpty(teLocation loc, unsigned int spot); void ResyncSpots(); }; Index: tcStores.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcStores.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcStores.h 1 Jun 2005 00:13:28 -0000 1.3 --- tcStores.h 11 Jun 2005 21:01:43 -0000 1.4 *************** *** 32,35 **** --- 32,36 ---- namespace database { + class tcDatabaseObject; class tcStoresDBObject; } *************** *** 58,66 **** std::string className; unsigned int quantity; ! StoreItem(); StoreItem(const StoreItem& src); StoreItem(const std::string& name, unsigned int qty); }; struct StoreOperation { --- 59,74 ---- std::string className; unsigned int quantity; ! ! tcDatabaseObject* GetDatabaseObject() const; ! StoreItem(); StoreItem(const StoreItem& src); StoreItem(const std::string& name, unsigned int qty); + private: + tcDatabaseObject* databaseObj; + + void LoadDatabaseObject(); }; + struct StoreOperation { *************** *** 77,80 **** --- 85,99 ---- unsigned int CurrentItemQuantity(const std::string& item) const; unsigned int CurrentQuantity() const; + unsigned int IncomingQuantity() const; + tcStoresDBObject* GetDatabaseObject() const; + tcDatabaseObject* GetDatabaseObjectForItem(const std::string& item) const; + + /// name of <idx> type + const std::string& GetItemName(unsigned int idx) const; + + /// number of different item types in storage + unsigned int GetNumberItemTypes() const; + + tcGameObject* GetParent() const; bool IsCompatible(const std::string& item) const; bool IsFull() const; Index: Game.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/Game.h,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** Game.h 1 Jun 2005 00:13:28 -0000 1.58 --- Game.h 11 Jun 2005 21:01:43 -0000 1.59 *************** *** 71,74 **** --- 71,75 ---- class tcChatBox; class tc3DWindow; + class tcDraggedIconDisplay; using namespace scriptinterface; *************** *** 175,179 **** tcDisplaySettingsView* displaySettingsView; tcChatBox* chatBox; ///< popup for multiplayer chat ! // interfaces for START game mode (unloaded when game is started) tcStartView* startView; --- 176,181 ---- tcDisplaySettingsView* displaySettingsView; tcChatBox* chatBox; ///< popup for multiplayer chat ! tcDraggedIconDisplay* draggedIconDisplay; ///< display of drag-drop icons ! // interfaces for START game mode (unloaded when game is started) tcStartView* startView; Index: tcLauncher.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcLauncher.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tcLauncher.h 1 Jun 2005 00:13:28 -0000 1.16 --- tcLauncher.h 11 Jun 2005 21:01:43 -0000 1.17 *************** *** 117,129 **** bool CommandInfoMatches(const tcLauncher& launcher); void CopyCommandInfoFrom(const tcLauncher& launcher); ! std::string GetChildClassName() const; const std::string& GetLauncherName() const; float GetCycleTime() const; short int GetErrorCode() const {return errorCode;} int GetLauncherStatus(); float GetSectorCenter() const; ///< returns center of engagement sector in radians float GetSectorWidth() const; ///< returns width of engagement sector in radians bool IsAutoPoint() const; bool IsDamaged() const; void SetErrorCode(int code) {errorCode = code;} --- 117,132 ---- bool CommandInfoMatches(const tcLauncher& launcher); void CopyCommandInfoFrom(const tcLauncher& launcher); ! const std::string& GetChildClassName() const; ! tcDatabaseObject* GetChildDatabaseObject() const; const std::string& GetLauncherName() const; float GetCycleTime() const; short int GetErrorCode() const {return errorCode;} int GetLauncherStatus(); + tcGameObject* GetParent() const; float GetSectorCenter() const; ///< returns center of engagement sector in radians float GetSectorWidth() const; ///< returns width of engagement sector in radians bool IsAutoPoint() const; bool IsDamaged() const; + bool IsLoading() const; void SetErrorCode(int code) {errorCode = code;} |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:02:08
|
Update of /cvsroot/gcblue/gcb_wx/src/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5785/src/database Modified Files: tcDatabaseObject.cpp Log Message: Initial commit for drag and drop icon gui Index: tcDatabaseObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcDatabaseObject.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcDatabaseObject.cpp 1 Jun 2005 00:13:29 -0000 1.17 --- tcDatabaseObject.cpp 11 Jun 2005 21:01:44 -0000 1.18 *************** *** 38,41 **** --- 38,43 ---- #include "database/tcSqlReader.h" #include <osg/Geometry> + #include <osg/Image> + #include "tc3DWindow.h" // for CreateTexturedSymbol method #ifdef _DEBUG *************** *** 157,160 **** --- 159,174 ---- } } + + /** + * @return pointer to icon for gui operations + */ + osg::Geometry* tcDatabaseObject::GetIcon() + { + if (!icon.valid()) + { + LoadIcon(); + } + return icon.get(); + } /** *************** *** 181,184 **** --- 195,214 ---- model->LoadXml(mz3DModelFileName.mz); } + + void tcDatabaseObject::LoadIcon() + { + wxString fileWithPath; + + if (strlen(mzImageFileName.mz) > 4) + { + fileWithPath.Printf("icons\\%s", mzImageFileName.mz); + } + else + { + fileWithPath.Printf("icons\\%s", "unknown.jpg"); + } + + icon = tc3DWindow::CreateTexturedSymbol(fileWithPath.c_str(), 32.0f); + } void tcDatabaseObject::RandInit() { |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:02:08
|
Update of /cvsroot/gcblue/gcb_wx/src/scriptinterface In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5785/src/scriptinterface Modified Files: tcSimPythonInterface.cpp Log Message: Initial commit for drag and drop icon gui Index: tcSimPythonInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcSimPythonInterface.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** tcSimPythonInterface.cpp 1 Jun 2005 00:13:32 -0000 1.33 --- tcSimPythonInterface.cpp 11 Jun 2005 21:01:45 -0000 1.34 *************** *** 311,314 **** --- 311,319 ---- } + tcPlatformObject* tcSimPythonInterface::GetHookedObj() const + { + return mpHookedObj; + } + tcFlightPort* tcSimPythonInterface::GetHookedObjFlightPort() { |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:02:07
|
Update of /cvsroot/gcblue/gcb_wx/src/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5785/src/network Modified Files: tcNetworkInterface.cpp Log Message: Initial commit for drag and drop icon gui Index: tcNetworkInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/network/tcNetworkInterface.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** tcNetworkInterface.cpp 6 May 2005 23:57:50 -0000 1.19 --- tcNetworkInterface.cpp 11 Jun 2005 21:01:44 -0000 1.20 *************** *** 236,240 **** if (animateCount >= 30) status += "."; ! return status.c_str(); } --- 236,241 ---- if (animateCount >= 30) status += "."; ! s = status.c_str(); ! return s; } *************** *** 243,247 **** tcConnectionData* connData = GetConnection(id); wxASSERT(connData); ! if (connData == 0) return std::string("Error"); --- 244,252 ---- tcConnectionData* connData = GetConnection(id); wxASSERT(connData); ! if (connData == 0) ! { ! s = "Error"; ! return s; ! } |
|
From: Dewitt C. <ddc...@us...> - 2005-06-11 21:01:53
|
Update of /cvsroot/gcblue/gcb_wx/include/scriptinterface In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5785/include/scriptinterface Modified Files: tcSimPythonInterface.h Log Message: Initial commit for drag and drop icon gui Index: tcSimPythonInterface.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/scriptinterface/tcSimPythonInterface.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** tcSimPythonInterface.h 1 Jun 2005 00:13:27 -0000 1.25 --- tcSimPythonInterface.h 11 Jun 2005 21:01:43 -0000 1.26 *************** *** 118,121 **** --- 118,123 ---- void CallPlatformScript(tcPlatformObject *apObj, const char* azCommand); void CallTaskScript(ScriptedTask* task, const char* azCommand); + tcPlatformObject* GetHookedObj() const; + tcFlightPort* GetHookedObjFlightPort(); void GetObjectStringByMode(char *str); // gets name of python object to pass to python function tcScenarioInterface* GetScenarioInterface() const; *************** *** 203,207 **** std::vector<ClientCommand> clientCommands; ///< commands to send to server ! tcFlightPort* GetHookedObjFlightPort(); }; } --- 205,209 ---- std::vector<ClientCommand> clientCommands; ///< commands to send to server ! }; } |
|
From: Dewitt C. <ddc...@us...> - 2005-06-08 21:58:21
|
Update of /cvsroot/gcblue/gcb_wx/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv864/docs Modified Files: BUILDING.txt Log Message: Added SQLite info Index: BUILDING.txt =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/docs/BUILDING.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BUILDING.txt 8 Apr 2005 22:44:28 -0000 1.3 --- BUILDING.txt 8 Jun 2005 21:58:08 -0000 1.4 *************** *** 1,3 **** ! Updated April 2005 --- Download information --- --- 1,3 ---- ! Updated June 2005 --- Download information --- *************** *** 32,35 **** --- 32,40 ---- Download Python-2.3.3.tgz + * SQLite 2.8 + http://www.sqlite.org/sqlite-source-2_8_16.zip (sources for windows) + There also might be a precompiled download on that site that has the .lib, dll, and headers. + + --- Required libraries --- *************** *** 46,49 **** --- 51,55 ---- Python 2.3.3 C:\Python-2.3.3 Boost Python 1.31.0 C:\boost_1_31_0 + SQLite version 2.8 C:\sqlite --- Visual Studio Project Directories --- *************** *** 62,65 **** --- 68,72 ---- C:\libogg-1.1\include C:\libvorbis-1.0.1\include + C:\sqlite * Library files *************** *** 75,78 **** --- 82,86 ---- C:\libogg-1.1\lib C:\libvorbis-1.0.1\libs + C:\sqlite\lib *************** *** 251,252 **** --- 259,264 ---- - vorbisfile_static: 11 warnings debug, 15 warnings release + * Build SQLite version 2 + + + |
|
From: Dewitt C. <ddc...@us...> - 2005-06-01 00:14:14
|
Update of /cvsroot/gcblue/gcb_wx/src/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9387/src/graphics Modified Files: ObjectUpdater.cpp cspSky.cpp tc3DModel.cpp tc3DViewer.cpp tc3DWindow.cpp tcButton.cpp tcDisplaySettingsView.cpp tcGameView.cpp tcHookInfo.cpp tcMapObject.cpp tcMapView.cpp tcOOBView.cpp tcPopupControl.cpp tcTerrainView.cpp tcXmlWindow.cpp Log Message: namespace housekeeping Index: tc3DModel.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tc3DModel.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** tc3DModel.cpp 17 May 2005 00:20:40 -0000 1.25 --- tc3DModel.cpp 1 Jun 2005 00:13:30 -0000 1.26 *************** *** 53,57 **** #endif - using Sensor::tcSensorMapTrack; // started with CSP ModelProcessor class --- 53,56 ---- Index: ObjectUpdater.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/ObjectUpdater.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ObjectUpdater.cpp 17 May 2005 00:20:40 -0000 1.17 --- ObjectUpdater.cpp 1 Jun 2005 00:13:30 -0000 1.18 *************** *** 41,45 **** tc3DViewer* ObjectUpdater::viewer = 0; tcSimState* ObjectUpdater::simState = 0; ! Sensor::tcSensorMap* ObjectUpdater::sensorMap = 0; --- 41,45 ---- tc3DViewer* ObjectUpdater::viewer = 0; tcSimState* ObjectUpdater::simState = 0; ! tcSensorMap* ObjectUpdater::sensorMap = 0; Index: tcHookInfo.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcHookInfo.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcHookInfo.cpp 29 Apr 2005 18:52:53 -0000 1.10 --- tcHookInfo.cpp 1 Jun 2005 00:13:30 -0000 1.11 *************** *** 250,254 **** * drawing methods can draw underneath. */ ! void tcHookInfo::DrawTrackEngaged(const Sensor::tcSensorMapTrack *smtrack, float& x, float& y) { --- 250,254 ---- * drawing methods can draw underneath. */ ! void tcHookInfo::DrawTrackEngaged(const tcSensorMapTrack *smtrack, float& x, float& y) { Index: tcDisplaySettingsView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcDisplaySettingsView.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcDisplaySettingsView.cpp 2 Nov 2004 04:23:56 -0000 1.7 --- tcDisplaySettingsView.cpp 1 Jun 2005 00:13:30 -0000 1.8 *************** *** 20,24 **** --- 20,28 ---- */ + #include "stdwx.h" // precompiled header file + + #ifndef WX_PRECOMP #include "wx/wx.h" + #endif #include "wx/string.h" *************** *** 27,30 **** --- 31,35 ---- #include "tcDisplayModes.h" #include "wxcommands.h" + #include "tc3DWindow.h" #ifdef _DEBUG Index: tcMapObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcMapObject.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcMapObject.cpp 8 May 2005 23:28:58 -0000 1.8 --- tcMapObject.cpp 1 Jun 2005 00:13:30 -0000 1.9 *************** *** 41,45 **** #endif - using MapView::tcMapView; tcMapView* tcMapObject::mapView = NULL; --- 41,44 ---- Index: tcXmlWindow.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcXmlWindow.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcXmlWindow.cpp 2 Nov 2004 04:23:56 -0000 1.5 --- tcXmlWindow.cpp 1 Jun 2005 00:13:31 -0000 1.6 *************** *** 72,75 **** --- 72,101 ---- return; } + + TiXmlElement* elt = root->ToElement(); + + // background image + std::string imageName; + if (const char* s = elt->Attribute("BackgroundImage")) + { + imageName = s; + } + + if (imageName.size() > 2) + { + LoadBackgroundImage(imageName.c_str()); + } + + + int xmlWidth = 0; + int xmlHeight = 0; + elt->Attribute("Width", &xmlWidth); + elt->Attribute("Height", &xmlHeight); + if ((xmlWidth > 0) && (xmlHeight > 0)) + { + wxPoint pos = wxWindow::GetPosition(); + SetSize(pos.x, pos.y, xmlWidth, xmlHeight); // set all size params + } + // add buttons *************** *** 116,121 **** tcXmlWindow::tcXmlWindow(wxWindow *parent, const wxPoint& pos, const wxSize& size, ! const wxString& configFile, const wxString& name) ! : tc3DWindow(parent, pos, size, name) { if (configFile.length() > 2) --- 142,148 ---- tcXmlWindow::tcXmlWindow(wxWindow *parent, const wxPoint& pos, const wxSize& size, ! const wxString& configFile, const wxString& name, ! tc3DWindow* graphicsHost) ! : tc3DWindow(parent, pos, size, name, graphicsHost) { if (configFile.length() > 2) Index: tcOOBView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcOOBView.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcOOBView.cpp 27 Jan 2005 01:01:50 -0000 1.7 --- tcOOBView.cpp 1 Jun 2005 00:13:31 -0000 1.8 *************** *** 45,49 **** #endif - using namespace MapView; --- 45,48 ---- *************** *** 158,164 **** void tcOOBView::UpdateTrackData() { - using Sensor::tcSensorMapTrack; - using Sensor::tcSensorTrackIterator; - surfaceTracks.clear(); subTracks.clear(); --- 157,160 ---- Index: tcTerrainView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcTerrainView.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcTerrainView.cpp 16 Apr 2005 20:44:42 -0000 1.6 --- tcTerrainView.cpp 1 Jun 2005 00:13:31 -0000 1.7 *************** *** 38,302 **** ! namespace MapView { ! void tcTerrainView::Draw() ! { ! if (!redraw) return; ! // if displayRegion is wrapped, draw two images ! if (!isWrapped) ! { ! DrawZoomedImage(mapImage.get(), 0, 0, (float)mnWidth, (float)mnHeight, ! displayRegion, ALIGN_BOTTOM_LEFT); ! } ! else ! { ! DrawZoomedImage(mapImage.get(), 0, 0, wrapWidth*(float)mnWidth, (float)mnHeight, ! displayRegion, ALIGN_BOTTOM_LEFT); ! DrawZoomedImage(mapImage.get(), wrapWidth*(float)mnWidth, 0, (1.0f-wrapWidth)*(float)mnWidth, (float)mnHeight, ! displayRegionWrapped, ALIGN_BOTTOM_LEFT); ! } ! FinishDraw(); ! redraw = false; ! } ! void tcTerrainView::GetViewParameters(tsTerrainViewParameters& vp) ! { ! vp.mnSurfaceWidth = mnWidth; ! vp.mnSurfaceHeight = mnHeight; ! vp.mrectDisplay = mrectDisplay; ! vp.mrectGeo = mrectCurrentView; ! } ! /** ! * If the terrain view is minimized always force ! * abActive to false ! */ ! void tcTerrainView::SetActive(bool abActive) ! { ! if (IsWindowMinimized()) ! { ! tc3DWindow::SetActive(false); ! } ! tc3DWindow::SetActive(abActive); ! } ! /** ! * ! */ ! void tcTerrainView::SetDisplayRegion(tcRect& r) ! { ! displayRegion = r; ! } ! /** ! * Sets new view, updating display region of map quad ! */ ! void tcTerrainView::SetView(tcGeoRect r) ! { ! if (mrectCurrentView == r) return; // no change, so return ! mrectCurrentView = r; ! isWrapped = r.left > r.right; ! if (!isWrapped) ! { ! // assumes longitude is within [-pi,pi) and lat within [-pi/2,pi/2] ! displayRegion.left = (r.left - mrectMap.left)/mrectMap.Width(); ! displayRegion.right = (r.right - mrectMap.left)/mrectMap.Width(); ! displayRegion.bottom = (r.bottom - mrectMap.bottom)/mrectMap.Height(); ! displayRegion.top = (r.top - mrectMap.bottom)/mrectMap.Height(); ! wrapWidth = 1.0f; ! } ! else ! { ! displayRegion.left = (r.left - mrectMap.left)/mrectMap.Width(); ! displayRegion.right = 1.0f; ! displayRegion.bottom = (r.bottom - mrectMap.bottom)/mrectMap.Height(); ! displayRegion.top = (r.top - mrectMap.bottom)/mrectMap.Height(); ! displayRegionWrapped.left = 0; ! displayRegionWrapped.right = (r.right - mrectMap.left)/mrectMap.Width(); ! displayRegionWrapped.bottom = (r.bottom - mrectMap.bottom)/mrectMap.Height(); ! displayRegionWrapped.top = (r.top - mrectMap.bottom)/mrectMap.Height(); ! wrapWidth = (1.0f - displayRegion.left) / (1.0f - displayRegion.left + displayRegionWrapped.right); ! } ! redraw = true; ! } ! int tcTerrainView::LoadLowResSurface() ! { ! tsMapDataInfo sMDI; ! mpMapData->GetMapDataInfo(&sMDI); // get size of map data arrays ! /*** Refresh low resolution map surface ***/ ! int width = sMDI.mnLowResWidth; ! int height = sMDI.mnLowResHeight; ! ! osg::Image* image = mapImage->getImage(); ! if (!image) ! { ! image = new osg::Image(); ! mapImage->setImage(image); ! } ! image->allocateImage(width, height, 1, GL_RGBA, GL_BYTE, 1); ! mpMapData->GetWorldArea(mrectMap); - unsigned int* pBits = (unsigned int*) image->data(); ! wxASSERT(pBits != NULL); ! if (mpOptions != NULL) ! { ! mpMapData->CreateMapImage(mpOptions->mnMapMode, 0, pBits); ! } ! else ! { ! fprintf(stderr, "tcTerrainView::LoadLowResSurface - " ! "called without attached options, using default\n"); ! mpMapData->CreateMapImage(1, 0, pBits); ! } ! redraw = true; ! return true; ! } ! int tcTerrainView::LoadHighResSurface() ! { ! tsMapDataInfo sMDI; ! bool mbTextureMaps; ! if (mpOptions != NULL) ! { ! mbTextureMaps = mpOptions->mbTextureMappedMaps == 1; ! } ! else ! { ! mbTextureMaps = true; ! } ! mpMapData->GetMapDataInfo(&sMDI); // get size of map data arrays ! int width = sMDI.mnHighResWidth; ! int height = sMDI.mnHighResHeight; ! osg::Image* image = mapImage->getImage(); ! if (!image) ! { ! image = new osg::Image(); ! mapImage->setImage(image); ! } ! image->allocateImage(width, height, 1, GL_RGBA, GL_BYTE, 1); - mpMapData->GetTheaterArea(mrectMap); - ! unsigned int* pBits = (unsigned int*) image->data(); ! ! wxASSERT(pBits); - mpMapData->CreateMapImage(mpOptions->mnMapMode, 1, pBits); // 1 for high res - - redraw = true; ! return true; ! } ! /** ! * ! */ ! void tcTerrainView::Maximize() ! { ! tc3DWindow::Maximize(); ! redraw = true; ! } ! /** ! * ! */ ! void tcTerrainView::Minimize() ! { ! // tc3DWindow::SetActive(false); ! tc3DWindow::Minimize(); ! redraw = true; ! } ! int tcTerrainView::RefreshSurfaces() ! { ! if (mpMapData == NULL) ! { ! wxMessageBox("tcTerrainView - RefreshSurfaces called with NULL mpMapData"); ! return false; ! } ! if (highRes) ! { ! return LoadHighResSurface(); ! } ! else ! { ! return LoadLowResSurface(); ! } ! } - /** - * - */ - int tcTerrainView::CreateSurfaces() - { - if (mpMapData == NULL) - { - wxMessageBox("tcTerrainView - CreateSurfaces called with NULL mpMapData"); - return false; - } ! if (highRes) ! { ! return LoadHighResSurface(); ! } ! else ! { ! return LoadLowResSurface(); ! } ! } ! tcTerrainView::tcTerrainView(wxWindow *parent, ! const wxPoint& pos, const wxSize& size, ! bool isHighRes, const wxString& name) ! : ! tc3DWindow(parent, pos, size, name, 0), ! highRes(isHighRes), ! displayRegion(0, 1, 0, 1), ! redraw(true) ! { ! mpMapData = NULL; ! mpOptions = tcOptions::Get(); ! SetResizeable2D(false); // do not resize 2D surface on resize ! mapImage = new osg::Texture2D(); ! // mapImage->setUseHardwareMipMapGeneration(true); ! // mapImage->setInternalFormatMode(osg::Texture::USE_IMAGE_DATA_FORMAT); ! SetBlend(false); ! } - tcTerrainView::~tcTerrainView() - { - } } --- 38,300 ---- ! ! void tcTerrainView::Draw() { ! if (!redraw) return; ! // if displayRegion is wrapped, draw two images ! if (!isWrapped) ! { ! DrawZoomedImage(mapImage.get(), 0, 0, (float)mnWidth, (float)mnHeight, ! displayRegion, ALIGN_BOTTOM_LEFT); ! } ! else ! { ! DrawZoomedImage(mapImage.get(), 0, 0, wrapWidth*(float)mnWidth, (float)mnHeight, ! displayRegion, ALIGN_BOTTOM_LEFT); ! DrawZoomedImage(mapImage.get(), wrapWidth*(float)mnWidth, 0, (1.0f-wrapWidth)*(float)mnWidth, (float)mnHeight, ! displayRegionWrapped, ALIGN_BOTTOM_LEFT); ! } ! FinishDraw(); ! redraw = false; ! } ! void tcTerrainView::GetViewParameters(tsTerrainViewParameters& vp) ! { ! vp.mnSurfaceWidth = mnWidth; ! vp.mnSurfaceHeight = mnHeight; ! vp.mrectDisplay = mrectDisplay; ! vp.mrectGeo = mrectCurrentView; ! } ! /** ! * If the terrain view is minimized always force ! * abActive to false ! */ ! void tcTerrainView::SetActive(bool abActive) ! { ! if (IsWindowMinimized()) ! { ! tc3DWindow::SetActive(false); ! } ! tc3DWindow::SetActive(abActive); ! } ! /** ! * ! */ ! void tcTerrainView::SetDisplayRegion(tcRect& r) ! { ! displayRegion = r; ! } ! /** ! * Sets new view, updating display region of map quad ! */ ! void tcTerrainView::SetView(tcGeoRect r) ! { ! if (mrectCurrentView == r) return; // no change, so return ! mrectCurrentView = r; ! isWrapped = r.left > r.right; ! if (!isWrapped) ! { ! // assumes longitude is within [-pi,pi) and lat within [-pi/2,pi/2] ! displayRegion.left = (r.left - mrectMap.left)/mrectMap.Width(); ! displayRegion.right = (r.right - mrectMap.left)/mrectMap.Width(); ! displayRegion.bottom = (r.bottom - mrectMap.bottom)/mrectMap.Height(); ! displayRegion.top = (r.top - mrectMap.bottom)/mrectMap.Height(); ! wrapWidth = 1.0f; ! } ! else ! { ! displayRegion.left = (r.left - mrectMap.left)/mrectMap.Width(); ! displayRegion.right = 1.0f; ! displayRegion.bottom = (r.bottom - mrectMap.bottom)/mrectMap.Height(); ! displayRegion.top = (r.top - mrectMap.bottom)/mrectMap.Height(); ! displayRegionWrapped.left = 0; ! displayRegionWrapped.right = (r.right - mrectMap.left)/mrectMap.Width(); ! displayRegionWrapped.bottom = (r.bottom - mrectMap.bottom)/mrectMap.Height(); ! displayRegionWrapped.top = (r.top - mrectMap.bottom)/mrectMap.Height(); ! wrapWidth = (1.0f - displayRegion.left) / (1.0f - displayRegion.left + displayRegionWrapped.right); ! } ! redraw = true; ! } ! int tcTerrainView::LoadLowResSurface() ! { ! tsMapDataInfo sMDI; ! mpMapData->GetMapDataInfo(&sMDI); // get size of map data arrays ! /*** Refresh low resolution map surface ***/ ! int width = sMDI.mnLowResWidth; ! int height = sMDI.mnLowResHeight; ! osg::Image* image = mapImage->getImage(); ! if (!image) ! { ! image = new osg::Image(); ! mapImage->setImage(image); ! } ! image->allocateImage(width, height, 1, GL_RGBA, GL_BYTE, 1); + mpMapData->GetWorldArea(mrectMap); ! unsigned int* pBits = (unsigned int*) image->data(); ! wxASSERT(pBits != NULL); ! if (mpOptions != NULL) ! { ! mpMapData->CreateMapImage(mpOptions->mnMapMode, 0, pBits); ! } ! else ! { ! fprintf(stderr, "tcTerrainView::LoadLowResSurface - " ! "called without attached options, using default\n"); ! mpMapData->CreateMapImage(1, 0, pBits); ! } ! redraw = true; ! return true; ! } ! int tcTerrainView::LoadHighResSurface() ! { ! tsMapDataInfo sMDI; ! bool mbTextureMaps; ! if (mpOptions != NULL) ! { ! mbTextureMaps = mpOptions->mbTextureMappedMaps == 1; ! } ! else ! { ! mbTextureMaps = true; ! } ! mpMapData->GetMapDataInfo(&sMDI); // get size of map data arrays ! int width = sMDI.mnHighResWidth; ! int height = sMDI.mnHighResHeight; + osg::Image* image = mapImage->getImage(); + if (!image) + { + image = new osg::Image(); + mapImage->setImage(image); + } + image->allocateImage(width, height, 1, GL_RGBA, GL_BYTE, 1); ! mpMapData->GetTheaterArea(mrectMap); ! unsigned int* pBits = (unsigned int*) image->data(); ! wxASSERT(pBits); + mpMapData->CreateMapImage(mpOptions->mnMapMode, 1, pBits); // 1 for high res ! redraw = true; ! return true; ! } + /** + * + */ + void tcTerrainView::Maximize() + { + tc3DWindow::Maximize(); + redraw = true; + } ! /** ! * ! */ ! void tcTerrainView::Minimize() ! { ! // tc3DWindow::SetActive(false); ! tc3DWindow::Minimize(); ! redraw = true; ! } + int tcTerrainView::RefreshSurfaces() + { + if (mpMapData == NULL) + { + wxMessageBox("tcTerrainView - RefreshSurfaces called with NULL mpMapData"); + return false; + } + if (highRes) + { + return LoadHighResSurface(); + } + else + { + return LoadLowResSurface(); + } + } ! /** ! * ! */ ! int tcTerrainView::CreateSurfaces() ! { ! if (mpMapData == NULL) ! { ! wxMessageBox("tcTerrainView - CreateSurfaces called with NULL mpMapData"); ! return false; ! } ! if (highRes) ! { ! return LoadHighResSurface(); ! } ! else ! { ! return LoadLowResSurface(); ! } ! } + tcTerrainView::tcTerrainView(wxWindow *parent, + const wxPoint& pos, const wxSize& size, + bool isHighRes, const wxString& name) + : + tc3DWindow(parent, pos, size, name, 0), + highRes(isHighRes), + displayRegion(0, 1, 0, 1), + redraw(true) + { + mpMapData = NULL; + mpOptions = tcOptions::Get(); + SetResizeable2D(false); // do not resize 2D surface on resize + mapImage = new osg::Texture2D(); + // mapImage->setUseHardwareMipMapGeneration(true); + // mapImage->setInternalFormatMode(osg::Texture::USE_IMAGE_DATA_FORMAT); + + SetBlend(false); } + + tcTerrainView::~tcTerrainView() + { + + } + Index: tcMapView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcMapView.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** tcMapView.cpp 6 May 2005 23:57:50 -0000 1.25 --- tcMapView.cpp 1 Jun 2005 00:13:30 -0000 1.26 *************** *** 50,54 **** using namespace std; - using namespace MapView; #ifdef _DEBUG --- 50,53 ---- *************** *** 1733,1737 **** * Version that uses pre-drawn images to draw symbols */ ! void tcTacticalMapView::DrawSymbol2(MapView::tcMapObj* pMO) { float symbsize = 15.0f; --- 1732,1736 ---- * Version that uses pre-drawn images to draw symbols */ ! void tcTacticalMapView::DrawSymbol2(tcMapObj* pMO) { float symbsize = 15.0f; Index: tcPopupControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcPopupControl.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcPopupControl.cpp 10 Mar 2005 03:28:28 -0000 1.8 --- tcPopupControl.cpp 1 Jun 2005 00:13:31 -0000 1.9 *************** *** 35,39 **** #endif ! using namespace ScriptInterface; --- 35,39 ---- #endif ! using namespace scriptinterface; Index: tcButton.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcButton.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcButton.cpp 27 Jan 2005 01:01:49 -0000 1.17 --- tcButton.cpp 1 Jun 2005 00:13:30 -0000 1.18 *************** *** 246,250 **** SetCommand(command); ! caption = current->Attribute("Caption"); SetName(caption.c_str()); --- 246,254 ---- SetCommand(command); ! if (const char* s = current->Attribute("Caption")) ! { ! caption = s; ! } ! SetName(caption.c_str()); *************** *** 269,277 **** { TiXmlElement* imageElement = childNode->ToElement(); ! std::string offImageName = imageElement->Attribute("Off"); ! std::string onImageName = imageElement->Attribute("On"); ! std::string overOnImageName = imageElement->Attribute("OverOn"); ! std::string overOffImageName = imageElement->Attribute("OverOff"); LoadImages(offImageName, onImageName, overOffImageName, overOnImageName); if (offImage.valid()) { --- 273,317 ---- { TiXmlElement* imageElement = childNode->ToElement(); ! std::string offImageName; ! std::string onImageName; ! std::string overOnImageName; ! std::string overOffImageName; ! ! if (const char* s = imageElement->Attribute("Off")) ! { ! offImageName = s; ! } ! ! if (const char* s = imageElement->Attribute("On")) ! { ! onImageName = s; ! } ! else ! { ! onImageName = offImageName; ! } ! ! if (const char* s = imageElement->Attribute("OverOff")) ! { ! overOffImageName = s; ! } ! else ! { ! overOffImageName = offImageName; ! } ! ! if (const char* s = imageElement->Attribute("OverOn")) ! { ! overOnImageName = s; ! } ! else ! { ! overOnImageName = onImageName; ! } ! ! LoadImages(offImageName, onImageName, overOffImageName, overOnImageName); + + /* if (offImage.valid()) { *************** *** 279,282 **** --- 319,323 ---- height = offImage->getTextureHeight(); } + */ } Index: cspSky.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/cspSky.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** cspSky.cpp 23 Nov 2004 23:30:55 -0000 1.13 --- cspSky.cpp 1 Jun 2005 00:13:30 -0000 1.14 *************** *** 77,82 **** using namespace osg; - using UnitConversions::toRadians; - using UnitConversions::toDegrees; using std::min; using std::max; --- 77,80 ---- *************** *** 240,245 **** void setObserver(double lat, double lmst, float ambient) { ! rz = 270.0 - toDegrees(lmst); ! rx = - 90.0 + toDegrees(lat); if (ambient < 0.0) ambient = 0.0; if (ambient > 1.0) ambient = 1.0; --- 238,243 ---- void setObserver(double lat, double lmst, float ambient) { ! rz = 270.0 - UnitConversions::toDegrees(lmst); ! rx = - 90.0 + UnitConversions::toDegrees(lat); if (ambient < 0.0) ambient = 0.0; if (ambient > 1.0) ambient = 1.0; *************** *** 263,267 **** const double AstronomicalBody::_earth_radius = 6370000.0; ! const double AstronomicalBody::_earth_tilt = toRadians(23.4397); // simData::toRadians(23.4397); const double AstronomicalBody::_cos_earth_tilt = cos(_earth_tilt); const double AstronomicalBody::_sin_earth_tilt = sin(_earth_tilt); --- 261,265 ---- const double AstronomicalBody::_earth_radius = 6370000.0; ! const double AstronomicalBody::_earth_tilt = UnitConversions::toRadians(23.4397); // simData::toRadians(23.4397); const double AstronomicalBody::_cos_earth_tilt = cos(_earth_tilt); const double AstronomicalBody::_sin_earth_tilt = sin(_earth_tilt); *************** *** 276,280 **** double AstronomicalBody::refract(double h) const { double f = 0.000305 / (0.000305 + h * h); // localize effect at horizon (semi-arbitrary approx) ! return h + toRadians(0.57 * f); } --- 274,278 ---- double AstronomicalBody::refract(double h) const { double f = 0.000305 / (0.000305 + h * h); // localize effect at horizon (semi-arbitrary approx) ! return h + UnitConversions::toRadians(0.57 * f); } *************** *** 420,424 **** _beta = 0.0; ! _lambda = toRadians(slon); _pi = 0.00004263; // just taking an average orbital radius of the earth _stale = true; --- 418,422 ---- _beta = 0.0; ! _lambda = UnitConversions::toRadians(slon); _pi = 0.00004263; // just taking an average orbital radius of the earth _stale = true; *************** *** 1371,1375 **** osg::Vec4 horizon_average; for (i = 0; i < m_nlev; ++i) { ! double elev = toRadians(m_lev[i]); if (elev < 0.0) elev = 0.0; // sub horizon colors aren't correct --- 1369,1373 ---- osg::Vec4 horizon_average; for (i = 0; i < m_nlev; ++i) { ! double elev = UnitConversions::toRadians(m_lev[i]); if (elev < 0.0) elev = 0.0; // sub horizon colors aren't correct Index: tc3DWindow.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tc3DWindow.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** tc3DWindow.cpp 5 May 2005 02:14:51 -0000 1.21 --- tc3DWindow.cpp 1 Jun 2005 00:13:30 -0000 1.22 *************** *** 1179,1183 **** } ! void tc3DWindow::LoadBackgroundImage(char* fileName) { wxString fileWithPath = PrependImagePath(fileName); --- 1179,1183 ---- } ! void tc3DWindow::LoadBackgroundImage(const char* fileName) { wxString fileWithPath = PrependImagePath(fileName); *************** *** 1675,1678 **** --- 1675,1679 ---- HideUnusedObjects(); + SetBackgroundDraw(false); for (size_t n=0; n<children.size(); n++) Index: tcGameView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcGameView.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcGameView.cpp 6 May 2005 23:57:50 -0000 1.9 --- tcGameView.cpp 1 Jun 2005 00:13:30 -0000 1.10 *************** *** 47,52 **** using namespace std; - using namespace MapView; - using namespace Sensor; --- 47,50 ---- *************** *** 70,74 **** } ! MapView::teSymbol tcGameView::GetMapSymbolByClassification(int anClassification) { switch (anClassification) --- 68,72 ---- } ! teSymbol tcGameView::GetMapSymbolByClassification(int anClassification) { switch (anClassification) Index: tc3DViewer.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tc3DViewer.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tc3DViewer.cpp 17 May 2005 00:20:40 -0000 1.16 --- tc3DViewer.cpp 1 Jun 2005 00:13:30 -0000 1.17 *************** *** 1150,1154 **** void tc3DViewer::UpdateSensorModels(unsigned int alliance) { - using Sensor::tcSensorTrackIterator; tcSensorTrackIterator iter(alliance, 0xFFFF); --- 1150,1153 ---- |
|
From: Dewitt C. <ddc...@us...> - 2005-06-01 00:14:14
|
Update of /cvsroot/gcblue/gcb_wx/src/scriptinterface In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9387/src/scriptinterface Modified Files: tcFlightPortInterface.cpp tcGroupInterface.cpp tcPanelInterface.cpp tcPlatformInterface.cpp tcPlatformInterfaceExtension.cpp tcPlatformInterfaceExtensionB.cpp tcPythonInterface.cpp tcScenarioInterface.cpp tcSimPythonInterface.cpp tcSubInterface.cpp tcTrackInterface.cpp Log Message: namespace housekeeping Index: tcSubInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcSubInterface.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcSubInterface.cpp 27 Jan 2005 01:01:52 -0000 1.2 --- tcSubInterface.cpp 1 Jun 2005 00:13:32 -0000 1.3 *************** *** 40,44 **** ! namespace ScriptInterface { tcMessageInterface* tcSubInterface::messageInterface = 0; --- 40,44 ---- ! namespace scriptinterface { tcMessageInterface* tcSubInterface::messageInterface = 0; Index: tcScenarioInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcScenarioInterface.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** tcScenarioInterface.cpp 8 May 2005 23:28:59 -0000 1.26 --- tcScenarioInterface.cpp 1 Jun 2005 00:13:32 -0000 1.27 *************** *** 31,35 **** #include "tcAeroAirObject.h" #include "tcAirfieldObject.h" ! #include "tcAIData.h" #include "tcCarrierObject.h" #include "tcDirector.h" --- 31,35 ---- #include "tcAeroAirObject.h" #include "tcAirfieldObject.h" ! #include "ai/tcAIData.h" #include "tcCarrierObject.h" #include "tcDirector.h" *************** *** 61,67 **** #endif ! namespace ScriptInterface { ! using namespace AI; void tcScenarioUnit::AddOrder(tcOrder order) --- 61,67 ---- #endif ! namespace scriptinterface { ! using namespace ai; void tcScenarioUnit::AddOrder(tcOrder order) Index: tcTrackInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcTrackInterface.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcTrackInterface.cpp 6 Nov 2004 15:13:42 -0000 1.8 --- tcTrackInterface.cpp 1 Jun 2005 00:13:32 -0000 1.9 *************** *** 36,42 **** #endif - using namespace Sensor; ! namespace ScriptInterface { tcAllianceSensorMap* tcTrackInterface::mpSensorMap = NULL; --- 36,41 ---- #endif ! namespace scriptinterface { tcAllianceSensorMap* tcTrackInterface::mpSensorMap = NULL; Index: tcFlightPortInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcFlightPortInterface.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcFlightPortInterface.cpp 8 Aug 2004 00:31:34 -0000 1.6 --- tcFlightPortInterface.cpp 1 Jun 2005 00:13:32 -0000 1.7 *************** *** 41,45 **** using namespace boost::python; ! namespace ScriptInterface { --- 41,45 ---- using namespace boost::python; ! namespace scriptinterface { Index: tcPlatformInterfaceExtensionB.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPlatformInterfaceExtensionB.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** tcPlatformInterfaceExtensionB.cpp 5 May 2005 02:14:53 -0000 1.24 --- tcPlatformInterfaceExtensionB.cpp 1 Jun 2005 00:13:32 -0000 1.25 *************** *** 43,50 **** using namespace boost::python; ! using namespace AI; using ai::BlackboardInterface; ! namespace ScriptInterface { object tcPlatformInterface::InitPythonPlatformInterface() --- 43,50 ---- using namespace boost::python; ! using namespace ai; using ai::BlackboardInterface; ! namespace scriptinterface { object tcPlatformInterface::InitPythonPlatformInterface() Index: tcPlatformInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPlatformInterface.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** tcPlatformInterface.cpp 8 May 2005 23:28:58 -0000 1.45 --- tcPlatformInterface.cpp 1 Jun 2005 00:13:32 -0000 1.46 *************** *** 58,64 **** using namespace boost::python; ! using namespace AI; ! namespace ScriptInterface { std::string tcPlatformInterface::GetPlatformName() { --- 58,64 ---- using namespace boost::python; ! using namespace ai; ! namespace scriptinterface { std::string tcPlatformInterface::GetPlatformName() { Index: tcSimPythonInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcSimPythonInterface.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** tcSimPythonInterface.cpp 8 May 2005 23:28:59 -0000 1.32 --- tcSimPythonInterface.cpp 1 Jun 2005 00:13:32 -0000 1.33 *************** *** 49,55 **** using namespace boost::python; ! using namespace AI; ! namespace ScriptInterface { /** --- 49,55 ---- using namespace boost::python; ! using namespace ai; ! namespace scriptinterface { /** Index: tcPlatformInterfaceExtension.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPlatformInterfaceExtension.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tcPlatformInterfaceExtension.cpp 10 Mar 2005 03:28:29 -0000 1.16 --- tcPlatformInterfaceExtension.cpp 1 Jun 2005 00:13:32 -0000 1.17 *************** *** 38,44 **** using namespace boost::python; ! using namespace AI; ! namespace ScriptInterface { void tcPlatformInterface::InitPythonClassesA() --- 38,44 ---- using namespace boost::python; ! using namespace ai; ! namespace scriptinterface { void tcPlatformInterface::InitPythonClassesA() Index: tcGroupInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcGroupInterface.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcGroupInterface.cpp 10 Jan 2005 00:30:54 -0000 1.2 --- tcGroupInterface.cpp 1 Jun 2005 00:13:32 -0000 1.3 *************** *** 37,41 **** #endif ! namespace ScriptInterface { tcSimState* tcGroupInterface::simState = NULL; --- 37,41 ---- #endif ! namespace scriptinterface { tcSimState* tcGroupInterface::simState = NULL; Index: tcPanelInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPanelInterface.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcPanelInterface.cpp 8 Aug 2004 00:31:34 -0000 1.5 --- tcPanelInterface.cpp 1 Jun 2005 00:13:32 -0000 1.6 *************** *** 37,41 **** #endif ! namespace ScriptInterface { void tcPanelInterface::AddItem(std::string caption, std::string command, --- 37,41 ---- #endif ! namespace scriptinterface { void tcPanelInterface::AddItem(std::string caption, std::string command, Index: tcPythonInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPythonInterface.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcPythonInterface.cpp 8 Aug 2004 00:31:34 -0000 1.7 --- tcPythonInterface.cpp 1 Jun 2005 00:13:32 -0000 1.8 *************** *** 33,37 **** #include <boost/python.hpp> using namespace boost::python; ! using namespace ScriptInterface; #ifdef _DEBUG --- 33,37 ---- #include <boost/python.hpp> using namespace boost::python; ! using namespace scriptinterface; #ifdef _DEBUG |
|
From: Dewitt C. <ddc...@us...> - 2005-06-01 00:14:13
|
Update of /cvsroot/gcblue/gcb_wx/src/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9387/src/network Modified Files: tcMultiplayerInterface.cpp Log Message: namespace housekeeping Index: tcMultiplayerInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/network/tcMultiplayerInterface.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** tcMultiplayerInterface.cpp 8 May 2005 23:28:58 -0000 1.27 --- tcMultiplayerInterface.cpp 1 Jun 2005 00:13:31 -0000 1.28 *************** *** 745,749 **** wxASSERT(IsServer()); ! using ScriptInterface::tcScenarioInterface; tcScenarioInterface* scenarioInterface = tcSimPythonInterface::Get()->GetScenarioInterface(); wxASSERT(scenarioInterface); --- 745,749 ---- wxASSERT(IsServer()); ! using scriptinterface::tcScenarioInterface; tcScenarioInterface* scenarioInterface = tcSimPythonInterface::Get()->GetScenarioInterface(); wxASSERT(scenarioInterface); |
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9387/include/sim Modified Files: Game.h tcAero.h tcAeroAirObject.h tcBallisticWeapon.h tcDirector.h tcDirectorEvent.h tcESMSensor.h tcFlightOpsObject.h tcFlightPort.h tcGameObject.h tcLauncher.h tcLauncherState.h tcMissileObject.h tcObjectControl.h tcOpticalSensor.h tcPlatformObject.h tcRadar.h tcSensorMap.h tcSensorMapTrack.h tcSensorPlatform.h tcSensorState.h tcSensorTrackIterator.h tcSimState.h tcSonar.h tcSonobuoy.h tcStores.h tcSurfaceObject.h tcTorpedoObject.h tcWeaponObject.h Removed Files: tcAIData.h Log Message: namespace housekeeping Index: tcFlightOpsObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcFlightOpsObject.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcFlightOpsObject.h 29 Apr 2005 18:52:02 -0000 1.5 --- tcFlightOpsObject.h 1 Jun 2005 00:13:28 -0000 1.6 *************** *** 39,43 **** class tcUpdateStream; ! namespace Database { class tcDatabase; --- 39,43 ---- class tcUpdateStream; ! namespace database { class tcDatabase; *************** *** 89,93 **** virtual ~tcFlightOpsObject(); private: ! static Database::tcDatabase* database; tcFlightPort flight_deck; tcGameObject* gameObj; ///< to avoid (some) virtual inheritance inefficiency --- 89,93 ---- virtual ~tcFlightOpsObject(); private: ! static database::tcDatabase* database; tcFlightPort flight_deck; tcGameObject* gameObj; ///< to avoid (some) virtual inheritance inefficiency Index: tcDirector.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcDirector.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcDirector.h 7 Oct 2004 22:01:12 -0000 1.9 --- tcDirector.h 1 Jun 2005 00:13:28 -0000 1.10 *************** *** 36,48 **** class tc3DViewer; ! ! namespace MapView ! { ! class tcTacticalMapView; ! class tcWorldMapView; ! } ! ! using MapView::tcTacticalMapView; ! using MapView::tcWorldMapView; --- 36,41 ---- class tc3DViewer; ! class tcTacticalMapView; ! class tcWorldMapView; Index: tcTorpedoObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcTorpedoObject.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcTorpedoObject.h 24 Feb 2005 22:19:14 -0000 1.3 --- tcTorpedoObject.h 1 Jun 2005 00:13:28 -0000 1.4 *************** *** 34,38 **** class tcUpdateStream; ! namespace Database { class tcTorpedoDBObject; --- 34,38 ---- class tcUpdateStream; ! namespace database { class tcTorpedoDBObject; Index: tcOpticalSensor.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcOpticalSensor.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcOpticalSensor.h 23 Nov 2004 23:30:50 -0000 1.2 --- tcOpticalSensor.h 1 Jun 2005 00:13:28 -0000 1.3 *************** *** 31,35 **** #include <vector> ! using Database::tcOpticalDBObject; class tcGameObject; --- 31,35 ---- #include <vector> ! using database::tcOpticalDBObject; class tcGameObject; Index: tcSimState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSimState.h,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** tcSimState.h 8 May 2005 23:27:57 -0000 1.40 --- tcSimState.h 1 Jun 2005 00:13:28 -0000 1.41 *************** *** 52,63 **** #endif ! namespace ScriptInterface { class tcSimPythonInterface; } ! using namespace Aero; ! using namespace Sensor; ! using namespace ScriptInterface; class tcCommandQueue; --- 52,61 ---- #endif ! namespace scriptinterface { class tcSimPythonInterface; } ! using namespace scriptinterface; class tcCommandQueue; Index: Game.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/Game.h,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** Game.h 26 May 2005 11:53:37 -0000 1.57 --- Game.h 1 Jun 2005 00:13:28 -0000 1.58 *************** *** 52,56 **** ! namespace ScriptInterface { tcSimPythonInterface; --- 52,56 ---- ! namespace scriptinterface { tcSimPythonInterface; *************** *** 72,77 **** class tc3DWindow; ! using namespace ScriptInterface; ! using namespace MapView; --- 72,76 ---- class tc3DWindow; ! using namespace scriptinterface; Index: tcSonar.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSonar.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcSonar.h 7 Mar 2005 01:54:18 -0000 1.3 --- tcSonar.h 1 Jun 2005 00:13:28 -0000 1.4 *************** *** 30,39 **** #include <vector> ! namespace Database { class tcSonarDBObject; } ! using Database::tcSonarDBObject; --- 30,39 ---- #include <vector> ! namespace database { class tcSonarDBObject; } ! using database::tcSonarDBObject; Index: tcObjectControl.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcObjectControl.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** tcObjectControl.h 29 Mar 2005 00:12:24 -0000 1.15 --- tcObjectControl.h 1 Jun 2005 00:13:28 -0000 1.16 *************** *** 52,56 **** } ! namespace Database { class tcDatabaseObject; --- 52,56 ---- } ! namespace database { class tcDatabaseObject; *************** *** 63,67 **** using ai::Brain; ! using Database::tcDatabaseObject; --- 63,67 ---- using ai::Brain; ! using database::tcDatabaseObject; Index: tcSensorMapTrack.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorMapTrack.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcSensorMapTrack.h 17 May 2005 00:20:39 -0000 1.1 --- tcSensorMapTrack.h 1 Jun 2005 00:13:28 -0000 1.2 *************** *** 35,43 **** class tcUpdateStream; ! namespace Database { class tcDatabase; } ! using Database::tcDatabase; /** --- 35,43 ---- class tcUpdateStream; ! namespace database { class tcDatabase; } ! using database::tcDatabase; /** *************** *** 45,193 **** * that needs refactoring. */ ! namespace Sensor { ! /** ! * stores all state information needed by sensor for surveillance tracks ! */ ! class tcSensorReport { ! public: ! float mfLon_rad; ! float mfLat_rad; ! float mfAlt_m; ! float mfSpeed_kts; ! float mfHeading_rad; ! double mfTimestamp; ! double mfStartTime; ///< birth time of track from report ! long mnTrackID; ! long trackDatabaseID; ///< database id of track (usually from visual ident), -1 is unknown ! long mnSensorPlatformID; ///< id of contributing sensor ! UINT8 mnFlags; ! std::vector<UINT32> maEmitter; ! unsigned mbClassified : 1; ! unsigned isIdentified : 1; ! ! void Clear() ! { ! mfLon_rad=0;mfLat_rad=0;mfAlt_m=0; ! mfSpeed_kts=0;mfHeading_rad=0; ! mfTimestamp=0;mfStartTime=0; ! mfStartTime = 0; ! mnTrackID = -1; ! mnSensorPlatformID = -1; ! mnFlags=0; ! mbClassified = 0; ! isIdentified = 0; ! } ! bool IsIdentified() const {return isIdentified != 0;} ! bool IsNew() {return (mfTimestamp == 0);} ! }; ! struct tsEmitterInfo ! { ! tnPoolIndex mnEmitterID; ///< database ID of emitter ! double mfTimestamp; ! int mnMode; ! }; ! /** ! * State info for track stored in alliance sensor map. ! * The targetedRating is used by the AI to avoid inefficient ganging up on track. ! * engageRating controls how much ordance ! */ ! class tcSensorMapTrack : public tcTrack ! { ! enum {MAX_SENSOR_REPORTS = 2, MAX_EMITTERS = 4}; ! public: ! tcSensorReport maSensorReport[MAX_SENSOR_REPORTS]; ///< most recent data from contributing sensors ! int mnContributors; ! tsEmitterInfo maEmitterInfo[MAX_EMITTERS]; ! int mnEmitters; ! long mnDatabaseID; ///< database ID of track, -1 for unknown ! float assessedDamage; ! std::vector<long> intercepts; ///< vector of platform ids that are intercepting this track ! std::vector<long> engaged; ///< vector of weapon ids that are tracking / engaging ! std::vector<long> ambiguityList; ///< vector of platform ids consistent with detected emitters ! static unsigned int ambiguityListUpdates; ! /// called to indicate weapon launched at target ! bool AddEngagement(long id); ! /// called to indicate platform intercepting target ! bool AddIntercept(long id); ! bool AddReport(const tcSensorReport& report); ! void RemoveReport(int n); ! ///< static method to set pointer to tcSimState object ! static void AttachDatabase(tcDatabase* db) {database = db;} ! static void AttachSimState(tcSimState* ss) {simState = ss;} ! virtual void Clear(); ! int GetEmitterCount() {return mnEmitters;} ! const tsEmitterInfo* GetEmitter(int anIdx) ! { ! if ((anIdx < 0)||(anIdx >= mnEmitters)) {return NULL;} ! return &maEmitterInfo[anIdx]; ! } ! /// gets number of weapons engaging this track ! unsigned GetEngagedCount() const; ! /// gets number of platforms intercepting this track ! unsigned GetInterceptCount() const; ! unsigned GetContributorCount() const; ! const char* GetContributorName(unsigned idx) const; ! ! tc3DModel* GetModel() const; ! void SetModel(tc3DModel* model_); ! const tcTrack* GetTrack() {return this;} ! bool IsNew() {return mfTimestamp == 0;} ! bool IsDestroyed() const; ! bool IsStale() const; ! void MarkDestroyed(); ! void MarkStale(); ! void ClearStale(); ! bool UpdateActiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID); ! void UpdateAmbiguityList(); ! void UpdateClassification(UINT16 mnClassification, teAffiliation meAffiliation, ! tnPoolIndex databaseID); ! bool UpdateEmitter(tsEmitterInfo*& rpEmitterInfo, tnPoolIndex anEmitterID); ! /// removes engagement ids for weapons no longer engaging this track ! void UpdateEngagements(); ! /// removes intercept ids for platforms no longer intercepting this track ! void UpdateIntercepts(); ! bool UpdatePassiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID); ! void UpdateTrack(); - tcUpdateStream& operator<<(tcUpdateStream& stream); - tcUpdateStream& operator>>(tcUpdateStream& stream); ! tcSensorMapTrack* operator= (tcSensorMapTrack *pa) {return pa;} ! tcSensorMapTrack& operator= (const tcSensorMapTrack&); ! tcSensorMapTrack(const tcSensorMapTrack& src); ! tcSensorMapTrack(); ! ~tcSensorMapTrack(); - static void SetAutoKillAssess(bool state); - private: - static tcSimState* simState; - static tcDatabase* database; - static bool autoKillAssess; ///< set to true to automatically mark destroyed tracks - enum {TRACK_STALE = 1, TRACK_DESTROYED = 2}; - unsigned char sensorFlags; ///< 1 - stale, 2 - destroyed - tc3DModel* model; - void KillAssess(); - }; - } #endif --- 45,192 ---- * that needs refactoring. */ ! ! ! /** ! * stores all state information needed by sensor for surveillance tracks ! */ ! class tcSensorReport { + public: + float mfLon_rad; + float mfLat_rad; + float mfAlt_m; + float mfSpeed_kts; + float mfHeading_rad; + double mfTimestamp; + double mfStartTime; ///< birth time of track from report + long mnTrackID; + long trackDatabaseID; ///< database id of track (usually from visual ident), -1 is unknown + long mnSensorPlatformID; ///< id of contributing sensor + UINT8 mnFlags; + std::vector<UINT32> maEmitter; + unsigned mbClassified : 1; + unsigned isIdentified : 1; ! void Clear() { ! mfLon_rad=0;mfLat_rad=0;mfAlt_m=0; ! mfSpeed_kts=0;mfHeading_rad=0; ! mfTimestamp=0;mfStartTime=0; ! mfStartTime = 0; ! mnTrackID = -1; ! mnSensorPlatformID = -1; ! mnFlags=0; ! mbClassified = 0; ! isIdentified = 0; ! } ! bool IsIdentified() const {return isIdentified != 0;} ! bool IsNew() {return (mfTimestamp == 0);} ! }; ! struct tsEmitterInfo ! { ! tnPoolIndex mnEmitterID; ///< database ID of emitter ! double mfTimestamp; ! int mnMode; ! }; ! /** ! * State info for track stored in alliance sensor map. ! * The targetedRating is used by the AI to avoid inefficient ganging up on track. ! * engageRating controls how much ordance ! */ ! class tcSensorMapTrack : public tcTrack ! { ! enum {MAX_SENSOR_REPORTS = 2, MAX_EMITTERS = 4}; ! public: ! tcSensorReport maSensorReport[MAX_SENSOR_REPORTS]; ///< most recent data from contributing sensors ! int mnContributors; ! tsEmitterInfo maEmitterInfo[MAX_EMITTERS]; ! int mnEmitters; ! long mnDatabaseID; ///< database ID of track, -1 for unknown ! float assessedDamage; ! std::vector<long> intercepts; ///< vector of platform ids that are intercepting this track ! std::vector<long> engaged; ///< vector of weapon ids that are tracking / engaging ! std::vector<long> ambiguityList; ///< vector of platform ids consistent with detected emitters ! static unsigned int ambiguityListUpdates; ! /// called to indicate weapon launched at target ! bool AddEngagement(long id); ! /// called to indicate platform intercepting target ! bool AddIntercept(long id); ! bool AddReport(const tcSensorReport& report); ! void RemoveReport(int n); ! ///< static method to set pointer to tcSimState object ! static void AttachDatabase(tcDatabase* db) {database = db;} ! static void AttachSimState(tcSimState* ss) {simState = ss;} ! virtual void Clear(); ! int GetEmitterCount() {return mnEmitters;} ! const tsEmitterInfo* GetEmitter(int anIdx) ! { ! if ((anIdx < 0)||(anIdx >= mnEmitters)) {return NULL;} ! return &maEmitterInfo[anIdx]; ! } ! /// gets number of weapons engaging this track ! unsigned GetEngagedCount() const; ! /// gets number of platforms intercepting this track ! unsigned GetInterceptCount() const; ! unsigned GetContributorCount() const; ! const char* GetContributorName(unsigned idx) const; ! tc3DModel* GetModel() const; ! void SetModel(tc3DModel* model_); ! const tcTrack* GetTrack() {return this;} ! bool IsNew() {return mfTimestamp == 0;} ! bool IsDestroyed() const; ! bool IsStale() const; ! void MarkDestroyed(); ! void MarkStale(); ! void ClearStale(); ! bool UpdateActiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID); ! void UpdateAmbiguityList(); ! void UpdateClassification(UINT16 mnClassification, teAffiliation meAffiliation, ! tnPoolIndex databaseID); ! bool UpdateEmitter(tsEmitterInfo*& rpEmitterInfo, tnPoolIndex anEmitterID); ! /// removes engagement ids for weapons no longer engaging this track ! void UpdateEngagements(); ! /// removes intercept ids for platforms no longer intercepting this track ! void UpdateIntercepts(); + bool UpdatePassiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID); + void UpdateTrack(); ! tcUpdateStream& operator<<(tcUpdateStream& stream); ! tcUpdateStream& operator>>(tcUpdateStream& stream); ! ! tcSensorMapTrack* operator= (tcSensorMapTrack *pa) {return pa;} ! tcSensorMapTrack& operator= (const tcSensorMapTrack&); ! tcSensorMapTrack(const tcSensorMapTrack& src); ! tcSensorMapTrack(); ! ~tcSensorMapTrack(); ! ! static void SetAutoKillAssess(bool state); ! private: ! static tcSimState* simState; ! static tcDatabase* database; ! static bool autoKillAssess; ///< set to true to automatically mark destroyed tracks ! enum {TRACK_STALE = 1, TRACK_DESTROYED = 2}; ! unsigned char sensorFlags; ///< 1 - stale, 2 - destroyed ! tc3DModel* model; ! void KillAssess(); ! }; #endif Index: tcSensorTrackIterator.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorTrackIterator.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcSensorTrackIterator.h 17 May 2005 00:20:39 -0000 1.2 --- tcSensorTrackIterator.h 1 Jun 2005 00:13:28 -0000 1.3 *************** *** 31,38 **** class tcSimState; - - namespace Sensor - { - class tcSensorMapTrack; class tcAllianceSensorMap; --- 31,34 ---- *************** *** 73,76 **** }; ! } #endif \ No newline at end of file --- 69,72 ---- }; ! #endif \ No newline at end of file Index: tcWeaponObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcWeaponObject.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcWeaponObject.h 25 Mar 2005 03:48:06 -0000 1.8 --- tcWeaponObject.h 1 Jun 2005 00:13:28 -0000 1.9 *************** *** 31,35 **** class tcUpdateStream; ! namespace Database { class tcWeaponDBObject; --- 31,35 ---- class tcUpdateStream; ! namespace database { class tcWeaponDBObject; Index: tcLauncher.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcLauncher.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** tcLauncher.h 21 May 2005 02:00:28 -0000 1.15 --- tcLauncher.h 1 Jun 2005 00:13:28 -0000 1.16 *************** *** 31,35 **** #include <vector> ! namespace Database { class tcDatabase; --- 31,35 ---- #include <vector> ! namespace database { class tcDatabase; *************** *** 39,43 **** } ! using namespace Database; class tcGameObject; --- 39,43 ---- } ! using namespace database; class tcGameObject; Index: tcLauncherState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcLauncherState.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** tcLauncherState.h 17 Apr 2005 22:35:00 -0000 1.15 --- tcLauncherState.h 1 Jun 2005 00:13:28 -0000 1.16 *************** *** 32,36 **** #include <vector> ! namespace Database { class tcDatabase; --- 32,36 ---- #include <vector> ! namespace database { class tcDatabase; *************** *** 40,44 **** } ! using namespace Database; class tcGameObject; --- 40,44 ---- } ! using namespace database; class tcGameObject; Index: tcRadar.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcRadar.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tcRadar.h 21 May 2005 02:00:28 -0000 1.14 --- tcRadar.h 1 Jun 2005 00:13:28 -0000 1.15 *************** *** 32,40 **** #include <vector> ! namespace Database { class tcRadarDBObject; } ! using Database::tcRadarDBObject; /* --- 32,40 ---- #include <vector> ! namespace database { class tcRadarDBObject; } ! using database::tcRadarDBObject; /* Index: tcPlatformObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcPlatformObject.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** tcPlatformObject.h 5 May 2005 02:14:20 -0000 1.28 --- tcPlatformObject.h 1 Jun 2005 00:13:28 -0000 1.29 *************** *** 32,38 **** #include "tcSensorPlatform.h" #include "tcCommandObject.h" ! #include "tcAIData.h" ! using namespace AI; --- 32,38 ---- #include "tcSensorPlatform.h" #include "tcCommandObject.h" ! #include "ai/tcAIData.h" ! using namespace ai; *************** *** 44,48 **** class tcStores; ! namespace Database { class tcGenericDBObject; --- 44,48 ---- class tcStores; ! namespace database { class tcGenericDBObject; Index: tcBallisticWeapon.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcBallisticWeapon.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcBallisticWeapon.h 25 Mar 2005 03:48:06 -0000 1.6 --- tcBallisticWeapon.h 1 Jun 2005 00:13:28 -0000 1.7 *************** *** 29,33 **** ! namespace Database { class tcBallisticDBObject; --- 29,33 ---- ! namespace database { class tcBallisticDBObject; Index: tcAero.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcAero.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcAero.h 17 Aug 2004 02:22:56 -0000 1.6 --- tcAero.h 1 Jun 2005 00:13:28 -0000 1.7 *************** *** 35,57 **** class tcStream; ! namespace Aero { ! struct tsMissileKState ! { ! float mfFlightTime; ! float mfSpeed_mps; ///< speed through air ! float mfGroundSpeed_mps; ///< speed along ground ! float mfPitch_rad; ! float mfHeading_rad; ! float mfAltitude_m; ! float mfHeadingControl; ///< [-1,1] heading rate control input ! tcStream& operator<<(tcStream& stream); ! tcStream& operator>>(tcStream& stream); ! }; ! float GetSoundSpeed(float afAltitude_m); ! float GetAirDensity(float afAltitude_m); ! void UpdateMissileKState(tsMissileKState& k, Database::tcMissileDBObject *apMissileData, float afTimeStep); }; --- 35,58 ---- class tcStream; ! class Aero { ! public: ! struct tsMissileKState ! { ! float mfFlightTime; ! float mfSpeed_mps; ///< speed through air ! float mfGroundSpeed_mps; ///< speed along ground ! float mfPitch_rad; ! float mfHeading_rad; ! float mfAltitude_m; ! float mfHeadingControl; ///< [-1,1] heading rate control input ! tcStream& operator<<(tcStream& stream); ! tcStream& operator>>(tcStream& stream); ! }; ! static float GetSoundSpeed(float afAltitude_m); ! static float GetAirDensity(float afAltitude_m); ! static void UpdateMissileKState(tsMissileKState& k, database::tcMissileDBObject *apMissileData, float afTimeStep); }; Index: tcSonobuoy.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSonobuoy.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcSonobuoy.h 5 Mar 2005 22:37:51 -0000 1.1 --- tcSonobuoy.h 1 Jun 2005 00:13:28 -0000 1.2 *************** *** 30,38 **** #include "tcSensorPlatform.h" ! namespace Database { class tcSonobuoyDBObject; } ! using Database::tcSonobuoyDBObject; class tcGameObject; --- 30,38 ---- #include "tcSensorPlatform.h" ! namespace database { class tcSonobuoyDBObject; } ! using database::tcSonobuoyDBObject; class tcGameObject; --- tcAIData.h DELETED --- Index: tcFlightPort.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcFlightPort.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tcFlightPort.h 10 May 2005 02:25:46 -0000 1.11 --- tcFlightPort.h 1 Jun 2005 00:13:28 -0000 1.12 *************** *** 32,36 **** class tcUpdateStream; ! namespace Database { class tcFlightportDBObject; --- 32,36 ---- class tcUpdateStream; ! namespace database { class tcFlightportDBObject; *************** *** 122,126 **** std::vector<tsSpotInfo>* GetLocVector(teLocation loc); ! void InitFromDatabase(Database::tcFlightportDBObject *dbObj); void InitRelPos(tcAirState *airstate); bool IsHeloOnly() const; --- 122,126 ---- std::vector<tsSpotInfo>* GetLocVector(teLocation loc); ! void InitFromDatabase(database::tcFlightportDBObject *dbObj); void InitRelPos(tcAirState *airstate); bool IsHeloOnly() const; Index: tcESMSensor.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcESMSensor.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcESMSensor.h 23 Nov 2004 23:30:47 -0000 1.7 --- tcESMSensor.h 1 Jun 2005 00:13:28 -0000 1.8 *************** *** 33,37 **** class tcStream; ! using namespace Database; /** --- 33,37 ---- class tcStream; ! using namespace database; /** Index: tcAeroAirObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcAeroAirObject.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcAeroAirObject.h 26 May 2005 11:53:37 -0000 1.12 --- tcAeroAirObject.h 1 Jun 2005 00:13:28 -0000 1.13 *************** *** 27,31 **** #include "tcAirObject.h" ! namespace Database { class tcAirDBObject; --- 27,31 ---- #include "tcAirObject.h" ! namespace database { class tcAirDBObject; Index: tcGameObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcGameObject.h,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** tcGameObject.h 21 May 2005 02:00:28 -0000 1.38 --- tcGameObject.h 1 Jun 2005 00:13:28 -0000 1.39 *************** *** 43,47 **** class tcMapData; ! namespace Database { class tcDatabase; --- 43,47 ---- class tcMapData; ! namespace database { class tcDatabase; *************** *** 174,178 **** static bool IsClientMode() {return clientMode;} static void SetClientMode(bool state) {clientMode = state;} ! static void SetGameObjectDatabase(Database::tcDatabase *db) {database = db;} static void SetGameObjectMapData(tcMapData *md) {mapData = md;} static void SetHookedId(long id) {hookedId = id;} --- 174,178 ---- static bool IsClientMode() {return clientMode;} static void SetClientMode(bool state) {clientMode = state;} ! static void SetGameObjectDatabase(database::tcDatabase *db) {database = db;} static void SetGameObjectMapData(tcMapData *md) {mapData = md;} static void SetHookedId(long id) {hookedId = id;} *************** *** 186,190 **** bool recreateFlag; ///< workaround, true to resend create request for obj (multiplayer client only) static tcMapData *mapData; ! static Database::tcDatabase *database; static tcSimState *simState; static long hookedId; ///< id hooked by user, used for messaging only --- 186,190 ---- bool recreateFlag; ///< workaround, true to resend create request for obj (multiplayer client only) static tcMapData *mapData; ! static database::tcDatabase *database; static tcSimState *simState; static long hookedId; ///< id hooked by user, used for messaging only Index: tcStores.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcStores.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcStores.h 21 May 2005 02:00:28 -0000 1.2 --- tcStores.h 1 Jun 2005 00:13:28 -0000 1.3 *************** *** 30,39 **** #include <vector> ! namespace Database { class tcStoresDBObject; } ! using namespace Database; class tcGameObject; --- 30,39 ---- #include <vector> ! namespace database { class tcStoresDBObject; } ! using namespace database; class tcGameObject; Index: tcMissileObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcMissileObject.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcMissileObject.h 29 Mar 2005 00:12:24 -0000 1.17 --- tcMissileObject.h 1 Jun 2005 00:13:28 -0000 1.18 *************** *** 30,34 **** #include "tcRadar.h" - using namespace Aero; class tcUpdateStream; --- 30,33 ---- *************** *** 57,61 **** UINT mnCurrentSegment; tcRadar mcSensorState; ! tsMissileKState msKState; tcMissileDBObject *mpDBObject; // pointer to valid database obj --- 56,60 ---- UINT mnCurrentSegment; tcRadar mcSensorState; ! Aero::tsMissileKState msKState; tcMissileDBObject *mpDBObject; // pointer to valid database obj Index: tcSensorMap.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorMap.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tcSensorMap.h 17 May 2005 00:20:39 -0000 1.14 --- tcSensorMap.h 1 Jun 2005 00:13:28 -0000 1.15 *************** *** 38,46 **** class tcUpdateStream; ! namespace Database { class tcDatabase; } ! using Database::tcDatabase; /** --- 38,46 ---- class tcUpdateStream; ! namespace database { class tcDatabase; } ! using database::tcDatabase; /** *************** *** 48,133 **** * that needs refactoring. */ ! namespace Sensor { ! class tcAllianceSensorMap ! { ! enum {MAX_SMTRACKS = 512, MAX_TRACKS = 512}; ! public: ! unsigned int GetAlliance() const; ! int GetTrackCount(); ! tnPoolIndex GetStartTrackPosition(); ! void GetNextTrack(tnPoolIndex& pos, tcSensorMapTrack*& pTrack); ! void Clear(); ! void DropTrack(tnPoolIndex anID); ! ! bool AddReport(const tcSensorReport& report); ! bool UpdateActiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, ! tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack); ! bool UpdatePassiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, ! tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack); ! ! void Update(double afStatusTime); ! tcSensorMapTrack* GetSensorMapTrack(long anTrackID); ! bool GetTrack(long anTrackID, tcTrack& track); ! int Serialize(tcFile& file, bool mbLoad); - tcUpdateStream& operator<<(tcUpdateStream& stream); - tcUpdateStream& operator>>(tcUpdateStream& stream); ! tcAllianceSensorMap(unsigned int mapAlliance); ! virtual ~tcAllianceSensorMap(); ! private: ! tcPool<tcSensorMapTrack,MAX_SMTRACKS> maTrack; ! tnPoolIndex maTrackToSensorTrack[MAX_TRACKS]; ! double mfPreviousStatusTime; ! double lastEngagementsUpdate; ! const unsigned int alliance; ! float ageOutTime; ///< time to drop track ! float staleTime; ///< time to indicate track as stale ! }; ! /** ! * holds tcAllianceSensorMaps for all alliances ! * @see tcAllianceSensorMap ! */ ! class tcSensorMap ! { ! enum {MAX_MAPS = 4, MAX_ALLIANCES = 256}; ! public: ! int GetTrackCount(UINT8 anAlliance); ! tnPoolIndex GetStartTrackPosition(UINT8 anAlliance); ! void GetNextTrack(tnPoolIndex& pos, tcSensorMapTrack*& pTrack, UINT8 anAlliance); ! tcAllianceSensorMap* GetMap(UINT8 anAlliance); ! tcAllianceSensorMap* GetOrCreateMap(UINT8 alliance); ! void CreateMapForAlliance(UINT8 anAlliance); ! bool AddReport(const tcSensorReport& report, UINT8 anAlliance); ! bool UpdateActiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, ! tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack, UINT8 anAlliance); ! bool UpdatePassiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, ! tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack, UINT8 anAlliance); ! void Clear(); ! void Update(double afStatusTime); ! tcSensorMapTrack* GetSensorMapTrack(long anTrackID, UINT8 anAlliance); ! bool GetTrack(unsigned long anTrackID, tcTrack& track, UINT8 anAlliance); ! int Serialize(tcFile& file, bool mbLoad); ! bool Test(); - tcSensorMap(); - virtual ~tcSensorMap(); - private: - tcAllianceSensorMap* mapMap[MAX_MAPS]; - int mnMaps; - int maMapIdxForAlliance[MAX_ALLIANCES]; - }; - } #endif // _SENSORMAP_H_ --- 48,128 ---- * that needs refactoring. */ ! class tcAllianceSensorMap { + enum {MAX_SMTRACKS = 512, MAX_TRACKS = 512}; + public: + unsigned int GetAlliance() const; + int GetTrackCount(); + tnPoolIndex GetStartTrackPosition(); + void GetNextTrack(tnPoolIndex& pos, tcSensorMapTrack*& pTrack); + void Clear(); + void DropTrack(tnPoolIndex anID); + bool AddReport(const tcSensorReport& report); + bool UpdateActiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, + tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack); + bool UpdatePassiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, + tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack); + void Update(double afStatusTime); + tcSensorMapTrack* GetSensorMapTrack(long anTrackID); + bool GetTrack(long anTrackID, tcTrack& track); + int Serialize(tcFile& file, bool mbLoad); ! tcUpdateStream& operator<<(tcUpdateStream& stream); ! tcUpdateStream& operator>>(tcUpdateStream& stream); + tcAllianceSensorMap(unsigned int mapAlliance); + virtual ~tcAllianceSensorMap(); + private: + tcPool<tcSensorMapTrack,MAX_SMTRACKS> maTrack; + tnPoolIndex maTrackToSensorTrack[MAX_TRACKS]; + double mfPreviousStatusTime; + double lastEngagementsUpdate; + const unsigned int alliance; + float ageOutTime; ///< time to drop track + float staleTime; ///< time to indicate track as stale + }; ! /** ! * holds tcAllianceSensorMaps for all alliances ! * @see tcAllianceSensorMap ! */ ! class tcSensorMap ! { ! enum {MAX_MAPS = 4, MAX_ALLIANCES = 256}; ! public: ! int GetTrackCount(UINT8 anAlliance); ! tnPoolIndex GetStartTrackPosition(UINT8 anAlliance); ! void GetNextTrack(tnPoolIndex& pos, tcSensorMapTrack*& pTrack, UINT8 anAlliance); ! tcAllianceSensorMap* GetMap(UINT8 anAlliance); ! tcAllianceSensorMap* GetOrCreateMap(UINT8 alliance); ! void CreateMapForAlliance(UINT8 anAlliance); ! bool AddReport(const tcSensorReport& report, UINT8 anAlliance); ! bool UpdateActiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, ! tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack, UINT8 anAlliance); ! bool UpdatePassiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID, ! tnPoolIndex anTrackID, tcSensorMapTrack*& rpSMTrack, UINT8 anAlliance); ! void Clear(); ! void Update(double afStatusTime); ! tcSensorMapTrack* GetSensorMapTrack(long anTrackID, UINT8 anAlliance); ! bool GetTrack(unsigned long anTrackID, tcTrack& track, UINT8 anAlliance); ! int Serialize(tcFile& file, bool mbLoad); ! bool Test(); ! tcSensorMap(); ! virtual ~tcSensorMap(); ! private: ! tcAllianceSensorMap* mapMap[MAX_MAPS]; ! int mnMaps; ! int maMapIdxForAlliance[MAX_ALLIANCES]; + }; #endif // _SENSORMAP_H_ Index: tcDirectorEvent.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcDirectorEvent.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcDirectorEvent.h 27 Jan 2005 01:01:46 -0000 1.12 --- tcDirectorEvent.h 1 Jun 2005 00:13:28 -0000 1.13 *************** *** 36,44 **** class tcMapObject; ! namespace MapView ! { ! class tcTacticalMapView; ! class tcWorldMapView; ! } class tcConsoleBox; --- 36,41 ---- class tcMapObject; ! class tcTacticalMapView; ! class tcWorldMapView; class tcConsoleBox; *************** *** 55,61 **** } - using MapView::tcTacticalMapView; - using MapView::tcWorldMapView; - /** * Base class for time-tagged camera or game events to support cut scenes and --- 52,55 ---- Index: tcSensorState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorState.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcSensorState.h 21 May 2005 02:00:28 -0000 1.17 --- tcSensorState.h 1 Jun 2005 00:13:28 -0000 1.18 *************** *** 30,34 **** #include "simmath.h" ! namespace Database { class tcDatabase; --- 30,34 ---- #include "simmath.h" ! namespace database { class tcDatabase; *************** *** 36,41 **** } ! using Database::tcDatabase; ! using Database::tcSensorDBObject; #define SSMODE_SURVEILLANCE 1 ///< surveillance or both FC and surveillance --- 36,41 ---- } ! using database::tcDatabase; ! using database::tcSensorDBObject; #define SSMODE_SURVEILLANCE 1 ///< surveillance or both FC and surveillance Index: tcSensorPlatform.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorPlatform.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcSensorPlatform.h 17 Apr 2005 22:35:00 -0000 1.2 --- tcSensorPlatform.h 1 Jun 2005 00:13:28 -0000 1.3 *************** *** 41,50 **** class tcGameObject; ! namespace Database { class tcSensorPlatformDBObject; } ! using Database::tcSensorPlatformDBObject; /** --- 41,50 ---- class tcGameObject; ! namespace database { class tcSensorPlatformDBObject; } ! using database::tcSensorPlatformDBObject; /** Index: tcSurfaceObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSurfaceObject.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcSurfaceObject.h 8 Mar 2005 00:41:48 -0000 1.10 --- tcSurfaceObject.h 1 Jun 2005 00:13:28 -0000 1.11 *************** *** 29,33 **** #include "tcPlatformObject.h" ! namespace Database { class tcGenericDBObject; --- 29,33 ---- #include "tcPlatformObject.h" ! namespace database { class tcGenericDBObject; |
Update of /cvsroot/gcblue/gcb_wx/include/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9387/include/database Modified Files: CsvTranslator.h tcAirDBObject.h tcBallisticDBObject.h tcDBObjSerializer.h tcDBObjSerializerSql.h tcDBString.h tcDatabase.h tcDatabaseIterator.h tcDatabaseObject.h tcESMDBObject.h tcFixedDBObject.h tcFlightportDBObject.h tcGenericDBObject.h tcLauncherDBObject.h tcMissileDBObject.h tcOpticalDBObject.h tcRadarDBObject.h tcSensorDBObject.h tcSensorPlatformDBObject.h tcSonarDBObject.h tcSonobuoyDBObject.h tcSqlReader.h tcStoresDBObject.h tcTorpedoDBObject.h tcWeaponDBObject.h Log Message: namespace housekeeping Index: tcDatabaseIterator.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcDatabaseIterator.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcDatabaseIterator.h 6 Nov 2004 15:13:39 -0000 1.1 --- tcDatabaseIterator.h 1 Jun 2005 00:13:26 -0000 1.2 *************** *** 29,33 **** #include "simmath.h" ! namespace Database { class tcDatabase; --- 29,33 ---- #include "simmath.h" ! namespace database { class tcDatabase; Index: tcRadarDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcRadarDBObject.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcRadarDBObject.h 2 Dec 2004 04:17:23 -0000 1.12 --- tcRadarDBObject.h 1 Jun 2005 00:13:26 -0000 1.13 *************** *** 31,35 **** class TiXmlElement; ! namespace Database { class tcSqlReader; --- 31,35 ---- class TiXmlElement; ! namespace database { class tcSqlReader; *************** *** 66,70 **** }; ! } // namespace Database #endif --- 66,70 ---- }; ! } // namespace database #endif Index: tcESMDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcESMDBObject.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcESMDBObject.h 29 Nov 2004 03:54:49 -0000 1.7 --- tcESMDBObject.h 1 Jun 2005 00:13:26 -0000 1.8 *************** *** 30,34 **** #include "database/tcSqlReader.h" ! namespace Database { class tcSqlReader; --- 30,34 ---- #include "database/tcSqlReader.h" ! namespace database { class tcSqlReader; *************** *** 55,59 **** }; ! } // namespace Database #endif --- 55,59 ---- }; ! } // namespace database #endif Index: tcAirDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcAirDBObject.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcAirDBObject.h 27 May 2005 00:28:04 -0000 1.12 --- tcAirDBObject.h 1 Jun 2005 00:13:25 -0000 1.13 *************** *** 39,43 **** class TiXmlElement; ! namespace Database { --- 39,43 ---- class TiXmlElement; ! namespace database { Index: tcSonarDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcSonarDBObject.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcSonarDBObject.h 7 Dec 2004 03:59:07 -0000 1.3 --- tcSonarDBObject.h 1 Jun 2005 00:13:26 -0000 1.4 *************** *** 31,35 **** class TiXmlElement; ! namespace Database { class tcSqlReader; --- 31,35 ---- class TiXmlElement; ! namespace database { class tcSqlReader; *************** *** 81,85 **** }; ! } // namespace Database #endif --- 81,85 ---- }; ! } // namespace database #endif Index: tcDatabaseObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcDatabaseObject.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** tcDatabaseObject.h 5 Mar 2005 22:37:50 -0000 1.21 --- tcDatabaseObject.h 1 Jun 2005 00:13:26 -0000 1.22 *************** *** 28,34 **** #include "wx/wx.h" ! #ifdef WIN32 ! #include "wx/msw/private.h" // for MS Windows specific definitions ! #endif #include "tcString.h" --- 28,32 ---- #include "wx/wx.h" ! #include "tcString.h" *************** *** 36,45 **** #include "tcDBString.h" #include "gctypes.h" ! class tc3DModel; class TiXmlElement; ! namespace Database { class tcDatabase; --- 34,47 ---- #include "tcDBString.h" #include "gctypes.h" ! #include <osg/ref_ptr> class tc3DModel; class TiXmlElement; + namespace osg + { + class Geometry; + } ! namespace database { class tcDatabase; *************** *** 166,169 **** --- 168,172 ---- static tcDatabase *database; ///< allows db objects to query for other db objects tc3DModel *model; + osg::ref_ptr<osg::Geometry> icon; ///< icon for drag/drop container gui }; Index: tcDBString.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcDBString.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcDBString.h 8 Aug 2004 00:31:32 -0000 1.5 --- tcDBString.h 1 Jun 2005 00:13:25 -0000 1.6 *************** *** 35,39 **** class tcStream; ! namespace Database { class tcDBString --- 35,39 ---- class tcStream; ! namespace database { class tcDBString *************** *** 58,62 **** }; ! } // namespace Database #endif --- 58,62 ---- }; ! } // namespace database #endif Index: tcSqlReader.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcSqlReader.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcSqlReader.h 9 Aug 2004 02:35:14 -0000 1.2 --- tcSqlReader.h 1 Jun 2005 00:13:26 -0000 1.3 *************** *** 44,48 **** * C++ wrapper */ ! namespace Database { /** --- 44,48 ---- * C++ wrapper */ ! namespace database { /** *************** *** 76,80 **** ! } // namespace Database #endif --- 76,80 ---- ! } // namespace database #endif Index: tcDBObjSerializerSql.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcDBObjSerializerSql.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcDBObjSerializerSql.h 29 Nov 2004 03:54:48 -0000 1.3 --- tcDBObjSerializerSql.h 1 Jun 2005 00:13:25 -0000 1.4 *************** *** 47,51 **** * C++ wrapper */ ! namespace Database { --- 47,51 ---- * C++ wrapper */ ! namespace database { *************** *** 211,215 **** } ! } // namespace Database #endif --- 211,215 ---- } ! } // namespace database #endif Index: tcMissileDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcMissileDBObject.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** tcMissileDBObject.h 31 Mar 2005 03:51:11 -0000 1.19 --- tcMissileDBObject.h 1 Jun 2005 00:13:26 -0000 1.20 *************** *** 32,36 **** class TiXmlElement; ! namespace Database { class tcSqlReader; --- 32,36 ---- class TiXmlElement; ! namespace database { class tcSqlReader; Index: tcGenericDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcGenericDBObject.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcGenericDBObject.h 4 Mar 2005 00:46:14 -0000 1.17 --- tcGenericDBObject.h 1 Jun 2005 00:13:26 -0000 1.18 *************** *** 36,40 **** ! namespace Database { --- 36,40 ---- ! namespace database { Index: tcStoresDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcStoresDBObject.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcStoresDBObject.h 2 Dec 2004 04:17:23 -0000 1.2 --- tcStoresDBObject.h 1 Jun 2005 00:13:26 -0000 1.3 *************** *** 32,36 **** class TiXmlElement; ! namespace Database { class tcSqlReader; --- 32,36 ---- class TiXmlElement; ! namespace database { class tcSqlReader; *************** *** 67,71 **** }; ! } // namespace Database #endif --- 67,71 ---- }; ! } // namespace database #endif Index: tcTorpedoDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcTorpedoDBObject.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcTorpedoDBObject.h 7 Dec 2004 03:59:07 -0000 1.2 --- tcTorpedoDBObject.h 1 Jun 2005 00:13:26 -0000 1.3 *************** *** 32,36 **** class TiXmlElement; ! namespace Database { class tcSqlReader; --- 32,36 ---- class TiXmlElement; ! namespace database { class tcSqlReader; Index: tcSensorDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcSensorDBObject.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcSensorDBObject.h 2 Mar 2005 22:28:36 -0000 1.9 --- tcSensorDBObject.h 1 Jun 2005 00:13:26 -0000 1.10 *************** *** 33,37 **** class tcGameObject; ! namespace Database { class tcSqlReader; --- 33,37 ---- class tcGameObject; ! namespace database { class tcSqlReader; *************** *** 66,70 **** }; ! } // namespace Database #endif --- 66,70 ---- }; ! } // namespace database #endif Index: tcFixedDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcFixedDBObject.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcFixedDBObject.h 29 Nov 2004 03:54:49 -0000 1.6 --- tcFixedDBObject.h 1 Jun 2005 00:13:26 -0000 1.7 *************** *** 31,35 **** ! namespace Database { class tcSqlReader; --- 31,35 ---- ! namespace database { class tcSqlReader; *************** *** 56,60 **** ! } // namespace Database #endif --- 56,60 ---- ! } // namespace database #endif Index: tcLauncherDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcLauncherDBObject.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcLauncherDBObject.h 21 May 2005 02:00:27 -0000 1.12 --- tcLauncherDBObject.h 1 Jun 2005 00:13:26 -0000 1.13 *************** *** 31,35 **** class TiXmlElement; ! namespace Database { class tcSqlReader; --- 31,35 ---- class TiXmlElement; ! namespace database { class tcSqlReader; *************** *** 69,73 **** }; ! } // namespace Database #endif --- 69,73 ---- }; ! } // namespace database #endif Index: tcSensorPlatformDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcSensorPlatformDBObject.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcSensorPlatformDBObject.h 4 Mar 2005 00:46:14 -0000 1.1 --- tcSensorPlatformDBObject.h 1 Jun 2005 00:13:26 -0000 1.2 *************** *** 33,37 **** class tcFile; ! namespace Database { class tcDatabase; --- 33,37 ---- class tcFile; ! namespace database { class tcDatabase; Index: tcWeaponDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcWeaponDBObject.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcWeaponDBObject.h 7 Dec 2004 03:59:07 -0000 1.5 --- tcWeaponDBObject.h 1 Jun 2005 00:13:26 -0000 1.6 *************** *** 31,35 **** class TiXmlElement; ! namespace Database { --- 31,35 ---- class TiXmlElement; ! namespace database { *************** *** 67,71 **** }; ! } // namespace Database #endif --- 67,71 ---- }; ! } // namespace database #endif Index: tcSonobuoyDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcSonobuoyDBObject.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcSonobuoyDBObject.h 5 Mar 2005 22:37:50 -0000 1.1 --- tcSonobuoyDBObject.h 1 Jun 2005 00:13:26 -0000 1.2 *************** *** 32,36 **** class TiXmlElement; ! namespace Database { class tcSqlReader; --- 32,36 ---- class TiXmlElement; ! namespace database { class tcSqlReader; *************** *** 57,61 **** }; ! } // namespace Database #endif --- 57,61 ---- }; ! } // namespace database #endif Index: CsvTranslator.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/CsvTranslator.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CsvTranslator.h 21 May 2005 02:00:26 -0000 1.5 --- CsvTranslator.h 1 Jun 2005 00:13:25 -0000 1.6 *************** *** 32,36 **** #include <vector> ! namespace Database { /** --- 32,36 ---- #include <vector> ! namespace database { /** Index: tcBallisticDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcBallisticDBObject.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcBallisticDBObject.h 25 Mar 2005 03:48:06 -0000 1.7 --- tcBallisticDBObject.h 1 Jun 2005 00:13:25 -0000 1.8 *************** *** 31,35 **** class TiXmlElement; ! namespace Database { class tcSqlReader; --- 31,35 ---- class TiXmlElement; ! namespace database { class tcSqlReader; *************** *** 66,70 **** }; ! } // namespace Database #endif --- 66,70 ---- }; ! } // namespace database #endif Index: tcOpticalDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcOpticalDBObject.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcOpticalDBObject.h 29 Nov 2004 03:54:49 -0000 1.2 --- tcOpticalDBObject.h 1 Jun 2005 00:13:26 -0000 1.3 *************** *** 31,35 **** class TiXmlElement; ! namespace Database { class tcSqlReader; --- 31,35 ---- class TiXmlElement; ! namespace database { class tcSqlReader; *************** *** 60,64 **** }; ! } // namespace Database #endif --- 60,64 ---- }; ! } // namespace database #endif Index: tcDBObjSerializer.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcDBObjSerializer.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcDBObjSerializer.h 14 Sep 2004 02:01:45 -0000 1.4 --- tcDBObjSerializer.h 1 Jun 2005 00:13:25 -0000 1.5 *************** *** 38,42 **** * Class T should be a leaf class for this to work properly. */ ! namespace Database { --- 38,42 ---- * Class T should be a leaf class for this to work properly. */ ! namespace database { *************** *** 133,137 **** } ! } // namespace Database #endif --- 133,137 ---- } ! } // namespace database #endif Index: tcDatabase.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcDatabase.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcDatabase.h 4 Mar 2005 00:46:14 -0000 1.10 --- tcDatabase.h 1 Jun 2005 00:13:25 -0000 1.11 *************** *** 47,51 **** * also added to support a web effort that lost steam. */ ! namespace Database { --- 47,51 ---- * also added to support a web effort that lost steam. */ ! namespace database { Index: tcFlightportDBObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcFlightportDBObject.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcFlightportDBObject.h 29 Nov 2004 03:54:49 -0000 1.5 --- tcFlightportDBObject.h 1 Jun 2005 00:13:26 -0000 1.6 *************** *** 31,35 **** class TiXmlElement; ! namespace Database { class tcSqlReader; --- 31,35 ---- class TiXmlElement; ! namespace database { class tcSqlReader; |