gcblue-commits Mailing List for Global Conflict Blue (Page 42)
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...> - 2004-11-02 04:24:07
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8917/include/graphics Modified Files: tc3DWindow.h Log Message: A few more changes related to GDI+ replacement Index: tc3DWindow.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DWindow.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tc3DWindow.h 1 Nov 2004 03:17:16 -0000 1.8 --- tc3DWindow.h 2 Nov 2004 04:23:55 -0000 1.9 *************** *** 81,84 **** --- 81,88 ---- void AddChild(tc3DWindow* child); + osg::Geometry* CreateDefaultGeometry(); + osg::Geometry* CreatePieGeometry(float width, float height, float startAngle, float stopAngle, + osg::Vec4& color, int fillMode); + virtual void Draw(); virtual void DrawChildren(); // virtual void DrawChildren(Gdiplus::Graphics *graphics); |
Update of /cvsroot/gcblue/gcb_wx/src/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8917/src/network Modified Files: tcConnectionData.cpp tcControlMessageHandler.cpp tcMessage.cpp tcMultiplayerInterface.cpp tcNetworkInterface.cpp tcUpdateMessageHandler.cpp Log Message: A few more changes related to GDI+ replacement Index: tcUpdateMessageHandler.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/network/tcUpdateMessageHandler.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tcUpdateMessageHandler.cpp 24 May 2004 00:14:46 -0000 1.11 --- tcUpdateMessageHandler.cpp 2 Nov 2004 04:23:56 -0000 1.12 *************** *** 35,38 **** --- 35,42 ---- #include "common/tcObjStream.h" + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + BEGIN_NAMESPACE(network) Index: tcMessage.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/network/tcMessage.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcMessage.cpp 8 Aug 2004 00:31:34 -0000 1.7 --- tcMessage.cpp 2 Nov 2004 04:23:56 -0000 1.8 *************** *** 30,33 **** --- 30,37 ---- #include <iostream> + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + BEGIN_NAMESPACE(network) Index: tcMultiplayerInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/network/tcMultiplayerInterface.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcMultiplayerInterface.cpp 8 Aug 2004 00:31:34 -0000 1.17 --- tcMultiplayerInterface.cpp 2 Nov 2004 04:23:56 -0000 1.18 *************** *** 41,44 **** --- 41,48 ---- #include "tcConsoleBox.h" + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + BEGIN_NAMESPACE(network) Index: tcConnectionData.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/network/tcConnectionData.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcConnectionData.cpp 8 Aug 2004 00:31:34 -0000 1.8 --- tcConnectionData.cpp 2 Nov 2004 04:23:56 -0000 1.9 *************** *** 31,34 **** --- 31,37 ---- #include <iostream> + #ifdef _DEBUG + #define new DEBUG_NEW + #endif BEGIN_NAMESPACE(network) Index: tcNetworkInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/network/tcNetworkInterface.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** tcNetworkInterface.cpp 8 Aug 2004 00:31:34 -0000 1.13 --- tcNetworkInterface.cpp 2 Nov 2004 04:23:56 -0000 1.14 *************** *** 29,32 **** --- 29,36 ---- #include <iostream> + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + BEGIN_NAMESPACE(network) Index: tcControlMessageHandler.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/network/tcControlMessageHandler.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcControlMessageHandler.cpp 8 Aug 2004 00:31:34 -0000 1.6 --- tcControlMessageHandler.cpp 2 Nov 2004 04:23:56 -0000 1.7 *************** *** 34,37 **** --- 34,41 ---- #include "wxcommands.h" + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + BEGIN_NAMESPACE(network) |
|
From: Dewitt C. <ddc...@us...> - 2004-11-02 04:24:07
|
Update of /cvsroot/gcblue/gcb_wx/src/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8917/src/database Modified Files: tcAirDBObject.cpp tcBallisticDBObject.cpp tcDBString.cpp tcDatabase.cpp tcDatabaseObject.cpp tcESMDBObject.cpp tcFixedDBObject.cpp tcFlightportDBObject.cpp tcGenericDBObject.cpp tcLauncherDBObject.cpp tcMissileDBObject.cpp tcRadarDBObject.cpp tcSensorDBObject.cpp tcSqlReader.cpp tcWeaponDBObject.cpp Log Message: A few more changes related to GDI+ replacement Index: tcBallisticDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcBallisticDBObject.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcBallisticDBObject.cpp 14 Sep 2004 02:01:46 -0000 1.5 --- tcBallisticDBObject.cpp 2 Nov 2004 04:23:55 -0000 1.6 *************** *** 33,36 **** --- 33,40 ---- #include "database/tcSqlReader.h" + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + using namespace std; Index: tcESMDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcESMDBObject.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcESMDBObject.cpp 8 Aug 2004 00:31:33 -0000 1.6 --- tcESMDBObject.cpp 2 Nov 2004 04:23:55 -0000 1.7 *************** *** 33,36 **** --- 33,39 ---- #include "CsvTranslator.h" + #ifdef _DEBUG + #define new DEBUG_NEW + #endif using namespace std; Index: tcRadarDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcRadarDBObject.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcRadarDBObject.cpp 9 Aug 2004 02:35:15 -0000 1.12 --- tcRadarDBObject.cpp 2 Nov 2004 04:23:55 -0000 1.13 *************** *** 34,37 **** --- 34,40 ---- #include <sstream> + #ifdef _DEBUG + #define new DEBUG_NEW + #endif namespace Database Index: tcSqlReader.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcSqlReader.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcSqlReader.cpp 9 Aug 2004 02:35:15 -0000 1.2 --- tcSqlReader.cpp 2 Nov 2004 04:23:55 -0000 1.3 *************** *** 20,28 **** */ ! #include "tcSqlReader.h" #include "sqlite/sqlite_plus.h" #include <stdarg.h> namespace Database { --- 20,32 ---- */ ! #include "stdwx.h" #include "tcSqlReader.h" #include "sqlite/sqlite_plus.h" #include <stdarg.h> + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + namespace Database { Index: tcWeaponDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcWeaponDBObject.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcWeaponDBObject.cpp 9 Aug 2004 02:35:15 -0000 1.4 --- tcWeaponDBObject.cpp 2 Nov 2004 04:23:55 -0000 1.5 *************** *** 34,37 **** --- 34,41 ---- #include <sstream> + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + using namespace std; Index: tcFlightportDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcFlightportDBObject.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcFlightportDBObject.cpp 9 Aug 2004 02:35:15 -0000 1.5 --- tcFlightportDBObject.cpp 2 Nov 2004 04:23:55 -0000 1.6 *************** *** 32,35 **** --- 32,39 ---- #include <sstream> + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + using namespace std; Index: tcLauncherDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcLauncherDBObject.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcLauncherDBObject.cpp 9 Aug 2004 02:35:15 -0000 1.9 --- tcLauncherDBObject.cpp 2 Nov 2004 04:23:55 -0000 1.10 *************** *** 35,38 **** --- 35,42 ---- #include <sstream> + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + using namespace std; Index: tcGenericDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcGenericDBObject.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcGenericDBObject.cpp 9 Aug 2004 02:35:15 -0000 1.12 --- tcGenericDBObject.cpp 2 Nov 2004 04:23:55 -0000 1.13 *************** *** 37,40 **** --- 37,43 ---- #include <sstream> + #ifdef _DEBUG + #define new DEBUG_NEW + #endif using namespace std; Index: tcDatabase.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcDatabase.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcDatabase.cpp 1 Nov 2004 03:17:17 -0000 1.17 --- tcDatabase.cpp 2 Nov 2004 04:23:55 -0000 1.18 *************** *** 50,53 **** --- 50,57 ---- #include "sqlite/sqlite_plus.h" + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + using namespace std; Index: tcAirDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcAirDBObject.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcAirDBObject.cpp 9 Aug 2004 02:35:15 -0000 1.9 --- tcAirDBObject.cpp 2 Nov 2004 04:23:55 -0000 1.10 *************** *** 28,31 **** --- 28,35 ---- #include <sstream> + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + namespace Database { Index: tcSensorDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcSensorDBObject.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcSensorDBObject.cpp 9 Aug 2004 02:35:15 -0000 1.7 --- tcSensorDBObject.cpp 2 Nov 2004 04:23:55 -0000 1.8 *************** *** 34,37 **** --- 34,41 ---- #include <sstream> + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + using namespace std; Index: tcFixedDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcFixedDBObject.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcFixedDBObject.cpp 8 Aug 2004 00:31:33 -0000 1.6 --- tcFixedDBObject.cpp 2 Nov 2004 04:23:55 -0000 1.7 *************** *** 32,35 **** --- 32,39 ---- #include "database/tcSqlReader.h" + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + using namespace std; Index: tcDatabaseObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcDatabaseObject.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tcDatabaseObject.cpp 9 Aug 2004 02:35:15 -0000 1.11 --- tcDatabaseObject.cpp 2 Nov 2004 04:23:55 -0000 1.12 *************** *** 38,41 **** --- 38,45 ---- #include "database/tcSqlReader.h" + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + namespace Database { Index: tcMissileDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcMissileDBObject.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcMissileDBObject.cpp 9 Aug 2004 02:35:15 -0000 1.10 --- tcMissileDBObject.cpp 2 Nov 2004 04:23:55 -0000 1.11 *************** *** 37,40 **** --- 37,44 ---- #include <sstream> + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + using namespace std; Index: tcDBString.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcDBString.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcDBString.cpp 8 Aug 2004 00:31:33 -0000 1.5 --- tcDBString.cpp 2 Nov 2004 04:23:55 -0000 1.6 *************** *** 25,28 **** --- 25,32 ---- #include "common/tcStream.h" + #ifdef _DEBUG + #define new DEBUG_NEW + #endif + namespace Database { |
|
From: Dewitt C. <ddc...@us...> - 2004-11-02 04:24:07
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8917/include/sim Modified Files: tcObjectControl.h Log Message: A few more changes related to GDI+ replacement Index: tcObjectControl.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcObjectControl.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcObjectControl.h 17 Aug 2004 02:22:56 -0000 1.7 --- tcObjectControl.h 2 Nov 2004 04:23:55 -0000 1.8 *************** *** 1,6 **** ! /* ! ** tcObjectControl.h ! ** ! ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. --- 1,6 ---- ! /** ! ** @file tcObjectControl.h ! */ ! /* Copyright (C) 2003-2004 Dewitt Colclough (de...@tw...) ** All rights reserved. *************** *** 28,35 **** #include "wx/wx.h" ! #ifdef WIN32 ! #include "wx/msw/private.h" // for MS Windows specific definitions ! #endif ! #include "tcWindow.h" #include "commandlist.h" #include "aerror.h" --- 28,32 ---- #include "wx/wx.h" ! #include "tc3DWindow.h" #include "commandlist.h" #include "aerror.h" *************** *** 44,52 **** class tcSimState; - class tcOptions; class tcUserInfo; class tcGameObject; namespace Database { --- 41,53 ---- class tcSimState; class tcOptions; class tcUserInfo; class tcGameObject; + namespace osg + { + class Geometry; + } + namespace Database { *************** *** 66,70 **** bool mbMouseOver; float mfMouseHeading_rad; ! Gdiplus::RectF mrectArc; float mfxcenter; float mfycenter; --- 67,71 ---- bool mbMouseOver; float mfMouseHeading_rad; ! tcRect mrectArc; float mfxcenter; float mfycenter; *************** *** 76,81 **** bool mbMouseOver; bool mbVertical; ! Gdiplus::RectF mrectcontrol; ///< control area ! Gdiplus::RectF mrectbar; float mfmaxvalue; float mfminvalue; --- 77,82 ---- bool mbMouseOver; bool mbVertical; ! tcRect mrectcontrol; ///< control area ! tcRect mrectbar; float mfmaxvalue; float mfminvalue; *************** *** 91,137 **** }; - class tcButtonPanel - { - public: - float mfxloc, mfyloc; // upper-left coords - unsigned mnRows, mnColumns; - tcString mstrTitle; - tcString mastrCaption[MAX_PANELROWS][N_PANELBUTTONS]; - Gdiplus::RectF mar[MAX_PANELROWS][N_PANELBUTTONS]; - teButtonState maButtonState[MAX_PANELROWS][N_PANELBUTTONS]; - - void Init(int anPanelType); - void Draw(Gdiplus::Graphics *apGraphics); - void DrawButton(Gdiplus::Graphics *apGraphics, const Gdiplus::RectF& rectf, - const char* azCaption, teButtonState aeState); - bool ButtonContainingPoint(wxPoint point, int& rnRow, int& rnColumn); - void GetRect(Gdiplus::RectF& r); - void SetCaption(char *caption, unsigned row, unsigned button); - tcButtonPanel(); - ~tcButtonPanel(); - private: - Gdiplus::Pen *mpPen; - Gdiplus::SolidBrush *mpBrush; - Gdiplus::Font *mpFont; - }; - class tcAIPanel { public: ! Gdiplus::RectF window; std::string mzCaption; void SetAIData(tcAIData *apAIData) {mpAIData = apAIData;} ! void SetLocation(Gdiplus::RectF rect) {window = rect;} ! void Draw(Gdiplus::Graphics *apGraphics); tcAIPanel(); ~tcAIPanel(); private: ! tcAIData *mpAIData; ! Gdiplus::Pen *mpPen; ! Gdiplus::SolidBrush *mpBrush; ! Gdiplus::Font *mpFont; }; #define MAX_OCSYMBOLS 8 ///< symbols to be drawn on map, move this feature out of tcObjectControl eventually --- 92,137 ---- }; class tcAIPanel { public: ! tcRect window; std::string mzCaption; void SetAIData(tcAIData *apAIData) {mpAIData = apAIData;} ! void SetLocation(tcRect rect) {window = rect;} ! void Draw(tc3DWindow* context); tcAIPanel(); ~tcAIPanel(); private: ! tcAIData* mpAIData; }; + + + class tcButtonPanel + { + public: + float mfxloc, mfyloc; // upper-left coords + unsigned mnRows, mnColumns; + tcString mstrTitle; + tcString mastrCaption[MAX_PANELROWS][N_PANELBUTTONS]; + tcRect mar[MAX_PANELROWS][N_PANELBUTTONS]; + teButtonState maButtonState[MAX_PANELROWS][N_PANELBUTTONS]; + float fontSize; + + void Init(int anPanelType); + void Draw(tc3DWindow* context); + void DrawButton(tc3DWindow* context, const tcRect& rectf, + const char* azCaption, teButtonState aeState); + bool ButtonContainingPoint(wxPoint point, int& rnRow, int& rnColumn); + void GetRect(tcRect& r); + void SetCaption(char *caption, unsigned row, unsigned button); + tcButtonPanel(); + ~tcButtonPanel(); + private: + }; + + + #define MAX_OCSYMBOLS 8 ///< symbols to be drawn on map, move this feature out of tcObjectControl eventually *************** *** 151,159 **** }; ! class tcObjectControl : public tcWindow { public: ! int Draw(void); ! void AttachOptions(tcOptions *apOptions) {mpOptions = apOptions;} void AttachSimState(tcSimState *apSS) {mpSS=apSS;} void AttachCommandInterface(tcCommandQueue *apCommandInterface) {mpCommandInterface=apCommandInterface;} --- 151,161 ---- }; ! /** ! * Old code, needs refactoring ! */ ! class tcObjectControl : public tc3DWindow { public: ! void Draw(); void AttachSimState(tcSimState *apSS) {mpSS=apSS;} void AttachCommandInterface(tcCommandQueue *apCommandInterface) {mpCommandInterface=apCommandInterface;} *************** *** 178,184 **** tcUserInfo *mpUserInfo; ///< info on which alliance user belongs to for truth view/control tnPoolIndex mnHookID, mnPreviousHookID; ! Gdiplus::Pen *mpPen; ! Gdiplus::SolidBrush *mpBrush; ! Gdiplus::Font *mpFont,*mpFontLarge; tcButtonPanel mcWeaponPanel; tcButtonPanel mcSensorPanel; --- 180,184 ---- tcUserInfo *mpUserInfo; ///< info on which alliance user belongs to for truth view/control tnPoolIndex mnHookID, mnPreviousHookID; ! tcButtonPanel mcWeaponPanel; tcButtonPanel mcSensorPanel; *************** *** 192,212 **** int mnSensors; tsOCSymbolList msOCSymbolList; ! void DrawAltitudeObject(Gdiplus::Graphics *apGraphics, float afAltitude_m); ! void DrawBarObject(Gdiplus::Graphics *apGraphics, tsBarObjectInfo *apBOI, float afValue, float afValueGoal); ! void DrawButton(Gdiplus::Graphics *apGraphics, const Gdiplus::RectF& rectf, char* azCaption, teButtonState aeState); ! void DrawEngagementInfo(Gdiplus::Graphics *apGraphics); ! void DrawFireControl(Gdiplus::Graphics *apGraphics); ! void DrawFormationControl(Gdiplus::Graphics *apGraphics); ! void DrawFuelInfo(Gdiplus::Graphics *apGraphics); ! void DrawHeadingObject(Gdiplus::Graphics *apGraphics, tsHeadingObjectInfo *apHOI, float afHeading_rad, float afHeadingGoal_rad); ! void DrawLandingInfo(Gdiplus::Graphics *graphics); ! void DrawSensorControl(Gdiplus::Graphics *apGraphics); void InitControls(); ! void UpdateControlObjects(void); ! void UpdateSymbolList(void); void GetObjectInfo(tcString& s, tcDatabaseObject *apDBObject, tcGameObject *apGameObject); }; --- 192,215 ---- int mnSensors; tsOCSymbolList msOCSymbolList; + osg::ref_ptr<osg::Geometry> headingCircle; + osg::ref_ptr<osg::Geometry> headingCircleLight; ! void CreateHeadingCircles(); ! void DrawAltitudeObject(float afAltitude_m); ! void DrawBarObject(tsBarObjectInfo *apBOI, float afValue, float afValueGoal); ! void DrawButton(const tcRect& rectf, char* azCaption, teButtonState aeState); ! void DrawEngagementInfo(); ! void DrawFireControl(); ! void DrawFormationControl(); ! void DrawFuelInfo(); ! void DrawHeadingObject(tsHeadingObjectInfo *apHOI, float afHeading_rad, float afHeadingGoal_rad); ! void DrawLandingInfo(); ! void DrawSensorControl(); void InitControls(); ! void UpdateControlObjects(); ! void UpdateSymbolList(); void GetObjectInfo(tcString& s, tcDatabaseObject *apDBObject, tcGameObject *apGameObject); }; |
|
From: Dewitt C. <ddc...@us...> - 2004-11-02 04:24:07
|
Update of /cvsroot/gcblue/gcb_wx/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8917/src/common Modified Files: tcSoundConsole.cpp Log Message: A few more changes related to GDI+ replacement Index: tcSoundConsole.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcSoundConsole.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcSoundConsole.cpp 29 Oct 2004 02:50:43 -0000 1.9 --- tcSoundConsole.cpp 2 Nov 2004 04:23:55 -0000 1.10 *************** *** 35,38 **** --- 35,45 ---- #endif + void tcSoundConsole::Clear() + { + wxASSERT(textBox); + + textBox->Clear(); + } + void tcSoundConsole::Draw() { |
|
From: Dewitt C. <ddc...@us...> - 2004-11-01 03:18:04
|
Update of /cvsroot/gcblue/gcb_wx/include/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20973/include/common Modified Files: simmath.h Log Message: A few more changes related to GDI+ replacement Index: simmath.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/simmath.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** simmath.h 29 Oct 2004 02:50:41 -0000 1.22 --- simmath.h 1 Nov 2004 03:17:15 -0000 1.23 *************** *** 123,127 **** void ClearFlags() {mnFlags=0;} /// why is mnID set to 0 instead of -1 ? ! void Clear() { mfLon_rad=0;mfLat_rad=0;mfAlt_m=0; --- 123,127 ---- void ClearFlags() {mnFlags=0;} /// why is mnID set to 0 instead of -1 ? ! virtual void Clear() { mfLon_rad=0;mfLat_rad=0;mfAlt_m=0; |
|
From: Dewitt C. <ddc...@us...> - 2004-11-01 03:18:04
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20973/include/sim Modified Files: tcMenu.h tcSensorMap.h Log Message: A few more changes related to GDI+ replacement Index: tcSensorMap.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorMap.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcSensorMap.h 1 Sep 2004 02:55:36 -0000 1.8 --- tcSensorMap.h 1 Nov 2004 03:17:17 -0000 1.9 *************** *** 41,235 **** { ! /** ! * 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 ! tnPoolIndex mnTrackID; ! tnPoolIndex mnSensorPlatformID; ! UINT8 mnFlags; ! std::vector<UINT32> maEmitter; ! unsigned mbClassified : 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; ! } ! 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: ! //tcTrack track; ! double mfLastUpdateTime; ! tcSensorReport maSensorReport[MAX_SENSOR_REPORTS]; ///< most recent data from contributing sensors ! int mnContributors; ! tsEmitterInfo maEmitterInfo[MAX_EMITTERS]; ! int mnEmitters; ! tnPoolIndex mnDatabaseID; ///< database ID of track ! float matchupRating; ///< matchup rating for platforms that have targeted this track ! float expectedDamage; ///< rating of expected fractional damage of weapons launched at target, 0 - none, 1.0 - totally destroyed ! float assessedDamage; ///< fractional damage assessment ! 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 ! /// 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); ! ///< static method to set pointer to tcSimState object ! static void AttachSimState(tcSimState* ss) {simState = ss;} ! 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; ! const tcTrack* GetTrack() {return this;} ! bool IsNew() {return mfTimestamp == 0;} - bool UpdateActiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID); - void UpdateClassification(UINT16 mnClassification, teAffiliation meAffiliation, - tnPoolIndex mnDatabaseID); - 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(); ! ~tcSensorMapTrack(); ! void RemoveReport(int n); ! private: ! static tcSimState *simState; ! }; - class tcAllianceSensorMap - { - enum {MAX_SMTRACKS = 512, MAX_TRACKS = 512}; - public: - 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(unsigned long anTrackID); ! bool GetTrack(unsigned long anTrackID, tcTrack& track); ! int Serialize(tcFile& file, bool mbLoad); ! tcUpdateStream& operator<<(tcUpdateStream& stream); ! tcUpdateStream& operator>>(tcUpdateStream& stream); ! tcAllianceSensorMap(); ! virtual ~tcAllianceSensorMap(); ! private: ! tcPool<tcSensorMapTrack,MAX_SMTRACKS> maTrack; ! tnPoolIndex maTrackToSensorTrack[MAX_TRACKS]; ! double mfPreviousStatusTime; ! double lastEngagementsUpdate; ! }; - /** - * 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(unsigned 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_ --- 41,240 ---- { ! /** ! * 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 ! tnPoolIndex mnTrackID; ! tnPoolIndex mnSensorPlatformID; ! UINT8 mnFlags; ! std::vector<UINT32> maEmitter; ! unsigned mbClassified : 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; ! } ! 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: ! //tcTrack track; ! double mfLastUpdateTime; ! tcSensorReport maSensorReport[MAX_SENSOR_REPORTS]; ///< most recent data from contributing sensors ! int mnContributors; ! tsEmitterInfo maEmitterInfo[MAX_EMITTERS]; ! int mnEmitters; ! tnPoolIndex mnDatabaseID; ///< database ID of track ! float matchupRating; ///< matchup rating for platforms that have targeted this track ! float expectedDamage; ///< rating of expected fractional damage of weapons launched at target, 0 - none, 1.0 - totally destroyed ! float assessedDamage; ///< fractional damage assessment ! 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 ! /// 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); ! ///< static method to set pointer to tcSimState object ! 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; + const tcTrack* GetTrack() {return this;} + bool IsNew() {return mfTimestamp == 0;} ! bool UpdateActiveReport(tcSensorReport*& rpReport, tnPoolIndex anSensorID); ! void UpdateClassification(UINT16 mnClassification, teAffiliation meAffiliation, ! tnPoolIndex mnDatabaseID); ! 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(); ! ~tcSensorMapTrack(); ! void RemoveReport(int n); + private: + static tcSimState *simState; + }; ! 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; ! }; ! /** ! * 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: tcMenu.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcMenu.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcMenu.h 29 Oct 2004 02:50:43 -0000 1.7 --- tcMenu.h 1 Nov 2004 03:17:17 -0000 1.8 *************** *** 35,38 **** --- 35,43 ---- #include <vector> + namespace osg + { + class ref_ptr; + class Geometry; + } class tcMenu; *************** *** 82,85 **** --- 87,91 ---- static void SetParentWindow(tc3DWindow* win) {parentWindow = win;} + static void SetSubmenuIconRenderBin(int bin); static tc3DWindow* parentWindow; ///< workaround to make this work with 3D window system *************** *** 98,101 **** --- 104,110 ---- tcRect menubox; // rectangle encompassing entire menu bool mbUpdateRegions; + static osg::ref_ptr<osg::Geometry> submenuIcon; + + static void InitSubmenuIcon(); }; |
|
From: Dewitt C. <ddc...@us...> - 2004-11-01 03:18:04
|
Update of /cvsroot/gcblue/gcb_wx/include/scriptinterface In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20973/include/scriptinterface Modified Files: tcTrackInterface.h Log Message: A few more changes related to GDI+ replacement Index: tcTrackInterface.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/scriptinterface/tcTrackInterface.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcTrackInterface.h 8 Aug 2004 00:31:32 -0000 1.4 --- tcTrackInterface.h 1 Nov 2004 03:17:16 -0000 1.5 *************** *** 42,54 **** // platform info void SetAffiliation(UINT8 anAffil); ! void DeclareFriendly(void); ! void DeclareNeutral(void); ! void DeclareHostile(void); ! void DropTrack(void); static void SetTrack(unsigned int anID) {mnTrackID = anID;} ! static void AttachSensorMap(tcAllianceSensorMap *apSM) {mpSensorMap = apSM;} ! tcTrackInterface(void); ! virtual ~tcTrackInterface(void); private: static unsigned int mnTrackID; --- 42,54 ---- // platform info void SetAffiliation(UINT8 anAffil); ! void DeclareFriendly(); ! void DeclareNeutral(); ! void DeclareHostile(); ! void DropTrack(); static void SetTrack(unsigned int anID) {mnTrackID = anID;} ! static void AttachSensorMap(tcAllianceSensorMap *apSM); ! tcTrackInterface(); ! virtual ~tcTrackInterface(); private: static unsigned int mnTrackID; |
|
From: Dewitt C. <ddc...@us...> - 2004-11-01 03:18:04
|
Update of /cvsroot/gcblue/gcb_wx/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20973/src/common Modified Files: tcOptions.cpp tcOptionsView.cpp Log Message: A few more changes related to GDI+ replacement Index: tcOptionsView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcOptionsView.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcOptionsView.cpp 21 Oct 2004 04:10:59 -0000 1.12 --- tcOptionsView.cpp 1 Nov 2004 03:17:17 -0000 1.13 *************** *** 64,68 **** static nTestCount = 0; ! #if 0 wxASSERT(mpOptions); --- 64,68 ---- static nTestCount = 0; ! wxASSERT(mpOptions); *************** *** 129,133 **** } } ! #endif DrawChildren(); --- 129,133 ---- } } ! DrawChildren(); Index: tcOptions.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcOptions.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tcOptions.cpp 2 Oct 2004 22:41:33 -0000 1.11 --- tcOptions.cpp 1 Nov 2004 03:17:17 -0000 1.12 *************** *** 127,131 **** oi.mnValue = 1; oi.mpAssociated = &mbUseNTDS; ! oi.mzCaption[0] = "2525B symbols"; oi.mzCaption[1] = "NTDS symbols"; AddOption(oi); --- 127,131 ---- oi.mnValue = 1; oi.mpAssociated = &mbUseNTDS; ! oi.mzCaption[0] = "Icon (2525B) symbols"; oi.mzCaption[1] = "NTDS symbols"; AddOption(oi); |
|
From: Dewitt C. <ddc...@us...> - 2004-11-01 03:18:03
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20973/include/graphics Modified Files: tc3DWindow.h tcGraphicsEngine.h tcMapView.h tcPopupControl.h Log Message: A few more changes related to GDI+ replacement Index: tcPopupControl.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcPopupControl.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcPopupControl.h 29 Oct 2004 02:50:43 -0000 1.2 --- tcPopupControl.h 1 Nov 2004 03:17:16 -0000 1.3 *************** *** 64,67 **** --- 64,68 ---- void AttachCommandInterface(tcCommandQueue *apCommandInterface) {mpCommandInterface=apCommandInterface;} void AttachPythonInterface(tcSimPythonInterface *apIF) {mpPythonInterface = apIF;} + virtual void SetBaseRenderBin(int n); void SetMenu(teMenuMode mode); void SetMenu(); ///< this shouldn't be an override? Index: tc3DWindow.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DWindow.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tc3DWindow.h 29 Oct 2004 02:50:42 -0000 1.7 --- tc3DWindow.h 1 Nov 2004 03:17:16 -0000 1.8 *************** *** 170,174 **** bool GetBlend(); void SetBlend(bool blendingOn); ! void SetBaseRenderBin(int n); void SetName(const char* s); void SetOpaque(); --- 170,174 ---- bool GetBlend(); void SetBlend(bool blendingOn); ! virtual void SetBaseRenderBin(int n); void SetName(const char* s); void SetOpaque(); *************** *** 262,266 **** osg::ref_ptr<osg::Geode> textRoot; ///< root node for text graphics osg::ref_ptr<osg::Geode> backgroundRoot; ///< root node for background graphics ! osg::ref_ptr<osgText::Text> referenceText; ///< text to make size measurements with --- 262,266 ---- osg::ref_ptr<osg::Geode> textRoot; ///< root node for text graphics osg::ref_ptr<osg::Geode> backgroundRoot; ///< root node for background graphics ! osg::ref_ptr<osg::Geode> lineRoot; ///< root node for lines and rectangle graphics osg::ref_ptr<osgText::Text> referenceText; ///< text to make size measurements with Index: tcMapView.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcMapView.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcMapView.h 21 Oct 2004 04:10:58 -0000 1.3 --- tcMapView.h 1 Nov 2004 03:17:16 -0000 1.4 *************** *** 113,116 **** --- 113,117 ---- UCHAR mbExists; unsigned int mnColor; + teAffiliation meAffiliation; float mfLon,mfLat; unsigned long mnID; *************** *** 188,192 **** tcPoint GeoToScreen(float afLon, float afLat); float GeoExtentToScreen(float afExtent_rad); ! /* Gdiplus::Pen* GetPen() {return mpPen;} --- 189,193 ---- tcPoint GeoToScreen(float afLon, float afLat); float GeoExtentToScreen(float afExtent_rad); ! osg::Vec4 GetAffiliationColor(teAffiliation a); /* Gdiplus::Pen* GetPen() {return mpPen;} *************** *** 341,345 **** void BuildNTDS(); - osg::Vec4 GetAffiliationColor(teAffiliation a); osg::Geometry* GetSymbol(teAffiliation aeAffiliation, teSymbol aeSymbol); osg::Image* LoadSymbolImage(const char *azSymbolName); --- 342,345 ---- *************** *** 365,368 **** --- 365,371 ---- }; + /** + * TODO move this class to separate file + */ class tcWorldMapView : public tcMapView { Index: tcGraphicsEngine.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcGraphicsEngine.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** tcGraphicsEngine.h 14 Sep 2004 02:01:45 -0000 1.13 --- tcGraphicsEngine.h 1 Nov 2004 03:17:16 -0000 1.14 *************** *** 147,153 **** } meGraphicsMode; ! void CheckGLError(); ! void ConfigureFor2D(void); ! void ConfigureForTexture2D(void); AUX_RGBImageRec* LoadBmp(char *szFileName); --- 147,153 ---- } meGraphicsMode; ! void CheckGLError(const char* location = 0); ! void ConfigureFor2D(); ! void ConfigureForTexture2D(); AUX_RGBImageRec* LoadBmp(char *szFileName); |
|
From: Dewitt C. <ddc...@us...> - 2004-11-01 03:17:30
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20973/src/sim Modified Files: Game.cpp tcLauncherState.cpp tcMenu.cpp tcRadar.cpp tcSensorMap.cpp Log Message: A few more changes related to GDI+ replacement Index: tcLauncherState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcLauncherState.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** tcLauncherState.cpp 14 Sep 2004 02:01:47 -0000 1.18 --- tcLauncherState.cpp 1 Nov 2004 03:17:18 -0000 1.19 *************** *** 31,39 **** #include <iostream> #include "common/tcObjStream.h" ! tcDatabase* tcLauncherState::mpDatabase = NULL; tcSimState* tcLauncherState::simState = NULL; class tcGame { --- 31,40 ---- #include <iostream> #include "common/tcObjStream.h" ! #include "Game.h" tcDatabase* tcLauncherState::mpDatabase = NULL; tcSimState* tcLauncherState::simState = NULL; + /* class tcGame { *************** *** 41,44 **** --- 42,46 ---- static void DisplayMessage(const char* msg); }; + */ /** Index: tcMenu.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcMenu.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcMenu.cpp 29 Oct 2004 02:50:54 -0000 1.7 --- tcMenu.cpp 1 Nov 2004 03:17:18 -0000 1.8 *************** *** 27,30 **** --- 27,32 ---- #include "tcMenu.h" + #include <osg/ref_ptr> + #include <osg/Geometry> *************** *** 34,37 **** --- 36,84 ---- tc3DWindow* tcMenu::parentWindow = 0; + osg::ref_ptr<osg::Geometry> tcMenu::submenuIcon; + + void tcMenu::InitSubmenuIcon() + { + float w = 2.0f; + + submenuIcon = new osg::Geometry; + + osg::Vec4Array* colors = new osg::Vec4Array; + colors->push_back(osg::Vec4(0.0f, 0.0f, 0.0f, 1.0f)); + submenuIcon->setColorArray(colors); + submenuIcon->setColorBinding(osg::Geometry::BIND_OVERALL); + + // create vertex array + osg::Vec3Array* vertices = new osg::Vec3Array; + submenuIcon->setVertexArray(vertices); + + + vertices->push_back(osg::Vec3(w, 0, 0)); + vertices->push_back(osg::Vec3(-w, w, 0)); + vertices->push_back(osg::Vec3(-w, -w, 0)); + submenuIcon->addPrimitiveSet(new osg::DrawArrays(GL_TRIANGLES, 0, 3)); + + + + submenuIcon->setUseDisplayList(true); + + // set state + osg::StateSet* stateSet = submenuIcon->getOrCreateStateSet(); + stateSet->setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF); + stateSet->setMode(GL_DEPTH_WRITEMASK, osg::StateAttribute::OFF); + stateSet->setMode(GL_LIGHTING, osg::StateAttribute::OFF); + stateSet->setMode(GL_BLEND, osg::StateAttribute::ON); + stateSet->setRenderBinDetails(31, "RenderBin"); + } + + void tcMenu::SetSubmenuIconRenderBin(int bin) + { + wxASSERT(submenuIcon.valid()); + + osg::StateSet* stateSet = submenuIcon->getOrCreateStateSet(); + stateSet->setRenderBinDetails(bin, "RenderBin"); + } + + void tcMenu::AddItem(string caption, int command) { *************** *** 222,229 **** if (apMD->mpSubMenu != NULL) { #if 0 // draw submenu triangle icon PointF aSubIcon[3]; // points for tri submenu icon, rel to upper left of item ! aSubIcon[0].X = item_rect.X + mfItemWidth - 2.0f; aSubIcon[0].Y = item_rect.Y + 0.5f*item_rect.Height; aSubIcon[1].X = aSubIcon[0].X - 5.0f; --- 269,282 ---- if (apMD->mpSubMenu != NULL) { + float subx = item_rect.left + mfItemWidth - 4.0f; + float suby = item_rect.YCenter(); + + + parentWindow->DrawGeometryR(submenuIcon.get(), subx, suby); #if 0 + // draw submenu triangle icon PointF aSubIcon[3]; // points for tri submenu icon, rel to upper left of item ! aSubIcon[0].X = item_rect.X + mfItemWidth - 5.0f; aSubIcon[0].Y = item_rect.Y + 0.5f*item_rect.Height; aSubIcon[1].X = aSubIcon[0].X - 5.0f; *************** *** 335,341 **** parentWindow->MeasureText(parentWindow->GetDefaultFont(), fontSize, pmd->mzCaption.c_str(), boundingBox); ! maxWidth = (boundingBox.GetWidth() > maxWidth) ? boundingBox.GetWidth() : maxWidth; maxHeight = (boundingBox.GetHeight() > maxHeight) ? boundingBox.GetHeight() : maxHeight; } --- 388,399 ---- parentWindow->MeasureText(parentWindow->GetDefaultFont(), fontSize, pmd->mzCaption.c_str(), boundingBox); + + int w = boundingBox.GetWidth(); + if (pmd->mpSubMenu) w += 3; ! maxWidth = (w > maxWidth) ? w : maxWidth; maxHeight = (boundingBox.GetHeight() > maxHeight) ? boundingBox.GetHeight() : maxHeight; + + } *************** *** 369,372 **** --- 427,435 ---- mpCurrent = this; mpParent = NULL; + + if (!submenuIcon.valid()) + { + InitSubmenuIcon(); + } } *************** *** 378,381 **** --- 441,449 ---- mpCurrent = this; mpParent = apParent; + + if (!submenuIcon.valid()) + { + InitSubmenuIcon(); + } } Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** Game.cpp 29 Oct 2004 02:50:53 -0000 1.101 --- Game.cpp 1 Nov 2004 03:17:18 -0000 1.102 *************** *** 729,733 **** wxSize(mnBriefingWidth, leftConsoleHeight), "xml/briefing_left.xml") ; ! briefingConsoleLeft->SetBaseRenderBin(10); if (!briefingConsoleLeft) --- 729,733 ---- wxSize(mnBriefingWidth, leftConsoleHeight), "xml/briefing_left.xml") ; ! briefingConsoleLeft->SetBaseRenderBin(20); if (!briefingConsoleLeft) *************** *** 763,767 **** briefingConsoleBottom->SetActive(false); briefingConsoleBottom->LoadBackgroundImage("briefing_bottom.jpg"); ! briefingConsoleBottom->SetBaseRenderBin(10); briefingConsoleBottom->Print(" "); // need this to get it to display --- 763,767 ---- briefingConsoleBottom->SetActive(false); briefingConsoleBottom->LoadBackgroundImage("briefing_bottom.jpg"); ! briefingConsoleBottom->SetBaseRenderBin(20); briefingConsoleBottom->Print(" "); // need this to get it to display *************** *** 844,848 **** tacticalMap = new tcTacticalMapView(glCanvas, wxPoint(mrectMap.left,mrectMap.top), wxSize(mrectMap.right-mrectMap.left, mrectMap.bottom-mrectMap.top)); ! tacticalMap->SetBaseRenderBin(20); tacticalMapSize = TM_LARGE; --- 844,848 ---- tacticalMap = new tcTacticalMapView(glCanvas, wxPoint(mrectMap.left,mrectMap.top), wxSize(mrectMap.right-mrectMap.left, mrectMap.bottom-mrectMap.top)); ! tacticalMap->SetBaseRenderBin(10); tacticalMapSize = TM_LARGE; *************** *** 974,978 **** // popupControl init popupControl = new tcPopupControl(glCanvas, wxPoint(1400, 400), ! wxSize(300, 300)); popupControl->SetBaseRenderBin(30); if (!popupControl) --- 974,978 ---- // popupControl init popupControl = new tcPopupControl(glCanvas, wxPoint(1400, 400), ! wxSize(400, 400)); popupControl->SetBaseRenderBin(30); if (!popupControl) *************** *** 1021,1024 **** --- 1021,1026 ---- wxASSERT(infoConsole); pythonInterface->AttachConsole(infoConsole); + // sensor maps get cleared in tcSimState::RandInit() + pythonInterface->AttachSensorMap(simState->mcSensorMap.GetMap(mcUserInfo.GetOwnAlliance())); mcGameView.AttachObjectControl(objectControl); Index: tcSensorMap.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSensorMap.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcSensorMap.cpp 14 Sep 2004 02:01:47 -0000 1.10 --- tcSensorMap.cpp 1 Nov 2004 03:17:18 -0000 1.11 *************** *** 113,116 **** --- 113,137 ---- + void tcSensorMapTrack::Clear() + { + for (int k=0; k<mnContributors; k++) + { + tcSensorReport* sensorReport = &maSensorReport[k]; + sensorReport->Clear(); + } + + mfLastUpdateTime = 0; + mnContributors = 0; + mnEmitters = 0; + mnDatabaseID = -1; + matchupRating = 0; + expectedDamage = 0; + assessedDamage = 0; + intercepts.clear(); + engaged.clear(); + + tcTrack::Clear(); + } + unsigned tcSensorMapTrack::GetEngagedCount() const { *************** *** 290,295 **** ! // check if reporting sensor has reported, if so update report ! // if not add new report if slots are free bool tcSensorMapTrack::AddReport(const Sensor::tcSensorReport& report) { --- 311,318 ---- ! /** ! * check if reporting sensor has reported, if so update report ! * if not add new report if slots are free ! */ bool tcSensorMapTrack::AddReport(const Sensor::tcSensorReport& report) { *************** *** 548,555 **** maTrack.AddElement(psmtrack, nKey); maTrackToSensorTrack[anTrackID] = nKey; if (psmtrack->UpdateActiveReport(rpReport, anSensorID)) { //psmtrack->UpdateTrack(); ! rpSMTrack = psmtrack; return true; } --- 571,584 ---- maTrack.AddElement(psmtrack, nKey); maTrackToSensorTrack[anTrackID] = nKey; + if (psmtrack->UpdateActiveReport(rpReport, anSensorID)) { //psmtrack->UpdateTrack(); ! rpSMTrack = psmtrack; ! #ifdef _DEBUG ! fprintf(stdout, "New active detection, alliance: %d, track id: %d, sm key: %d\n", ! alliance, anTrackID, nKey); ! #endif ! return true; } *************** *** 629,637 **** void tcAllianceSensorMap::DropTrack(tnPoolIndex anID) { ! if (anID == NULL_INDEX) {return;} tnPoolIndex nKey = maTrackToSensorTrack[anID]; ! if (nKey == NULL_INDEX) {return;} // doesn't exist ! maTrackToSensorTrack[anID] = NULL_INDEX; // used to be = maTrack.GetPoolSize(); maTrack.RemoveKey(nKey); } --- 658,678 ---- void tcAllianceSensorMap::DropTrack(tnPoolIndex anID) { ! tcSensorMapTrack* track = GetSensorMapTrack(anID); ! if (track == 0) ! { ! fprintf(stderr, "Error - tcAllianceSensorMap::DropTrack - track does not exist\n"); ! return; ! } ! ! track->Clear(); ! tnPoolIndex nKey = maTrackToSensorTrack[anID]; ! if (nKey == NULL_INDEX) ! { ! fprintf(stderr, "Error - tcAllianceSensorMap::DropTrack - track does not exist (B)\n"); ! return; ! } ! maTrackToSensorTrack[anID] = -1; maTrack.RemoveKey(nKey); } *************** *** 706,714 **** } /*******************************************************************************/ ! tcSensorMapTrack* tcAllianceSensorMap::GetSensorMapTrack(unsigned long anTrackID) { ! unsigned long nMapID; tcSensorMapTrack *pSMTrack; --- 747,759 ---- } + unsigned int tcAllianceSensorMap::GetAlliance() const + { + return alliance; + } /*******************************************************************************/ ! tcSensorMapTrack* tcAllianceSensorMap::GetSensorMapTrack(long anTrackID) { ! long nMapID; tcSensorMapTrack *pSMTrack; *************** *** 720,728 **** } /*******************************************************************************/ ! bool tcAllianceSensorMap::GetTrack(unsigned long anTrackID, tcTrack& track) { tcSensorMapTrack *pSensorTrack; ! if (!(pSensorTrack = GetSensorMapTrack(anTrackID))) { return false; } --- 765,774 ---- } /*******************************************************************************/ ! bool tcAllianceSensorMap::GetTrack(long anTrackID, tcTrack& track) { tcSensorMapTrack *pSensorTrack; ! if (!(pSensorTrack = GetSensorMapTrack(anTrackID))) ! { return false; } *************** *** 781,785 **** } ! tcAllianceSensorMap::tcAllianceSensorMap() { Clear(); } --- 827,833 ---- } ! tcAllianceSensorMap::tcAllianceSensorMap(unsigned int mapAlliance) ! : alliance(mapAlliance) ! { Clear(); } *************** *** 832,840 **** } ! void tcSensorMap::CreateMapForAlliance(UINT8 anAlliance) { if (mnMaps >= MAX_MAPS) { throw "Exceeded number of maps"; } ! mapMap[mnMaps] = new tcAllianceSensorMap(); maMapIdxForAlliance[anAlliance] = mnMaps; mnMaps++; --- 880,889 ---- } ! void tcSensorMap::CreateMapForAlliance(UINT8 anAlliance) ! { if (mnMaps >= MAX_MAPS) { throw "Exceeded number of maps"; } ! mapMap[mnMaps] = new tcAllianceSensorMap(anAlliance); maMapIdxForAlliance[anAlliance] = mnMaps; mnMaps++; *************** *** 885,905 **** } ! bool tcSensorMap::GetTrack(unsigned long anTrackID, tcTrack& track, UINT8 anAlliance) { tcAllianceSensorMap *pMap = GetMap(anAlliance); return pMap->GetTrack(anTrackID, track); } ! tcSensorMapTrack* tcSensorMap::GetSensorMapTrack(unsigned long anTrackID, UINT8 anAlliance){ tcAllianceSensorMap *pMap = GetMap(anAlliance); return pMap->GetSensorMapTrack(anTrackID); } ! int tcSensorMap::Serialize(tcFile& file, bool mbLoad) { ! if (mbLoad) { Clear(); file.Read(maMapIdxForAlliance,MAX_ALLIANCES*sizeof(int)); file.Read(&mnMaps,sizeof(mnMaps)); ! for(int n=0;n<mnMaps;n++) { ! mapMap[n] = new tcAllianceSensorMap(); mapMap[n]->Serialize(file,mbLoad); } --- 934,959 ---- } ! bool tcSensorMap::GetTrack(unsigned long anTrackID, tcTrack& track, UINT8 anAlliance) ! { tcAllianceSensorMap *pMap = GetMap(anAlliance); return pMap->GetTrack(anTrackID, track); } ! tcSensorMapTrack* tcSensorMap::GetSensorMapTrack(long anTrackID, UINT8 anAlliance) ! { tcAllianceSensorMap *pMap = GetMap(anAlliance); return pMap->GetSensorMapTrack(anTrackID); } ! int tcSensorMap::Serialize(tcFile& file, bool mbLoad) ! { ! if (mbLoad) ! { Clear(); file.Read(maMapIdxForAlliance,MAX_ALLIANCES*sizeof(int)); file.Read(&mnMaps,sizeof(mnMaps)); ! for(int n=0;n<mnMaps;n++) ! { ! mapMap[n] = new tcAllianceSensorMap(0); mapMap[n]->Serialize(file,mbLoad); } Index: tcRadar.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcRadar.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcRadar.cpp 14 Sep 2004 02:01:47 -0000 1.12 --- tcRadar.cpp 1 Nov 2004 03:17:18 -0000 1.13 *************** *** 401,404 **** --- 401,406 ---- if (!bAccept) return; + bool bNewReport = pReport->IsNew(); + if (bNewReport) {pReport->mfStartTime = t;} // new detection pReport->mfLat_rad = (float)target->mcKin.mfLat_rad; *************** *** 409,415 **** pReport->mnSensorPlatformID = parent->mnID; pReport->mnTrackID = target->mnID; ! bool bNewReport = pReport->IsNew(); ! bool bNewDetection = pSMTrack->IsNew(); ! if (bNewReport) {pReport->mfStartTime = t;} // new detection double fTrackLife = pReport->mfTimestamp - pReport->mfStartTime; if (fTrackLife >= 16.0) --- 411,415 ---- pReport->mnSensorPlatformID = parent->mnID; pReport->mnTrackID = target->mnID; ! double fTrackLife = pReport->mfTimestamp - pReport->mfStartTime; if (fTrackLife >= 16.0) *************** *** 430,434 **** } ! if (bNewDetection) { --- 430,434 ---- } ! bool bNewDetection = pSMTrack->IsNew(); if (bNewDetection) { *************** *** 438,445 **** tcSound::Get()->PlayEffect(SEFFECT_PING); } ! char zBuff[128]; ! sprintf(zBuff,"target %d detected at %3.1f km at time %.1f [a:%d]", target->mnID,range_km,t,parent->mnAlliance); - WTLC(zBuff); } --- 438,443 ---- tcSound::Get()->PlayEffect(SEFFECT_PING); } ! fprintf(stdout, "target %d detected at %3.1f km at time %.1f [a:%d]\n", target->mnID,range_km,t,parent->mnAlliance); } |
|
From: Dewitt C. <ddc...@us...> - 2004-11-01 03:17:28
|
Update of /cvsroot/gcblue/gcb_wx/src/scriptinterface In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20973/src/scriptinterface Modified Files: tcTrackInterface.cpp Log Message: A few more changes related to GDI+ replacement Index: tcTrackInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcTrackInterface.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcTrackInterface.cpp 8 Aug 2004 00:31:34 -0000 1.6 --- tcTrackInterface.cpp 1 Nov 2004 03:17:18 -0000 1.7 *************** *** 40,43 **** --- 40,53 ---- namespace ScriptInterface { + tcAllianceSensorMap* tcTrackInterface::mpSensorMap = NULL; + unsigned int tcTrackInterface::mnTrackID = 0xFFFFFFFF; + + void tcTrackInterface::AttachSensorMap(tcAllianceSensorMap *apSM) + { + mpSensorMap = apSM; + fprintf(stdout, "tcTrackInterface - Attaching sensor map for alliance: %d\n", + mpSensorMap->GetAlliance()); + } + void tcTrackInterface::DropTrack() { *************** *** 51,77 **** if (mnTrackID == 0xFFFFFFFF) {return;} tcSensorMapTrack *pSMTrack = mpSensorMap->GetSensorMapTrack(mnTrackID); ! if (pSMTrack == NULL) {return;} pSMTrack->mnAffiliation = anAffil; } ! void tcTrackInterface::DeclareFriendly(void) { SetAffiliation((UINT8)FRIENDLY); } ! void tcTrackInterface::DeclareNeutral(void) { SetAffiliation((UINT8)NEUTRAL); } ! void tcTrackInterface::DeclareHostile(void) { SetAffiliation((UINT8)HOSTILE); } - tcAllianceSensorMap* tcTrackInterface::mpSensorMap = NULL; - unsigned int tcTrackInterface::mnTrackID = 0xFFFFFFFF; ! tcTrackInterface::tcTrackInterface(void) { } ! tcTrackInterface::~tcTrackInterface(void) { } --- 61,94 ---- if (mnTrackID == 0xFFFFFFFF) {return;} tcSensorMapTrack *pSMTrack = mpSensorMap->GetSensorMapTrack(mnTrackID); ! if (pSMTrack == NULL) ! { ! fprintf(stderr, "Warning - tcTrackInterface::SetAffiliation - " ! "couldn't find track id: %d, alliance: %d\n", ! mnTrackID, mpSensorMap->GetAlliance()); ! return; ! } pSMTrack->mnAffiliation = anAffil; } ! void tcTrackInterface::DeclareFriendly() ! { SetAffiliation((UINT8)FRIENDLY); } ! void tcTrackInterface::DeclareNeutral() ! { SetAffiliation((UINT8)NEUTRAL); } ! void tcTrackInterface::DeclareHostile() ! { SetAffiliation((UINT8)HOSTILE); } ! tcTrackInterface::tcTrackInterface() { } ! tcTrackInterface::~tcTrackInterface() { } |
|
From: Dewitt C. <ddc...@us...> - 2004-11-01 03:17:28
|
Update of /cvsroot/gcblue/gcb_wx/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20973/xml Modified Files: briefing_left.xml info_console.xml Log Message: A few more changes related to GDI+ replacement Index: info_console.xml =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/xml/info_console.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** info_console.xml 7 Oct 2004 22:02:59 -0000 1.1 --- info_console.xml 1 Nov 2004 03:17:19 -0000 1.2 *************** *** 1,5 **** <Window> ! <TextBox TopMargin="2" BottomMargin="2" Wrap="70" DrawBorder="0"/> </Window> \ No newline at end of file --- 1,5 ---- <Window> ! <TextBox TopMargin="2" BottomMargin="2" Wrap="70" DrawBorder="0" FontSize="12"/> </Window> \ No newline at end of file Index: briefing_left.xml =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/xml/briefing_left.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** briefing_left.xml 21 Oct 2004 04:11:00 -0000 1.2 --- briefing_left.xml 1 Nov 2004 03:17:19 -0000 1.3 *************** *** 1,5 **** <Window> ! <Button X="50" Y="65" Width="65" Height="15" Caption="Skip" Command="120"/> ! ! <TextBox TopMargin="30" BottomMargin="50" Wrap="60"/> </Window> \ No newline at end of file --- 1,4 ---- <Window> ! <Button X="5" Y="5" Width="65" Height="15" Caption="Skip" Command="120"/> ! <TextBox TopMargin="30" BottomMargin="50" Wrap="60" FontSize="12"/> </Window> \ No newline at end of file |
|
From: Dewitt C. <ddc...@us...> - 2004-11-01 03:17:26
|
Update of /cvsroot/gcblue/gcb_wx/src/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20973/src/database Modified Files: tcDatabase.cpp Log Message: A few more changes related to GDI+ replacement Index: tcDatabase.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcDatabase.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tcDatabase.cpp 14 Sep 2004 02:01:46 -0000 1.16 --- tcDatabase.cpp 1 Nov 2004 03:17:17 -0000 1.17 *************** *** 918,922 **** bool bFound = false; int nTries = 0; ! tcDatabaseObject *pdata; while ((bSearching)&&(nTries++ < 256)) --- 918,922 ---- bool bFound = false; int nTries = 0; ! tcDatabaseObject *pdata = 0; while ((bSearching)&&(nTries++ < 256)) *************** *** 946,950 **** tnPoolIndex tcDatabase::GetRandomKey() { tnPoolIndex nMapSize, nKey, nPoolPos; ! tcDatabaseObject *pdbobj; bool bSearching; --- 946,950 ---- tnPoolIndex tcDatabase::GetRandomKey() { tnPoolIndex nMapSize, nKey, nPoolPos; ! tcDatabaseObject *pdbobj = 0; bool bSearching; |
|
From: Dewitt C. <ddc...@us...> - 2004-10-29 02:51:26
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17989/include/sim Modified Files: Game.h tcMenu.h Log Message: A few more changes related to GDI+ replacement Index: Game.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/Game.h,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** Game.h 21 Oct 2004 04:10:59 -0000 1.48 --- Game.h 29 Oct 2004 02:50:43 -0000 1.49 *************** *** 217,220 **** --- 217,222 ---- bool enableGraphicsEngine; bool enableTacticalMap; + bool togglePopup; ///< true to toggle popup menu state + wxPoint rightButtonPoint; ///< position of mouse at last right button event void Activate(); *************** *** 272,275 **** --- 274,278 ---- void SynchTimeAcceleration(); void Toggle3DSize(); + void TogglePopup(); void UninitGame(); ///< uninitializes components initialized by InitGame() void Update3DSize(); Index: tcMenu.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcMenu.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcMenu.h 17 Aug 2004 02:22:56 -0000 1.6 --- tcMenu.h 29 Oct 2004 02:50:43 -0000 1.7 *************** *** 1,4 **** ! /* ! ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. --- 1,6 ---- ! /** ! ** @file tcMenu.h ! */ ! /* Copyright (C) 2003-2004 Dewitt Colclough (de...@tw...) ** All rights reserved. *************** *** 27,34 **** #include "wx/wx.h" ! #include "wx/msw/private.h" //for MS Windows specific definitions #include <string> #include <vector> ! #include "gdiplus.h" class tcMenu; --- 29,38 ---- #include "wx/wx.h" ! #include "simmath.h" ! #include "tc3DWindow.h" ! #include <string> #include <vector> ! class tcMenu; *************** *** 43,47 **** bool mbTop; bool mbBottom; ! Gdiplus::RectF mrect; tcMenu *mpSubMenu; --- 47,51 ---- bool mbTop; bool mbBottom; ! tcRect mrect; tcMenu *mpSubMenu; *************** *** 54,58 **** /** ! * note: this class mixes view/display with data, may have to be separated later */ class tcMenu --- 58,64 ---- /** ! * Note: this class mixes view/display with data, may have to be separated later ! * This class should be converted to a tc3DWindow (or something more logical). ! * The current code is a hack to get this to work with new 3D window system. */ class tcMenu *************** *** 62,95 **** void AddItem(std::string caption, std::string command, int param = -1); void AddItemUI(std::string caption, std::string callback, std::string input, int param = -1); ! void BeginSubMenu(void); ! void Clear(void); ! void ClearSelected(void); ! int Draw(Gdiplus::Graphics *apGraphics); ! virtual void DrawItem(tsMenuData *apMD, Gdiplus::Graphics *apGraphics); ! void EndSubMenu(void); ! static void InitGdi(void); ! tsMenuData* ItemContainingPoint(Gdiplus::PointF point); ! bool UpdateSelection(Gdiplus::PointF point); ! static void ReleaseGdi(void); ! void SetAnchor(Gdiplus::PointF p) {anchor = p;} ! void UpdateRegions(Gdiplus::Graphics *apGraphics); ! tcMenu(void); tcMenu(tcMenu* apParent); ! virtual ~tcMenu(void); private: std::vector<tsMenuData> maMenuData; tcMenu *mpParent; tcMenu *mpCurrent; // current menu level to add items to ! Gdiplus::PointF anchor; // reference point (upper left) for drawing menu float mfItemWidth, mfItemHeight; ! Gdiplus::RectF menubox; // rectangle encompassing entire menu bool mbUpdateRegions; - - static unsigned mnReferenceCount; - static Gdiplus::Pen *mpPen; // GDI+ objects - static Gdiplus::SolidBrush *mpBrush; - static Gdiplus::Font *mpFont; - static WCHAR mzwchar[255]; // wide char array for string buffer }; --- 68,101 ---- void AddItem(std::string caption, std::string command, int param = -1); void AddItemUI(std::string caption, std::string callback, std::string input, int param = -1); ! void BeginSubMenu(); ! void Clear(); ! void ClearSelected(); ! void Draw(); ! virtual void DrawItem(tsMenuData* apMD); ! void EndSubMenu(); ! tsMenuData* ItemContainingPoint(const wxRealPoint& point); ! bool UpdateSelection(const wxRealPoint& point); ! ! void SetAnchor(const wxRealPoint& p) {anchor = p;} ! void UpdateRegions(); ! ! static void SetParentWindow(tc3DWindow* win) {parentWindow = win;} ! ! static tc3DWindow* parentWindow; ///< workaround to make this work with 3D window system ! ! tcMenu(); tcMenu(tcMenu* apParent); ! virtual ~tcMenu(); ! private: std::vector<tsMenuData> maMenuData; tcMenu *mpParent; tcMenu *mpCurrent; // current menu level to add items to ! wxRealPoint anchor; // reference point (upper left) for drawing menu float mfItemWidth, mfItemHeight; ! const float fontSize; ! tcRect menubox; // rectangle encompassing entire menu bool mbUpdateRegions; }; |
|
From: Dewitt C. <ddc...@us...> - 2004-10-29 02:51:25
|
Update of /cvsroot/gcblue/gcb_wx/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17989/src/common Modified Files: simmath.cpp tcSoundConsole.cpp Log Message: A few more changes related to GDI+ replacement Index: tcSoundConsole.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcSoundConsole.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcSoundConsole.cpp 7 Oct 2004 22:01:45 -0000 1.8 --- tcSoundConsole.cpp 29 Oct 2004 02:50:43 -0000 1.9 *************** *** 28,31 **** --- 28,32 ---- #include "tcConsoleBox.h" #include "tcSound.h" + #include "tcTime.h" #include "common/tinyxml.h" *************** *** 36,42 **** void tcSoundConsole::Draw() { if (textBox->Redraw()) { ! tcSound::Get()->PlayEffect(mnSoundEffect); } --- 37,49 ---- void tcSoundConsole::Draw() { + if (textBox->Redraw()) { ! unsigned int counter = tcTime::Get()->Get30HzCount(); ! if (counter - lastEffect > 4) ! { ! tcSound::Get()->PlayEffect(mnSoundEffect); ! lastEffect = counter; ! } } *************** *** 89,95 **** const wxString& configFile, const wxString& name) : ! tcXmlWindow(parent, pos, size, configFile, name) { - mnSoundEffect = SEFFECT_CONSOLE; if (!config) --- 96,103 ---- const wxString& configFile, const wxString& name) : ! tcXmlWindow(parent, pos, size, configFile, name), ! mnSoundEffect(SEFFECT_CONSOLE), ! lastEffect(0) { if (!config) Index: simmath.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/simmath.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** simmath.cpp 16 Aug 2004 01:43:30 -0000 1.16 --- simmath.cpp 29 Oct 2004 02:50:43 -0000 1.17 *************** *** 102,115 **** } /******************************* tcGeoRect ********************************/ /** * @return true if point (lon,lat) in radians is within * @return region. */ ! bool tcGeoRect::ContainsPoint(float lon, float lat) { tsGeoPoint p; ! p.Set(lon, lat, 0); return GeoWithinRegion(p, this) != 0; } --- 102,122 ---- } + bool tcRect::ContainsPoint(float x, float y) + { + return (x >= left) && (x < right) && (y >= bottom) && (y < top); + } + /******************************* tcGeoRect ********************************/ /** + * @param x longitude in radians + * @param y latitude in radians * @return true if point (lon,lat) in radians is within * @return region. */ ! bool tcGeoRect::ContainsPoint(float x, float y) { tsGeoPoint p; ! p.Set(x, y, 0); return GeoWithinRegion(p, this) != 0; } |
|
From: Dewitt C. <ddc...@us...> - 2004-10-29 02:51:25
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17989/include/graphics Modified Files: tc3DWindow.h tcHookInfo.h tcPanel.h tcPopupControl.h Log Message: A few more changes related to GDI+ replacement Index: tcPopupControl.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcPopupControl.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcPopupControl.h 5 Sep 2004 01:02:00 -0000 1.1 --- tcPopupControl.h 29 Oct 2004 02:50:43 -0000 1.2 *************** *** 29,40 **** #include "wx/wx.h" ! #ifdef WIN32 ! #include "wx/msw/private.h" // for MS Windows specific definitions ! #endif #include <string> #include <vector> #include "tcMenu.h" #include "tcPanel.h" ! #include "tcWindow.h" #include "commandlist.h" --- 29,38 ---- #include "wx/wx.h" ! #include <string> #include <vector> #include "tcMenu.h" #include "tcPanel.h" ! #include "tc3DWindow.h" #include "commandlist.h" *************** *** 57,61 **** }; ! class tcPopupControl : public tcWindow { public: --- 55,59 ---- }; ! class tcPopupControl : public tc3DWindow { public: *************** *** 71,77 **** void OnLButtonDown(wxMouseEvent& event); void OnMouseMove(wxMouseEvent& event); ! int Draw(); void UpdateRegions(); void InitMenu(); tcPopupControl(wxWindow *parent, const wxPoint& pos, const wxSize& size, --- 69,76 ---- void OnLButtonDown(wxMouseEvent& event); void OnMouseMove(wxMouseEvent& event); ! void Draw(); void UpdateRegions(); void InitMenu(); + tcPopupControl(wxWindow *parent, const wxPoint& pos, const wxSize& size, *************** *** 92,99 **** wxRect mrectMenuExtent; - Gdiplus::Pen *mpPen; - Gdiplus::SolidBrush *mpBrush; - Gdiplus::Font *mpFont; - WCHAR mzwchar[255]; // wide char array for string buffer bool mbShowDebug; --- 91,94 ---- Index: tcPanel.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcPanel.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcPanel.h 5 Sep 2004 01:02:00 -0000 1.1 --- tcPanel.h 29 Oct 2004 02:50:43 -0000 1.2 *************** *** 1,6 **** ! /* ! ** tcPanel.h ! ** ! ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. --- 1,6 ---- ! /** ! ** @file tcPanel.h ! */ ! /* Copyright (C) 2003-2004 Dewitt Colclough (de...@tw...) ** All rights reserved. *************** *** 28,35 **** #include "wx/wx.h" ! #include "wx/msw/private.h" // for MS Windows specific definitions #include <string> #include <vector> ! #include "gdiplus.h" struct tsItemData --- 28,37 ---- #include "wx/wx.h" ! ! #include "simmath.h" ! #include "tc3DWindow.h" #include <string> #include <vector> ! struct tsItemData *************** *** 41,45 **** bool isSelected; bool isBold; ! Gdiplus::RectF rect; void Clear() --- 43,47 ---- bool isSelected; bool isBold; ! tcRect rect; void Clear() *************** *** 50,55 **** }; ! // note: this class mixes view/display with data, may have to be separated later ! class tcPanel { public: void AddItem(std::string caption, std::string command, --- 52,62 ---- }; ! /** ! * note: this class mixes view/display with data, may have to be separated later ! * Needs refactoring to update to coherent system just like tcMenu ! * @see tcMenu ! */ ! class tcPanel ! { public: void AddItem(std::string caption, std::string command, *************** *** 59,94 **** float x, float y, float width, float height, int param = -1); void BoldLastItem(); ! void Clear(void); ! void ClearSelected(void); ! int Draw(Gdiplus::Graphics *apGraphics); ! virtual void DrawItem(tsItemData *item, Gdiplus::Graphics *apGraphics); ! static void InitGdi(void); void InitWithDefaults(); ! tsItemData* ItemContainingPoint(Gdiplus::PointF point); ! bool UpdateSelection(Gdiplus::PointF point); ! static void ReleaseGdi(void); ! void SetAnchor(Gdiplus::PointF p) {anchor = p;} void SetTitle(std::string new_title) {title = new_title;} ! void UpdateBox(void); ! tcPanel(void); tcPanel(tcPanel* apParent); ! virtual ~tcPanel(void); private: std::string title; std::vector<tsItemData> panelItems; ! Gdiplus::PointF anchor; ///< reference point (upper left) for drawing menu float mfItemWidth, mfItemHeight; ! Gdiplus::RectF boundingBox; ///< rectangle encompassing entire control ! Gdiplus::RectF titleBox; ///< rectangle for title bool mbUpdateRegions; float border_width; ! static unsigned mnReferenceCount; ! static Gdiplus::Pen *mpPen; ///< GDI+ objects ! static Gdiplus::SolidBrush *mpBrush; ! static Gdiplus::Font *mpFont; ! static Gdiplus::Font *mpBoldFont; ! static Gdiplus::StringFormat stringformatleftalign; ! static WCHAR mzwchar[255]; ///< wide char array for string buffer }; --- 66,98 ---- float x, float y, float width, float height, int param = -1); void BoldLastItem(); ! void Clear(); ! void ClearSelected(); ! void Draw(); ! virtual void DrawItem(tsItemData *item); void InitWithDefaults(); ! tsItemData* ItemContainingPoint(const wxRealPoint& point); ! bool UpdateSelection(const wxRealPoint& point); ! static void ReleaseGdi(); ! void SetAnchor(const wxRealPoint& p) {anchor = p;} void SetTitle(std::string new_title) {title = new_title;} ! void UpdateBox(); ! static void SetParentWindow(tc3DWindow* win) {parentWindow = win;} ! ! static tc3DWindow* parentWindow; ///< workaround to make this work with 3D window system ! ! tcPanel(); tcPanel(tcPanel* apParent); ! virtual ~tcPanel(); private: std::string title; std::vector<tsItemData> panelItems; ! wxRealPoint anchor; ///< reference point (upper left) for drawing menu float mfItemWidth, mfItemHeight; ! tcRect boundingBox; ///< rectangle encompassing entire control ! tcRect titleBox; ///< rectangle for title bool mbUpdateRegions; float border_width; ! const float fontSize; }; Index: tcHookInfo.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcHookInfo.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcHookInfo.h 7 Oct 2004 22:01:12 -0000 1.2 --- tcHookInfo.h 29 Oct 2004 02:50:43 -0000 1.3 *************** *** 79,82 **** --- 79,83 ---- tnPoolIndex mnHookID; + //Gdiplus::Pen *mpPen; // GDI+ objects //Gdiplus::SolidBrush *mpBrush; Index: tc3DWindow.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DWindow.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tc3DWindow.h 21 Oct 2004 04:10:58 -0000 1.6 --- tc3DWindow.h 29 Oct 2004 02:50:42 -0000 1.7 *************** *** 167,171 **** void MoveWindow(int ax, int ay); wxRealPoint RelativeToScreen(float x, float y); - void SetBackground(UINT32 anColor); bool GetBlend(); --- 167,170 ---- *************** *** 178,181 **** --- 177,181 ---- virtual void SetActive(bool abActive); + void SetBackground(unsigned int color) {} void SetBackgroundDraw(bool state); void SetResizeable2D(bool abState) {resizeable2DSurface = abState;} ///< @see tc3DWindow::OnSize *************** *** 210,213 **** --- 210,218 ---- bool resizeable2DSurface; + float fontSize; ///< default normal font size + float fontSizeLarge; ///< default large font size + float fontSizeSmall; ///< default small font size + + osg::ref_ptr<osgText::Font> defaultFont; *************** *** 248,256 **** void SkipMouseEvent(wxMouseEvent& event); ///< adjusts position to parent frame long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); private: osg::ref_ptr<osg::Geode> root; ///< root node for drawables osg::ref_ptr<osg::Group> groupRoot; ///< root node for transforms ! osg::ref_ptr<osg::Switch> switchNode; ///< node to enable/disable window ! osg::ref_ptr<osg::MatrixTransform> transform; ///< transform node for 3D draw objects osg::ref_ptr<osgText::Text> referenceText; ///< text to make size measurements with --- 253,267 ---- void SkipMouseEvent(wxMouseEvent& event); ///< adjusts position to parent frame long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + virtual void UpdatePositionAndSize(const wxPoint& pos, const wxSize& size); + private: + osg::ref_ptr<osg::MatrixTransform> transform; ///< transform node for 3D draw objects + osg::ref_ptr<osg::Switch> switchNode; ///< node to enable/disable window osg::ref_ptr<osg::Geode> root; ///< root node for drawables osg::ref_ptr<osg::Group> groupRoot; ///< root node for transforms ! osg::ref_ptr<osg::Geode> textRoot; ///< root node for text graphics ! osg::ref_ptr<osg::Geode> backgroundRoot; ///< root node for background graphics ! ! osg::ref_ptr<osgText::Text> referenceText; ///< text to make size measurements with |
|
From: Dewitt C. <ddc...@us...> - 2004-10-29 02:51:21
|
Update of /cvsroot/gcblue/gcb_wx/include/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17989/include/common Modified Files: simmath.h tcSoundConsole.h Log Message: A few more changes related to GDI+ replacement Index: tcSoundConsole.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/tcSoundConsole.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcSoundConsole.h 7 Oct 2004 22:01:11 -0000 1.9 --- tcSoundConsole.h 29 Oct 2004 02:50:42 -0000 1.10 *************** *** 53,56 **** --- 53,57 ---- tcConsoleBox* textBox; int mnSoundEffect; ///< sound effect to use when printing text + unsigned int lastEffect; ///< counter value when last sound effect was played }; Index: simmath.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/simmath.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** simmath.h 2 Oct 2004 22:41:32 -0000 1.21 --- simmath.h 29 Oct 2004 02:50:41 -0000 1.22 *************** *** 59,62 **** --- 59,68 ---- public: float left,right,top,bottom; + + virtual bool ContainsPoint(float x, float y); + virtual float GetLeft() const {return left;} + virtual float GetRight() const {return right;} + virtual float GetTop() const {return top;} + virtual float GetBottom() const {return bottom;} virtual float Width() const {return right-left;} virtual float Height() const {return top-bottom;} *************** *** 73,78 **** void ApplyBounds(tcGeoRect& r); void Offset(float dx, float dy); ! bool ContainsPoint(float lon, float lat); ! void Set(float x1,float x2,float y1,float y2); void SetDegrees(float lon1_deg, float lon2_deg, float lat1_deg, float lat2_deg); float Width(); --- 79,84 ---- void ApplyBounds(tcGeoRect& r); void Offset(float dx, float dy); ! virtual bool ContainsPoint(float x, float y); ! void Set(float x1, float x2, float y1, float y2); void SetDegrees(float lon1_deg, float lon2_deg, float lat1_deg, float lat2_deg); float Width(); |
|
From: Dewitt C. <ddc...@us...> - 2004-10-29 02:51:20
|
Update of /cvsroot/gcblue/gcb_wx/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17989/docs Modified Files: CHANGES.txt Log Message: A few more changes related to GDI+ replacement Index: CHANGES.txt =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/docs/CHANGES.txt,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** CHANGES.txt 7 Oct 2004 22:01:38 -0000 1.38 --- CHANGES.txt 29 Oct 2004 02:50:40 -0000 1.39 *************** *** 4,7 **** --- 4,10 ---- 0.6.1 --------------------------------------------------------------------- + *** 2004-10-28 Dewitt Colclough *** + - Ported hook info and briefing windows to 3D win system + *** 2004-10-07 Dewitt Colclough *** - Created 3D window class derived from wxWindow to encapsulate 3D window |
|
From: Dewitt C. <ddc...@us...> - 2004-10-29 02:51:04
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17989/src/sim Modified Files: Game.cpp tcMenu.cpp Log Message: A few more changes related to GDI+ replacement Index: tcMenu.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcMenu.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcMenu.cpp 8 Aug 2004 00:31:35 -0000 1.6 --- tcMenu.cpp 29 Oct 2004 02:50:54 -0000 1.7 *************** *** 1,6 **** ! /* ! ** tcMenu.cpp ! ** ! ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. --- 1,6 ---- ! /** ! ** @file tcMenu.cpp ! */ ! /* Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. *************** *** 23,75 **** #ifndef WX_PRECOMP #endif #include "tcMenu.h" ! using namespace Gdiplus; using namespace std; ! // static GDI+ object init ! Pen* tcMenu::mpPen = NULL; ! SolidBrush* tcMenu::mpBrush = NULL; ! Font* tcMenu::mpFont = NULL; ! unsigned tcMenu::mnReferenceCount = 0; ! WCHAR tcMenu::mzwchar[255]; void tcMenu::AddItem(string caption, int command) { ! if (mpCurrent == this) ! { ! tsMenuData md; ! md.Clear(); ! md.mzCaption = caption; ! md.mzCommand = ""; ! md.mzUserInput = ""; ! md.mnCommand = command; ! maMenuData.push_back(md); ! } ! else ! { ! mpCurrent->AddItem(caption, command); ! } } void tcMenu::AddItem(string caption, std::string command, int param) { ! if (mpCurrent == this) ! { ! tsMenuData md; ! md.Clear(); ! md.mzCaption = caption; ! md.mzCommand = command; ! md.mzUserInput = ""; ! md.mnCommand = param; ! maMenuData.push_back(md); ! } ! else { ! mpCurrent->AddItem(caption, command, param); ! } } --- 23,72 ---- #ifndef WX_PRECOMP + #include "wx/wx.h" #endif #include "tcMenu.h" ! using namespace std; ! ! tc3DWindow* tcMenu::parentWindow = 0; void tcMenu::AddItem(string caption, int command) { ! if (mpCurrent == this) ! { ! tsMenuData md; ! md.Clear(); ! md.mzCaption = caption; ! md.mzCommand = ""; ! md.mzUserInput = ""; ! md.mnCommand = command; ! maMenuData.push_back(md); ! } ! else ! { ! mpCurrent->AddItem(caption, command); ! } } void tcMenu::AddItem(string caption, std::string command, int param) { ! if (mpCurrent == this) ! { ! tsMenuData md; ! md.Clear(); ! md.mzCaption = caption; ! md.mzCommand = command; ! md.mzUserInput = ""; ! md.mnCommand = param; ! maMenuData.push_back(md); ! } ! else { ! mpCurrent->AddItem(caption, command, param); ! } } *************** *** 80,382 **** void tcMenu::AddItemUI(std::string caption, std::string callback, std::string input, int param) { ! if (mpCurrent == this) ! { ! tsMenuData md; ! md.Clear(); ! md.mzCaption = caption; ! md.mzCommand = callback; ! md.mzUserInput = input; ! md.mnCommand = param; ! maMenuData.push_back(md); ! } ! else ! { ! mpCurrent->AddItemUI(caption, callback, input, param); ! } } void tcMenu::BeginSubMenu() { ! if (mpCurrent == this) ! { ! int nSize = (int)maMenuData.size(); ! if (nSize == 0) {return;} // can't add submenu to empty menu ! tsMenuData& md = maMenuData[nSize-1]; ! if (md.mpSubMenu == NULL) ! { ! // create new menu with this as parent ! tcMenu *pNewMenu = new tcMenu(this); ! md.mpSubMenu = pNewMenu; ! } ! // set mpCurrent to submenu of last item ! mpCurrent = md.mpSubMenu; ! md.mnCommand = 0; // item with subitems can't have command ! md.mzCommand = ""; ! } ! else ! { ! mpCurrent->BeginSubMenu(); ! } } ! void tcMenu::EndSubMenu() { ! if (mpCurrent == this) { ! if (mpParent == NULL) {return;} // error endsub on top level ! mpParent->mpCurrent = mpParent; ! } ! else { ! mpCurrent->EndSubMenu(); ! } } ! void tcMenu::ClearSelected() { ! int nMenuSize = (int)maMenuData.size(); ! for(int i=0;i<nMenuSize;i++) { ! tsMenuData *pmd = &maMenuData[i]; ! pmd->mbSelected = false; ! if (pmd->mpSubMenu != NULL) {pmd->mpSubMenu->ClearSelected();} ! } } ! void tcMenu::Clear() { ! int nMenuSize = (int)maMenuData.size(); ! // clear submenus first ! for(int i=0;i<nMenuSize;i++) { ! tsMenuData *pmd = &maMenuData[i]; ! if (pmd->mpSubMenu != NULL) { ! pmd->mpSubMenu->Clear(); ! delete pmd->mpSubMenu; ! pmd->mpSubMenu = NULL; ! } ! } ! maMenuData.clear(); ! mbUpdateRegions = true; ! mpCurrent = this; ! mpParent = NULL; } ! int tcMenu::Draw(Graphics *apGraphics) { ! if (mbUpdateRegions) { ! UpdateRegions(apGraphics); ! mbUpdateRegions = false; ! } ! int nMenuSize = (int)maMenuData.size(); // number of items in menu ! ! for (int i=0;i<nMenuSize;i++) { ! tsMenuData *pmd = &maMenuData[i]; ! DrawItem(pmd, apGraphics); ! } ! return 1; } ! void tcMenu::DrawItem(tsMenuData *apMD, Graphics *apGraphics) { ! int nAlpha = 200; ! if (apGraphics==NULL) {return;} ! //if the menu item is selected ! if (apMD->mbSelected) { ! mpBrush->SetColor(Color(nAlpha,0,150,255)); } ! else { ! mpBrush->SetColor(Color(nAlpha,200,200,210)); ! } ! RectF item_rect = apMD->mrect; ! item_rect.Offset(anchor); ! apGraphics->FillRectangle(mpBrush,item_rect); ! ! if (apMD->mbSelected) { ! mpBrush->SetColor(Color(nAlpha,255,255,255)); } - else { - mpBrush->SetColor(Color(nAlpha,0,0,0)); - } ! PointF pointf(apMD->mrect.GetLeft() + 5.0f, apMD->mrect.GetTop()); ! pointf = pointf + anchor; - MultiByteToWideChar(CP_ACP, 0, apMD->mzCaption.c_str(), -1, mzwchar, 255); - apGraphics->DrawString(mzwchar, -1, mpFont, pointf, mpBrush); ! if (apMD->mpSubMenu != NULL) { ! // draw submenu triangle icon ! PointF aSubIcon[3]; // points for tri submenu icon, rel to upper left of item ! aSubIcon[0].X = item_rect.X + mfItemWidth - 2.0f; ! aSubIcon[0].Y = item_rect.Y + 0.5f*item_rect.Height; ! aSubIcon[1].X = aSubIcon[0].X - 5.0f; ! aSubIcon[1].Y = aSubIcon[0].Y - 5.0f; ! aSubIcon[2].X = aSubIcon[1].X; ! aSubIcon[2].Y = aSubIcon[0].Y + 5.0f; ! apGraphics->FillPolygon(mpBrush,aSubIcon,3); ! // if item is selected, draw the submenu ! if (apMD->mbSelected) { ! PointF submenu_offset; ! submenu_offset.X = item_rect.GetRight()-1.0f; ! submenu_offset.Y = item_rect.GetTop(); ! apMD->mpSubMenu->SetAnchor(submenu_offset); ! apMD->mpSubMenu->Draw(apGraphics); ! } ! } } - void tcMenu::InitGdi() { - if (mpPen != NULL) {return;} ! mpPen = new Pen(Color(0xFEFFFFFF),2); ! if (mpPen == NULL) {throw "mpPen creation failed";} ! ! FontFamily ff(L"Arial"); ! mpFont = new Font(&ff,12,FontStyleBold,UnitPixel); ! if (mpFont == NULL) {throw "DDPopupControl - mpFont creation failed\n";} ! mpBrush = new SolidBrush(Color(0xFEFFFFFF)); // color is ARGB ! if (mpBrush == NULL) {throw "DDPopupControl - mpBrush creation failed\n";} - mnReferenceCount = 0; // reset reference count - } ! void tcMenu::ReleaseGdi() { ! if (mpPen != NULL) {delete mpPen;mpPen=NULL;} ! if (mpFont != NULL) {delete mpFont;mpFont=NULL;} ! if (mpBrush != NULL) {delete mpBrush;mpBrush=NULL;} } ! /*****************************************************************************/ ! /* return pointer to item (NULL for none) containing point */ ! tsMenuData* tcMenu::ItemContainingPoint(PointF point) { ! int nMenuSize = (int)maMenuData.size(); ! ! PointF local_point = point - anchor; // adjust for anchor ! ! for(int i=0;i<nMenuSize;i++) { ! tsMenuData *pmd = &maMenuData[i]; ! if (pmd->mrect.Contains(local_point)) { ! return pmd; ! } ! // if item is selected and has submenu, check submenu ! if ((pmd->mpSubMenu != NULL)&&(pmd->mbSelected)) { ! tsMenuData *psub = pmd->mpSubMenu->ItemContainingPoint(point); ! if (psub != NULL) {return psub;} ! } ! } ! return NULL; // not found } ! /*****************************************************************************/ ! /* select menu item and all parent items containing point */ ! bool tcMenu::UpdateSelection(PointF point) { ! int nMenuSize = (int)maMenuData.size(); ! PointF local_point = point - anchor; // adjust for anchor ! // if (!menubox.Contains(point)) { return NULL;} ! bool bResult = false; ! for(int i=0;i<nMenuSize;i++) { ! tsMenuData *pmd = &maMenuData[i]; ! tcMenu *pSubMenu = pmd->mpSubMenu; ! bool bSelected = pmd->mbSelected; ! if (pmd->mrect.Contains(local_point)) { ! pmd->mbSelected = true; ! if (pSubMenu != NULL) {pSubMenu->ClearSelected();} ! bResult = true; ! } ! else if ((pSubMenu != NULL)&&(bSelected)) { ! if (pSubMenu->UpdateSelection(point) == false) { ! pmd->mbSelected = false; ! } ! else { ! bResult = true; ! } ! } ! else { ! pmd->mbSelected = false; ! } ! } ! return bResult; // not found ! } ! void tcMenu::UpdateRegions(Graphics *apGraphics) { ! float fMaxWidth = 0; ! float fMaxHeight = 0; ! tsMenuData *pmd; ! int nMenuSize = (int)maMenuData.size(); ! ! // find max item width and height ! for(int i=0;i<nMenuSize;i++) { ! RectF boundingBox; ! pmd = &maMenuData[i]; ! MultiByteToWideChar(CP_ACP, 0, pmd->mzCaption.c_str(), -1, mzwchar, 255); ! apGraphics->MeasureString(mzwchar, -1, mpFont, PointF(0,0), &boundingBox); ! fMaxWidth = (boundingBox.Width > fMaxWidth) ? boundingBox.Width : fMaxWidth; ! fMaxHeight = (boundingBox.Height > fMaxHeight) ? boundingBox.Height : fMaxHeight; ! } ! mfItemWidth = fMaxWidth + 12.0f; ! mfItemHeight = fMaxHeight; ! menubox.X = 0; ! menubox.Y = 0; // upper-left corner ! menubox.Width = fMaxWidth + 12.0f; ! menubox.Height = (fMaxHeight + 4.0f)*((float)nMenuSize); ! // set item rectangles ! RectF itemrect; ! itemrect.X = 0; ! itemrect.Y = 0; ! itemrect.Width = mfItemWidth; ! itemrect.Height = mfItemHeight; ! for(int i=0;i<nMenuSize;i++) { ! pmd = &maMenuData[i]; ! pmd->mrect = itemrect; ! itemrect.Y += mfItemHeight - 1.0f; ! } } ! tcMenu::tcMenu(void) { ! maMenuData.clear(); ! mbUpdateRegions = true; ! mpCurrent = this; ! mpParent = NULL; ! ! if (mpPen == NULL) {InitGdi();} ! mnReferenceCount++; } ! tcMenu::tcMenu(tcMenu* apParent) { ! maMenuData.clear(); ! mbUpdateRegions = true; ! mpCurrent = this; ! mpParent = apParent; ! ! if (mpPen == NULL) {InitGdi();} ! mnReferenceCount++; } ! tcMenu::~tcMenu(void) { ! Clear(); ! if (mnReferenceCount == 0) { ! throw "bad reference count"; ! } ! mnReferenceCount--; ! if (mnReferenceCount==0) {ReleaseGdi();} } --- 77,387 ---- void tcMenu::AddItemUI(std::string caption, std::string callback, std::string input, int param) { ! if (mpCurrent == this) ! { ! tsMenuData md; ! md.Clear(); ! md.mzCaption = caption; ! md.mzCommand = callback; ! md.mzUserInput = input; ! md.mnCommand = param; ! maMenuData.push_back(md); ! } ! else ! { ! mpCurrent->AddItemUI(caption, callback, input, param); ! } } void tcMenu::BeginSubMenu() { ! if (mpCurrent == this) ! { ! int nSize = (int)maMenuData.size(); ! if (nSize == 0) {return;} // can't add submenu to empty menu ! tsMenuData& md = maMenuData[nSize-1]; ! if (md.mpSubMenu == NULL) ! { ! // create new menu with this as parent ! tcMenu *pNewMenu = new tcMenu(this); ! md.mpSubMenu = pNewMenu; ! } ! // set mpCurrent to submenu of last item ! mpCurrent = md.mpSubMenu; ! md.mnCommand = 0; // item with subitems can't have command ! md.mzCommand = ""; ! } ! else ! { ! mpCurrent->BeginSubMenu(); ! } } ! void tcMenu::EndSubMenu() ! { ! if (mpCurrent == this) ! { ! if (mpParent == NULL) {return;} // error endsub on top level ! mpParent->mpCurrent = mpParent; ! } ! else { ! mpCurrent->EndSubMenu(); ! } } ! void tcMenu::ClearSelected() ! { ! int nMenuSize = (int)maMenuData.size(); ! for(int i=0;i<nMenuSize;i++) ! { ! tsMenuData *pmd = &maMenuData[i]; ! pmd->mbSelected = false; ! if (pmd->mpSubMenu != NULL) {pmd->mpSubMenu->ClearSelected();} ! } } ! void tcMenu::Clear() ! { ! int nMenuSize = (int)maMenuData.size(); ! // clear submenus first ! for(int i=0;i<nMenuSize;i++) ! { ! tsMenuData *pmd = &maMenuData[i]; ! if (pmd->mpSubMenu != NULL) ! { ! pmd->mpSubMenu->Clear(); ! delete pmd->mpSubMenu; ! pmd->mpSubMenu = NULL; ! } ! } ! maMenuData.clear(); ! mbUpdateRegions = true; ! mpCurrent = this; ! mpParent = NULL; } ! void tcMenu::Draw() ! { ! if (mbUpdateRegions) ! { ! UpdateRegions(); ! mbUpdateRegions = false; ! } ! int nMenuSize = (int)maMenuData.size(); // number of items in menu ! for (int i=0; i<nMenuSize; i++) ! { ! tsMenuData *pmd = &maMenuData[i]; ! DrawItem(pmd); ! } } ! void tcMenu::DrawItem(tsMenuData *apMD) ! { ! float alpha = 0.8f; ! ! osg::Vec4 color(0, 0, 0, 1); ! ! wxASSERT(parentWindow); ! //if the menu item is selected ! if (apMD->mbSelected) ! { ! color.set(0, 0.6f, 1.0f, alpha); } ! else ! { ! color.set(0.8f, 0.8f, 0.84f, alpha); ! } ! tcRect item_rect = apMD->mrect; ! item_rect.Offset(anchor.x, anchor.y); ! parentWindow->DrawRectangleR(item_rect, color, tc3DWindow::FILL_ON); ! if (apMD->mbSelected) ! { ! color.set(1, 1, 1, alpha); ! } ! else ! { ! color.set(0, 0, 0, alpha); ! } ! wxRealPoint pointf(apMD->mrect.GetLeft() + 5.0f, apMD->mrect.GetTop() - 2.0f); ! pointf = pointf + anchor; + parentWindow->DrawTextR(apMD->mzCaption.c_str(), pointf.x, pointf.y, + parentWindow->GetDefaultFont(), color, fontSize, LEFT_BASE_LINE); + if (apMD->mpSubMenu != NULL) + { + #if 0 + // draw submenu triangle icon + PointF aSubIcon[3]; // points for tri submenu icon, rel to upper left of item + aSubIcon[0].X = item_rect.X + mfItemWidth - 2.0f; + aSubIcon[0].Y = item_rect.Y + 0.5f*item_rect.Height; + aSubIcon[1].X = aSubIcon[0].X - 5.0f; + aSubIcon[1].Y = aSubIcon[0].Y - 5.0f; + aSubIcon[2].X = aSubIcon[1].X; + aSubIcon[2].Y = aSubIcon[0].Y + 5.0f; + apGraphics->FillPolygon(mpBrush,aSubIcon,3); + #endif + // if item is selected, draw the submenu + if (apMD->mbSelected) + { + wxRealPoint submenu_offset; + submenu_offset.x = item_rect.GetRight()-1.0f; + submenu_offset.y = item_rect.GetBottom(); + apMD->mpSubMenu->SetAnchor(submenu_offset); + apMD->mpSubMenu->Draw(); + } + } } ! /** ! * @return pointer to item (NULL for none) containing point ! */ ! tsMenuData* tcMenu::ItemContainingPoint(const wxRealPoint& point) ! { ! int nMenuSize = (int)maMenuData.size(); ! wxRealPoint local_point = point - anchor; // adjust for anchor + for(int i=0; i<nMenuSize; i++) + { + tsMenuData *pmd = &maMenuData[i]; + if (pmd->mrect.ContainsPoint(local_point.x, local_point.y)) + { + return pmd; + } ! // if item is selected and has submenu, check submenu ! if ((pmd->mpSubMenu != NULL) && (pmd->mbSelected)) ! { ! tsMenuData *psub = pmd->mpSubMenu->ItemContainingPoint(point); ! if (psub != NULL) {return psub;} ! } ! } ! return NULL; // not found } ! /** ! * select menu item and all parent items containing point ! */ ! bool tcMenu::UpdateSelection(const wxRealPoint& point) ! { ! int nMenuSize = (int)maMenuData.size(); ! wxRealPoint local_point = point - anchor; // adjust for anchor ! // if (!menubox.Contains(point)) { return NULL;} ! bool bResult = false; ! for(int i=0; i<nMenuSize; i++) ! { ! tsMenuData *pmd = &maMenuData[i]; ! tcMenu *pSubMenu = pmd->mpSubMenu; ! bool bSelected = pmd->mbSelected; ! if (pmd->mrect.ContainsPoint(local_point.x, local_point.y)) ! { ! pmd->mbSelected = true; ! if (pSubMenu != NULL) {pSubMenu->ClearSelected();} ! bResult = true; ! } ! else if ((pSubMenu != NULL)&&(bSelected)) ! { ! if (pSubMenu->UpdateSelection(point) == false) ! { ! pmd->mbSelected = false; ! } ! else ! { ! bResult = true; ! } ! } ! else ! { ! pmd->mbSelected = false; ! } ! } ! return bResult; // not found } ! void tcMenu::UpdateRegions() ! { ! int maxWidth = 0; ! int maxHeight = 0; ! tsMenuData *pmd; ! int nMenuSize = (int)maMenuData.size(); ! // find max item width and height ! for(int i=0; i<nMenuSize; i++) ! { ! wxSize boundingBox; ! pmd = &maMenuData[i]; ! parentWindow->MeasureText(parentWindow->GetDefaultFont(), fontSize, pmd->mzCaption.c_str(), ! boundingBox); ! maxWidth = (boundingBox.GetWidth() > maxWidth) ? boundingBox.GetWidth() : maxWidth; ! maxHeight = (boundingBox.GetHeight() > maxHeight) ? boundingBox.GetHeight() : maxHeight; ! } ! mfItemWidth = float(maxWidth) + 12.0f; ! mfItemHeight = float(maxHeight) + 2.0f; ! menubox.left = 0; ! menubox.bottom = 0; // upper-left corner ! menubox.right = menubox.left + float(maxWidth) + 12.0f; ! menubox.top = menubox.bottom + (float(maxHeight) + 4.0f)*((float)nMenuSize); ! // set item rectangles ! tcRect itemrect; ! itemrect.Set(0, mfItemWidth, 0, mfItemHeight); ! for(int i=0; i<nMenuSize; i++) ! { ! pmd = &maMenuData[i]; ! pmd->mrect = itemrect; ! itemrect.bottom += mfItemHeight - 1.0f; ! itemrect.top += mfItemHeight - 1.0f; ! } } ! tcMenu::tcMenu() ! : fontSize(14.0) ! { ! maMenuData.clear(); ! mbUpdateRegions = true; ! mpCurrent = this; ! mpParent = NULL; } ! tcMenu::tcMenu(tcMenu* apParent) ! : fontSize(14.0) ! { ! maMenuData.clear(); ! mbUpdateRegions = true; ! mpCurrent = this; ! mpParent = apParent; } ! tcMenu::~tcMenu() ! { ! Clear(); } Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.100 retrieving revision 1.101 diff -C2 -d -r1.100 -r1.101 *** Game.cpp 21 Oct 2004 04:11:00 -0000 1.100 --- Game.cpp 29 Oct 2004 02:50:53 -0000 1.101 *************** *** 159,162 **** --- 159,163 ---- enableGraphicsEngine = true; enableTacticalMap = true; + togglePopup = false; std::cout << "Game constructor success" << std::endl; *************** *** 383,386 **** --- 384,389 ---- void tcGame::SwitchToCredit(wxCommandEvent& event) { + if (meGameMode != GM_START) return; + meScreenMode = CREDIT; tcSound::Get()->PlayMusic("tension1"); *************** *** 405,408 **** --- 408,413 ---- void tcGame::SwitchToScenarioSelect(wxCommandEvent& event) { + if (meGameMode != GM_START) return; + meScreenMode = SCENARIOSELECT; } *************** *** 504,511 **** /* start view has to be initialized first so that we can share its 2D surface with the other windows */ ! InitializeDisplaySettingsView(); InitializeOptionsView(); ! InitializeCreditView(); InitializeStartView(); --- 509,516 ---- /* start view has to be initialized first so that we can share its 2D surface with the other windows */ ! InitializeCreditView(); InitializeDisplaySettingsView(); InitializeOptionsView(); ! InitializeStartView(); *************** *** 723,728 **** briefingConsoleLeft = new tcSoundConsole(glCanvas, wxPoint(0,0), wxSize(mnBriefingWidth, leftConsoleHeight), "xml/briefing_left.xml") ; - briefingConsoleLeft->SetBaseRenderBin(10); if (!briefingConsoleLeft) --- 728,733 ---- briefingConsoleLeft = new tcSoundConsole(glCanvas, wxPoint(0,0), wxSize(mnBriefingWidth, leftConsoleHeight), "xml/briefing_left.xml") ; + briefingConsoleLeft->SetBaseRenderBin(10); if (!briefingConsoleLeft) *************** *** 739,750 **** briefingConsoleLeft->SetDelayedTextEffect(true); briefingConsoleLeft->LoadBackgroundImage("briefing_left.jpg"); briefingConsoleLeft->Print(" "); // need this to get it to display ! // add buttons ! //briefingConsoleLeft->AddButton(wxRect(10,leftConsoleHeight-20,50,14), ID_SKIPBRIEFING, "EXIT"); briefingConsoleBottom = new tcSoundConsole(glCanvas, wxPoint(0, mnHeight-mnBottomMargin), wxSize(mnWidth, mnBottomMargin), "xml/briefing_bottom.xml"); ! briefingConsoleBottom->SetBaseRenderBin(10); ! if (!briefingConsoleBottom) { --- 744,754 ---- briefingConsoleLeft->SetDelayedTextEffect(true); briefingConsoleLeft->LoadBackgroundImage("briefing_left.jpg"); + briefingConsoleLeft->Print(" "); // need this to get it to display ! briefingConsoleBottom = new tcSoundConsole(glCanvas, wxPoint(0, mnHeight-mnBottomMargin), wxSize(mnWidth, mnBottomMargin), "xml/briefing_bottom.xml"); ! if (!briefingConsoleBottom) { *************** *** 759,763 **** --- 763,769 ---- briefingConsoleBottom->SetActive(false); briefingConsoleBottom->LoadBackgroundImage("briefing_bottom.jpg"); + briefingConsoleBottom->SetBaseRenderBin(10); briefingConsoleBottom->Print(" "); // need this to get it to display + } *************** *** 838,842 **** tacticalMap = new tcTacticalMapView(glCanvas, wxPoint(mrectMap.left,mrectMap.top), wxSize(mrectMap.right-mrectMap.left, mrectMap.bottom-mrectMap.top)); ! tacticalMap->SetBaseRenderBin(10); tacticalMapSize = TM_LARGE; --- 844,848 ---- tacticalMap = new tcTacticalMapView(glCanvas, wxPoint(mrectMap.left,mrectMap.top), wxSize(mrectMap.right-mrectMap.left, mrectMap.bottom-mrectMap.top)); ! tacticalMap->SetBaseRenderBin(20); tacticalMapSize = TM_LARGE; *************** *** 897,900 **** --- 903,907 ---- wxPoint(mrectLowerLeft.left, mrectLowerLeft.top), wxSize(200,200), "xml/info_console.xml", "InfoConsole"); + infoConsole->SetBaseRenderBin(20); infoConsole->LoadBackgroundImage("start_background.jpg"); messageConsole = infoConsole; *************** *** 909,913 **** // infoConsole->InitGdi(10.0f,0xFF64FF64); infoConsole->SetLineSpacing(10); ! infoConsole->SetWrap(28); infoConsole->SetActive(false); --- 916,920 ---- // infoConsole->InitGdi(10.0f,0xFF64FF64); infoConsole->SetLineSpacing(10); ! //infoConsole->SetWrap(28); infoConsole->SetActive(false); *************** *** 916,920 **** hookInfo = new tcHookInfo(glCanvas, wxPoint(mrectLowerLeft.right,mrectLowerLeft.top), wxSize(200,200)); ! if (!hookInfo) { --- 923,927 ---- hookInfo = new tcHookInfo(glCanvas, wxPoint(mrectLowerLeft.right,mrectLowerLeft.top), wxSize(200,200)); ! hookInfo->SetBaseRenderBin(20); if (!hookInfo) { *************** *** 931,935 **** // objectControl init objectControl = new tcObjectControl(glCanvas, wxPoint(mrectLowerLeft.right+200,mrectLowerLeft.top), wxSize(mnWidth-400,200)); ! if (!objectControl) { --- 938,942 ---- // objectControl init objectControl = new tcObjectControl(glCanvas, wxPoint(mrectLowerLeft.right+200,mrectLowerLeft.top), wxSize(mnWidth-400,200)); ! //objectControl->SetBaseRenderBin(20); if (!objectControl) { *************** *** 952,956 **** mrectOOB.bottom = mnHeight-200; oobView = new tcOOBView(glCanvas, wxPoint(mrectOOB.left,mrectOOB.top), wxSize(mrectOOB.right-mrectOOB.left, mrectOOB.bottom-mrectOOB.top)); ! if (!oobView) { --- 959,963 ---- mrectOOB.bottom = mnHeight-200; oobView = new tcOOBView(glCanvas, wxPoint(mrectOOB.left,mrectOOB.top), wxSize(mrectOOB.right-mrectOOB.left, mrectOOB.bottom-mrectOOB.top)); ! oobView->SetBaseRenderBin(20); if (!oobView) { *************** *** 966,977 **** // popupControl init ! RECT rpopup; ! rpopup.left = 300; ! rpopup.top = 100; ! rpopup.right = 700; ! rpopup.bottom = 700; ! ! popupControl = new tcPopupControl(glCanvas, wxPoint(rpopup.left, rpopup.top), wxSize(rpopup.right - rpopup.left, rpopup.bottom - rpopup.top)); ! if (!popupControl) { --- 973,979 ---- // popupControl init ! popupControl = new tcPopupControl(glCanvas, wxPoint(1400, 400), ! wxSize(300, 300)); ! popupControl->SetBaseRenderBin(30); if (!popupControl) { *************** *** 984,991 **** popupControl->SetActive(false); popupControl->SetBlend(true); ! popupControl->Show(true); // to prevent artifact when displaying for first time ! popupControl->SetSkipCount(0); popupControl->Raise(); // bring popup to top of windows hierarchy to receive mouse events #if 0 --- 986,996 ---- popupControl->SetActive(false); popupControl->SetBlend(true); ! //popupControl->Show(true); // to prevent artifact when displaying for first time ! //popupControl->SetSkipCount(0); popupControl->Raise(); // bring popup to top of windows hierarchy to receive mouse events + wxASSERT(tacticalMap); + + #if 0 *************** *** 1563,1569 **** briefingConsoleLeft->SetActive(false); briefingConsoleBottom->SetActive(false); ! //optionsView->SetActive(false); networkView->SetActive(true); ! // displaySettingsView->SetActive(false); tacticalMap->SetActive(false); worldMap->SetActive(false); --- 1568,1574 ---- briefingConsoleLeft->SetActive(false); briefingConsoleBottom->SetActive(false); ! optionsView->SetActive(false); networkView->SetActive(true); ! displaySettingsView->SetActive(false); tacticalMap->SetActive(false); worldMap->SetActive(false); *************** *** 1580,1585 **** briefingConsoleLeft->SetActive(false); briefingConsoleBottom->SetActive(false); ! //optionsView->SetActive(false); ! //networkView->SetActive(false); displaySettingsView->SetActive(true); tacticalMap->SetActive(false); --- 1585,1590 ---- briefingConsoleLeft->SetActive(false); briefingConsoleBottom->SetActive(false); ! optionsView->SetActive(false); ! networkView->SetActive(false); displaySettingsView->SetActive(true); tacticalMap->SetActive(false); *************** *** 1747,1750 **** --- 1752,1757 ---- ProcessCommandList(); + if (togglePopup) TogglePopup(); // added to avoid asynchronously toggling popup state + mcGameView.Update(gameTime); *************** *** 1929,1932 **** --- 1936,1950 ---- void tcGame::OnRButtonDown(wxMouseEvent& event) { + rightButtonPoint = event.GetPosition(); + togglePopup = true; + } + + /** + * + */ + void tcGame::TogglePopup() + { + togglePopup = false; // clear + if (!popupControl) { *************** *** 1944,1948 **** popupControl->SetMenu(mm); tacticalMap->mbBypassPythonCallback = (mm == MENUMODE_PLATFORMEDIT); ! wxPoint point = event.GetPosition(); // workaround to keep popup submenus on screen if (point.x > mnWidth - 250) point.x = mnWidth - 250; --- 1962,1966 ---- popupControl->SetMenu(mm); tacticalMap->mbBypassPythonCallback = (mm == MENUMODE_PLATFORMEDIT); ! wxPoint point = rightButtonPoint; // workaround to keep popup submenus on screen if (point.x > mnWidth - 250) point.x = mnWidth - 250; *************** *** 1952,1956 **** } - /** * OnKeyDown is called for any key press that isn't captured by another --- 1970,1973 ---- |
|
From: Dewitt C. <ddc...@us...> - 2004-10-29 02:51:03
|
Update of /cvsroot/gcblue/gcb_wx/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17989/xml Modified Files: options.xml Log Message: A few more changes related to GDI+ replacement Index: options.xml =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/xml/options.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** options.xml 2 Oct 2004 22:41:34 -0000 1.4 --- options.xml 29 Oct 2004 02:50:54 -0000 1.5 *************** *** 1,4 **** <Options> <HostAddress>192.168.0.102</HostAddress> ! <DisplaySettings>1024 768 32 75</DisplaySettings> </Options> --- 1,4 ---- <Options> <HostAddress>192.168.0.102</HostAddress> ! <DisplaySettings>default</DisplaySettings> </Options> |
|
From: Dewitt C. <ddc...@us...> - 2004-10-21 04:11:17
|
Update of /cvsroot/gcblue/gcb_wx/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9417/src/common Modified Files: tcOptionsView.cpp Log Message: Changes related to GDI+ replacement Index: tcOptionsView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcOptionsView.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tcOptionsView.cpp 7 Oct 2004 22:01:45 -0000 1.11 --- tcOptionsView.cpp 21 Oct 2004 04:10:59 -0000 1.12 *************** *** 64,68 **** static nTestCount = 0; ! wxASSERT(mpOptions); --- 64,68 ---- static nTestCount = 0; ! #if 0 wxASSERT(mpOptions); *************** *** 129,133 **** } } ! DrawChildren(); --- 129,133 ---- } } ! #endif DrawChildren(); *************** *** 230,234 **** if (config) { ! AddXMLControls(); } else --- 230,234 ---- if (config) { ! // AddXMLControls(); } else |
|
From: Dewitt C. <ddc...@us...> - 2004-10-21 04:11:17
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9417/include/sim Modified Files: Game.h Log Message: Changes related to GDI+ replacement Index: Game.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/Game.h,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** Game.h 7 Oct 2004 22:01:12 -0000 1.47 --- Game.h 21 Oct 2004 04:10:59 -0000 1.48 *************** *** 215,218 **** --- 215,220 ---- wxSize startViewerSize; int multiplayerMode; ///< 0 - single-player, 1 - client, 2 - server + bool enableGraphicsEngine; + bool enableTacticalMap; void Activate(); |
|
From: Dewitt C. <ddc...@us...> - 2004-10-21 04:11:17
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9417/include/graphics Modified Files: tc3DViewer.h tc3DWindow.h tcMapObject.h tcMapView.h tcXmlWindow.h Log Message: Changes related to GDI+ replacement Index: tcXmlWindow.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcXmlWindow.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcXmlWindow.h 7 Oct 2004 22:01:12 -0000 1.3 --- tcXmlWindow.h 21 Oct 2004 04:10:58 -0000 1.4 *************** *** 50,58 **** TiXmlDocument* config; ///< XML auto-configuration file for window - void AddXMLControls(); ///< adds XML controls to window that can be added automatically virtual void OnButtonCommand(wxCommandEvent& event); private: static unsigned ref_count; DECLARE_EVENT_TABLE() }; --- 50,59 ---- TiXmlDocument* config; ///< XML auto-configuration file for window virtual void OnButtonCommand(wxCommandEvent& event); private: static unsigned ref_count; + void AddXMLControls(); ///< adds XML controls to window that can be added automatically + DECLARE_EVENT_TABLE() }; Index: tc3DWindow.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DWindow.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tc3DWindow.h 7 Oct 2004 22:01:12 -0000 1.5 --- tc3DWindow.h 21 Oct 2004 04:10:58 -0000 1.6 *************** *** 143,146 **** --- 143,150 ---- const osg::Vec4& color, float fontSize, osgText::Text::AlignmentType alignment); + void DrawGeometry(osg::Geometry* geometry, float x, float y); + + /// workaround method for inverted coordinates + void DrawGeometryR(osg::Geometry* geometry, float x, float y); void MeasureText(osgText::Font* font, float fontSize, const char* s, *************** *** 150,153 **** --- 154,158 ---- void EraseOpaque(); virtual void Freeze(); + osgText::Font* GetDefaultFont(); bool IsActive() const {return mbActive;} bool IsBackgroundEnabled() const; *************** *** 167,170 **** --- 172,176 ---- void SetBlend(bool blendingOn); void SetBaseRenderBin(int n); + void SetName(const char* s); void SetOpaque(); void SetPixel(int x, int y, unsigned int value); *************** *** 220,225 **** --- 226,233 ---- osg::MatrixTransform* CreateDrawTransform(); + void FinishDraw(); void HideUnusedObjects(); wxString PrependImagePath(const char* fileName); + virtual void OnChar(wxKeyEvent& event); virtual void OnEnterWindow(wxMouseEvent& event); *************** *** 241,245 **** long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); private: ! osg::ref_ptr<osg::Geode> root; ///< root node for drawables osg::ref_ptr<osg::Switch> switchNode; ///< node to enable/disable window osg::ref_ptr<osg::MatrixTransform> transform; ///< transform node for 3D draw objects --- 249,254 ---- long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); private: ! osg::ref_ptr<osg::Geode> root; ///< root node for drawables ! osg::ref_ptr<osg::Group> groupRoot; ///< root node for transforms osg::ref_ptr<osg::Switch> switchNode; ///< node to enable/disable window osg::ref_ptr<osg::MatrixTransform> transform; ///< transform node for 3D draw objects *************** *** 260,263 **** --- 269,275 ---- unsigned int rectIdx; + std::vector<osg::ref_ptr<osg::MatrixTransform> > transformPool; + unsigned int transformIdx; + void CreateBackgroundQuad(); *************** *** 268,271 **** --- 280,284 ---- osg::Geometry* GetRectObject(); osgText::Text* GetTextObject(); + osg::MatrixTransform* GetTransformObject(); void InitGraphicsObjects(); Index: tcMapView.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcMapView.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcMapView.h 16 Oct 2004 14:57:08 -0000 1.2 --- tcMapView.h 21 Oct 2004 04:10:58 -0000 1.3 *************** *** 32,36 **** #include "wx/msw/private.h" //for MS Windows specific definitions #endif ! #include "tcwindow.h" #include "simmath.h" #include "commandlist.h" --- 32,36 ---- #include "wx/msw/private.h" //for MS Windows specific definitions #endif ! #include "tc3DWindow.h" #include "simmath.h" #include "commandlist.h" *************** *** 39,42 **** --- 39,48 ---- #include "wxcommands.h" + namespace osg + { + class Image; + class Geometry; + } + class tcMapData; class tcMapObject; *************** *** 50,54 **** #define HEADING_UNKNOWN (float)-456.7 #define SCROLL_DELAY 8 ! #define SYMBOLOGY_PATH "images\\symbology\\" enum teSymbol --- 56,60 ---- #define HEADING_UNKNOWN (float)-456.7 #define SCROLL_DELAY 8 ! #define SYMBOLOGY_PATH "symbology\\" enum teSymbol *************** *** 146,150 **** #define N_PENS 10 ! class tcMapView : public tcWindow { public: --- 152,156 ---- #define N_PENS 10 ! class tcMapView : public tc3DWindow { public: *************** *** 177,185 **** } void AttachCommandInterface(tcCommandQueue *apCommandInterface) {mpCommandInterface=apCommandInterface;} ! void CalcViewParameters(void); virtual void Freeze(); tcPoint GeoToScreen(tcPoint pgeo); tcPoint GeoToScreen(float afLon, float afLat); float GeoExtentToScreen(float afExtent_rad); Gdiplus::Pen* GetPen() {return mpPen;} Gdiplus::Pen* GetPenThin() {return mpPenThin;} --- 183,193 ---- } void AttachCommandInterface(tcCommandQueue *apCommandInterface) {mpCommandInterface=apCommandInterface;} ! void CalcViewParameters(); virtual void Freeze(); tcPoint GeoToScreen(tcPoint pgeo); tcPoint GeoToScreen(float afLon, float afLat); float GeoExtentToScreen(float afExtent_rad); + + /* Gdiplus::Pen* GetPen() {return mpPen;} Gdiplus::Pen* GetPenThin() {return mpPenThin;} *************** *** 187,190 **** --- 195,199 ---- Gdiplus::Font* GetFont() {return mpFont;} Gdiplus::Font* GetFontSmall() {return mpFontSmall;} + */ int PointInView(tcPoint& p); *************** *** 198,206 **** //void SetWindow(RECT& r); void SetViewBounds(tcGeoRect& r) {mrectViewBounds = r;} ! void SetYMirror(int y) ! { ! tcWindow::SetYMirror(y); ! terrainView->SetYMirror(y); ! } virtual void Thaw(); --- 207,211 ---- //void SetWindow(RECT& r); void SetViewBounds(tcGeoRect& r) {mrectViewBounds = r;} ! virtual void Thaw(); *************** *** 218,221 **** --- 223,227 ---- tcTerrainView *terrainView; + /* Gdiplus::Pen *mpPen; ///< GDI+ objects Gdiplus::Pen *mpPenThin; *************** *** 223,226 **** --- 229,234 ---- Gdiplus::Font *mpFont; Gdiplus::Font *mpFontSmall; + */ + osg::Vec4 ConvertColor(unsigned int nColor); virtual void OnSize(wxSizeEvent& event); *************** *** 277,289 **** void ClearMapCmd() {meMapCmd = MC_NONE;} ! int Draw(); ! void DrawGrid(Gdiplus::Graphics *apGraphics); ! void DrawScaleBar(Gdiplus::Graphics *apGraphics); ! void DrawSelectionBox(Gdiplus::Graphics *graphics); ! void DrawTerrainText(Gdiplus::Graphics *apGraphics); ! void DrawMapCmd(Gdiplus::Graphics *apGraphics, tcMapObj *pMO, teMapCmdType type); ! void DrawNavPoints(Gdiplus::Graphics *apGraphics); void DrawIndicator(int anType); ! void DrawSpecial(Gdiplus::Graphics *graphics); size_t GetHookCount(); long GetHookID(size_t idx = 0); --- 285,297 ---- void ClearMapCmd() {meMapCmd = MC_NONE;} ! void Draw(); ! void DrawGrid(); ! void DrawScaleBar(); ! void DrawSelectionBox(); ! void DrawTerrainText(); ! void DrawMapCmd(tcMapObj *pMO, teMapCmdType type); ! void DrawNavPoints(); void DrawIndicator(int anType); ! void DrawSpecial(); size_t GetHookCount(); long GetHookID(size_t idx = 0); *************** *** 323,328 **** std::vector<tcPoint> maNavPointGeo; std::vector<tcPoint> maNavPointScreen; ! Gdiplus::Image* maSymbolA[4][MAX_SYMBOL]; ! Gdiplus::Image* maSymbolB[4][MAX_SYMBOL]; teSymbology meSymbology; float mfSymbolXOffset, mfSymbolYOffset; --- 331,336 ---- std::vector<tcPoint> maNavPointGeo; std::vector<tcPoint> maNavPointScreen; ! osg::ref_ptr<osg::Geometry> maSymbolA[4][MAX_SYMBOL]; ! osg::ref_ptr<osg::Geometry> maSymbolB[4][MAX_SYMBOL]; teSymbology meSymbology; float mfSymbolXOffset, mfSymbolYOffset; *************** *** 332,351 **** void Build2525(); void BuildNTDS(); - UINT32 GetAffiliationColor(teAffiliation a); - Gdiplus::Image* GetSymbol(teAffiliation aeAffiliation, teSymbol aeSymbol); - Gdiplus::Image* LoadSymbolImage(char *azSymbolName); ! void DrawNTDSSurface(Gdiplus::Graphics *apGraphics, teAffiliation affil); ! void DrawNTDSGround(Gdiplus::Graphics* graphics, teAffiliation affil); ! void DrawNTDSAirFW(Gdiplus::Graphics *apGraphics, teAffiliation affil); ! void DrawNTDSAirRW(Gdiplus::Graphics *apGraphics, teAffiliation affil); ! void DrawNTDSMissile(Gdiplus::Graphics *apGraphics, teAffiliation affil); ! void DrawNTDSUnknown(Gdiplus::Graphics *apGraphics, teAffiliation affil); ! int DrawSymbol(Gdiplus::Graphics *apGraphics, tcMapObj *pMO); ! int DrawSymbol2(Gdiplus::Graphics* graphics, tcMapObj* pMO); ! Gdiplus::Graphics* GetGraphicsFromImage(Gdiplus::Image* apImage); void UpdateScreenNavPoints(); --- 340,364 ---- void Build2525(); void BuildNTDS(); ! osg::Vec4 GetAffiliationColor(teAffiliation a); ! osg::Geometry* GetSymbol(teAffiliation aeAffiliation, teSymbol aeSymbol); ! osg::Image* LoadSymbolImage(const char *azSymbolName); ! void AddArcPrimitive(osg::Geometry* symbol, osg::Vec3Array* vertices, ! float xc, float yc, float width, float height, ! float startAngle, float stopAngle, unsigned int nPoints); ! osg::Geometry* CreateSymbolGeometry(); ! osg::Geometry* CreateTexturedSymbol(const char* symbolName); ! osg::Geometry* DrawNTDSSurface(teAffiliation affil); ! osg::Geometry* DrawNTDSGround(teAffiliation affil); ! osg::Geometry* DrawNTDSAirFW(teAffiliation affil); ! osg::Geometry* DrawNTDSAirRW(teAffiliation affil); ! osg::Geometry* DrawNTDSMissile(teAffiliation affil); ! osg::Geometry* DrawNTDSUnknown(teAffiliation affil); + void DrawSymbol2(tcMapObj* pMO); ! ! //Gdiplus::Graphics* GetGraphicsFromImage(Gdiplus::Image* apImage); void UpdateScreenNavPoints(); *************** *** 361,368 **** void ChangeTheater(float lon_deg, float lat_deg); int CreateSurfaces(tcGraphicsEngine* apGraphicsEngine); ! int Draw(); ! void DrawGrid(Gdiplus::Graphics* apGraphics); ! void DrawIcon(Gdiplus::Graphics* graphics); ! void DrawTheaterBox(Gdiplus::Graphics *apGraphics); void OnLButtonDown(wxMouseEvent& event); void OnMouseMove(wxMouseEvent& event); --- 374,380 ---- void ChangeTheater(float lon_deg, float lat_deg); int CreateSurfaces(tcGraphicsEngine* apGraphicsEngine); ! void Draw(); ! void DrawGrid(); ! void DrawTheaterBox(); void OnLButtonDown(wxMouseEvent& event); void OnMouseMove(wxMouseEvent& event); *************** *** 384,388 **** tcGeoRect mrectTheater; ///< active theater view region ! int DrawSymbol(Gdiplus::Graphics *apGraphics, tsWorldMapObj *pMO); }; } --- 396,400 ---- tcGeoRect mrectTheater; ///< active theater view region ! void DrawSymbol(tsWorldMapObj *pMO); }; } Index: tc3DViewer.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DViewer.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tc3DViewer.h 7 Oct 2004 22:01:12 -0000 1.2 --- tc3DViewer.h 21 Oct 2004 04:10:58 -0000 1.3 *************** *** 29,35 **** #include "wx/wx.h" - //#include "wx/msw/private.h" // for MS Windows specific definitions #include <osg/FrameStamp> #include <osg/NodeVisitor> #include <osgUtil/SceneView> #include <osgUtil/Optimizer> --- 29,35 ---- #include "wx/wx.h" #include <osg/FrameStamp> #include <osg/NodeVisitor> + #include <osgUtil/CullVisitor> #include <osgUtil/SceneView> #include <osgUtil/Optimizer> *************** *** 56,59 **** --- 56,60 ---- osg::ref_ptr<osg::DisplaySettings> displaySettings; osg::ref_ptr<osg::NodeVisitor> updateVisitor; + osg::ref_ptr<osgUtil::CullVisitor> cullVisitor; osg::ref_ptr<osg::NodeVisitor> guiUpdateVisitor; osg::ref_ptr<osg::FrameStamp> frameStamp; *************** *** 117,121 **** float GetCameraRange() {return cameraRange;} osg::Vec3 GetCameraPosition(); - osg::MatrixTransform* GetDrawMatrixTransform(); double GetGameTime() const {return gameTime;} osg::Vec3 GetObjectPosition(tcGameObject *obj); --- 118,121 ---- Index: tcMapObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcMapObject.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcMapObject.h 14 Sep 2004 02:01:45 -0000 1.6 --- tcMapObject.h 21 Oct 2004 04:10:58 -0000 1.7 *************** *** 1,6 **** ! /* ! ** tcMapObject.h ! ** ! ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. --- 1,6 ---- ! /** ! ** @file tcMapObject.h ! */ ! /* Copyright (C) 2004 Dewitt Colclough (de...@tw...) ** All rights reserved. *************** *** 19,23 **** ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ ! /// @file tcMapObject.h header for eventual replacement of tcMapObj #ifndef _TCMAPOBJECT_H_ --- 19,23 ---- ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ ! #ifndef _TCMAPOBJECT_H_ *************** *** 30,39 **** #ifndef WX_PRECOMP #include "wx/wx.h" - #ifdef WIN32 - #include "wx/msw/private.h" // for MS Windows specific definitions - #endif // WIN32 #endif // WX_PRECOMP #include "simmath.h" /** --- 30,37 ---- #ifndef WX_PRECOMP #include "wx/wx.h" #endif // WX_PRECOMP #include "simmath.h" + #include <osg/Vec4> /** *************** *** 61,71 **** { public: ! UINT32 color; bool isActive; ! virtual void Draw(Gdiplus::Graphics *graphics); ! UINT32 GetColor() const {return color;} void SetActive(bool active) {isActive = active;} ! void SetColor(UINT32 argbColor) {color = argbColor;} void SetMarkerActive(bool active) {markerEnabled = active;} void SetUseScreenCoords(bool active) {useRelativeCoords = active;} --- 59,69 ---- { public: ! osg::Vec4 color; bool isActive; ! virtual void Draw(); ! osg::Vec4 GetColor() const {return color;} void SetActive(bool active) {isActive = active;} ! void SetColor(osg::Vec4 c) {color = c;} void SetMarkerActive(bool active) {markerEnabled = active;} void SetUseScreenCoords(bool active) {useRelativeCoords = active;} *************** *** 95,99 **** std::string caption; ///< text to display ! virtual void Draw(Gdiplus::Graphics *graphics); tcMapTextObject(); --- 93,97 ---- std::string caption; ///< text to display ! virtual void Draw(); tcMapTextObject(); |
|
From: Dewitt C. <ddc...@us...> - 2004-10-21 04:11:16
|
Update of /cvsroot/gcblue/gcb_wx/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9417/xml Modified Files: briefing_left.xml Log Message: Changes related to GDI+ replacement Index: briefing_left.xml =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/xml/briefing_left.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** briefing_left.xml 7 Oct 2004 22:02:59 -0000 1.1 --- briefing_left.xml 21 Oct 2004 04:11:00 -0000 1.2 *************** *** 1,5 **** <Window> <TextBox TopMargin="30" BottomMargin="50" Wrap="60"/> - </Window> \ No newline at end of file --- 1,5 ---- <Window> + <Button X="50" Y="65" Width="65" Height="15" Caption="Skip" Command="120"/> <TextBox TopMargin="30" BottomMargin="50" Wrap="60"/> </Window> \ No newline at end of file |