gcblue-commits Mailing List for Global Conflict Blue (Page 44)
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-09-14 23:17:25
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23080/include/graphics Modified Files: tc3DWindow.h Log Message: Index: tc3DWindow.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DWindow.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tc3DWindow.h 14 Sep 2004 02:01:45 -0000 1.1 --- tc3DWindow.h 14 Sep 2004 23:17:16 -0000 1.2 *************** *** 81,84 **** --- 81,85 ---- void DrawLine(float x1, float y1, float x2, float y2, const osg::Vec4& color); + void DrawRect(float x1, float y1, float width, float height, const osg::Vec4& color); void DrawText(const char* s, float x, float y, osgText::Font* font, |
|
From: Dewitt C. <ddc...@us...> - 2004-09-14 02:02:33
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14891/include/graphics Modified Files: tcGraphicsEngine.h tcMapObject.h tcWindow.h Added Files: tc3DWindow.h Log Message: Index: tcWindow.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcWindow.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcWindow.h 8 Aug 2004 00:31:32 -0000 1.5 --- tcWindow.h 14 Sep 2004 02:01:45 -0000 1.6 *************** *** 86,89 **** --- 86,90 ---- void MoveToTop(); ///< moves window to top void MoveWindow(int ax, int ay); + wxRealPoint RelativeToScreen(float x, float y); void SetBackground(UINT32 anColor); --- NEW FILE: tc3DWindow.h --- /** ** @file tc3DWindow.h */ /* Copyright (C) 2004 Dewitt Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _TC3DWINDOW_H_ #define _TC3DWINDOW_H_ #if _MSC_VER > 1000 #pragma once #endif #ifndef WX_PRECOMP #include "wx/wx.h" #endif #include <vector> #include <osg/ref_ptr> #include "common/simmath.h" namespace osg { class ClipNode; class DrawPixels; class Geode; class Geometry; class MatrixTransform; class Projection; class Texture2D; } namespace osgText { class Font; class Text; } class tcGraphicsEngine; class tc3DViewer; #define IMAGE_PATH "images\\" /** * Window class for drawing to a 3D OSG scenegraph. * This is intended as a cross-platform replacement for tc3DWindow. * tc3DWindow heavily used the Windows GDI+ libary. */ class tc3DWindow : public wxWindow { public: bool mbActive; tcRect mrectDisplay; void AddChild(tc3DWindow* child); bool IsBackgroundLoaded(); // {return mpiBackground != NULL;} virtual int Draw(); virtual void DrawChildren(); // virtual void DrawChildren(Gdiplus::Graphics *graphics); void DrawBorder(); void DrawImage(osg::Texture2D* texture, float x, float y, float width, float height); void DrawLine(float x1, float y1, float x2, float y2, const osg::Vec4& color); void DrawText(const char* s, float x, float y, osgText::Font* font, const osg::Vec4& color, float fontSize, osgText::Text::AlignmentType alignment); void DrawText(osgText::Font* font, const osg::Vec4& color, float fontSize, const char* s, float x, float y, tcRect& r); // returns bounding box in r void DrawTextInRect(osgText::Font* font, const osg::Vec4& color, const char* s, tcRect& rect); void DrawTextInRectWrap(osgText::Font* font, const osg::Vec4& color, const char* s, tcRect& rect); void MeasureText(osgText::Font* font, const char* s, wxSize& size); void Erase(); void EraseOpaque(); virtual void Freeze(); bool IsActive() const {return mbActive;} bool IsBackgroundEnabled() const; bool IsSurfaceModified(); virtual bool IsWindowMinimized() const; void LoadBackgroundImage(char* fileName); osg::Image* LoadImage(const char* fileName); virtual void Maximize(); virtual void Minimize(); void MoveToTop(); ///< moves window to top void MoveWindow(int ax, int ay); wxRealPoint RelativeToScreen(float x, float y); void SetBackground(UINT32 anColor); bool GetBlend(); void SetBlend(bool blendingOn); void SetOpaque(); void SetPixel(int x, int y, unsigned int value); void SetDisplayRegion(tcRect r); virtual void SetActive(bool abActive); void SetBackgroundDraw(bool state); void SetResizeable2D(bool abState) {resizeable2DSurface = abState;} ///< @see tc3DWindow::OnSize virtual void SetYMirror(int y) {yMirror = y;} virtual void Thaw(); static void Set3DViewer(tc3DViewer* aviewer) {viewer = aviewer;} tc3DWindow(wxWindow* parent, const wxPoint& pos, const wxSize& size, const wxString& name = "tc3DWindow"); virtual ~tc3DWindow(); protected: std::vector<tc3DWindow*> children; wxRect mrectWindow; // location for map in back buffer int mnWidth; ///< window dimension--tried to make const, but problem in tcTerrainView int mnHeight; int yMirror; ///< workaround for opposite y directions of OpenGL vs. wxWindows /// true if 2DSurface should be resized with window, normally false for zoomed surfaces /// such as with the tcTerrainView /// @see tc3DWindow::OnSize view OnSize method code to see how this is used bool resizeable2DSurface; osg::ref_ptr<osgText::Font> defaultFont; osg::ref_ptr<osg::Texture2D> backgroundTexture; osg::ref_ptr<osg::Geometry> backgroundQuad; osg::ref_ptr<osg::Texture2D> defaultTexture; osg::ref_ptr<osg::Texture2D> testSymbol; bool mbCloned; bool mbFrozen; wxRect normalPosition; ///< normal, non-minimized pos of window wxRect iconPosition; ///< minimized, icon pos of window const int iconSize; static tc3DViewer* viewer; wxString PrependImagePath(const char* fileName); virtual void OnChar(wxKeyEvent& event); virtual void OnEnterWindow(wxMouseEvent& event); void OnEraseBackground(wxEraseEvent& event); virtual void OnKeyDown(wxKeyEvent& event); virtual void OnKillFocus(wxFocusEvent& event); virtual void OnLButtonDown(wxMouseEvent& event); virtual void OnLButtonUp(wxMouseEvent& event); virtual void OnLeaveWindow(wxMouseEvent& event); virtual void OnMouseMove(wxMouseEvent& event); virtual void OnMouseWheel(wxMouseEvent& event); virtual void OnMove(wxMoveEvent& event); void OnPaint(wxPaintEvent& event); virtual void OnRButtonDown(wxMouseEvent& event); virtual void OnSetFocus(wxFocusEvent& event); virtual void OnShow(wxShowEvent& event); virtual void OnSize(wxSizeEvent& event); void SkipMouseEvent(wxMouseEvent& event); ///< adjusts position to parent frame long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); private: osg::ref_ptr<osg::ClipNode> clipNode; osg::ref_ptr<osg::Geode> root; ///< root node for drawables osg::ref_ptr<osg::MatrixTransform> transform; ///< transform node for 3D draw objects, child of projection osg::ref_ptr<osg::Projection> projection; /* eventually refactor this to use a template vs. recoding ** a new pool system for each different object type */ std::vector<osg::ref_ptr<osgText::Text> > textPool; unsigned int textIdx; std::vector<osg::ref_ptr<osg::Geometry> > imageQuadPool; unsigned int imageQuadIdx; std::vector<osg::ref_ptr<osg::Geometry> > linePool; unsigned int lineIdx; osgText::Text::AlignmentType LEFT_BASE_LINE; osgText::Text::AlignmentType CENTER_CENTER; void CreateBackgroundQuad(); void UpdateBackgroundQuadVertices(); osg::Geometry* GetImageQuadObject(); osg::Geometry* GetLineObject(); osgText::Text* GetTextObject(); void HideUnusedObjects(); void InitGraphicsObjects(); DECLARE_EVENT_TABLE() }; #endif Index: tcMapObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcMapObject.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcMapObject.h 1 Sep 2004 02:55:35 -0000 1.5 --- tcMapObject.h 14 Sep 2004 02:01:45 -0000 1.6 *************** *** 68,83 **** void SetActive(bool active) {isActive = active;} void SetColor(UINT32 argbColor) {color = argbColor;} static void SetMapView(MapView::tcMapView *mv); tcMapObject(); ! tcMapObject(double lon_deg, double lat_deg); virtual ~tcMapObject(); protected: tcPoint GetScreenPoint() const; static MapView::tcMapView *mapView; ///< used to translate lat/lon coords into screen coords private: ! double lat_rad; ///< radian latitude ! double lon_rad; ///< radian longitude }; --- 68,88 ---- void SetActive(bool active) {isActive = active;} void SetColor(UINT32 argbColor) {color = argbColor;} + void SetMarkerActive(bool active) {markerEnabled = active;} + void SetUseScreenCoords(bool active) {useRelativeCoords = active;} static void SetMapView(MapView::tcMapView *mv); tcMapObject(); ! tcMapObject(double x, double y, bool useRel = false); virtual ~tcMapObject(); protected: + bool markerEnabled; ///< true to draw X marker with text + tcPoint GetScreenPoint() const; static MapView::tcMapView *mapView; ///< used to translate lat/lon coords into screen coords private: ! bool useRelativeCoords; ///< interpret lat_rad and lon_rad as rel screen coords [0-1] ! double _x; ///< radian latitude or relative screen x coord ! double _y; ///< radian longitude or relative screen y coord }; *************** *** 93,97 **** tcMapTextObject(); ! tcMapTextObject(std::string text, double lon_deg, double lat_deg); virtual ~tcMapTextObject(); }; --- 98,102 ---- tcMapTextObject(); ! tcMapTextObject(std::string text, double x, double y, bool useRel = false); virtual ~tcMapTextObject(); }; Index: tcGraphicsEngine.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcGraphicsEngine.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcGraphicsEngine.h 8 Aug 2004 00:31:32 -0000 1.12 --- tcGraphicsEngine.h 14 Sep 2004 02:01:45 -0000 1.13 *************** *** 51,54 **** --- 51,58 ---- #define MAX_TEXTURES 10 + namespace osg + { + class MatrixTransform; + } typedef tc2DGraphicsSurface* tp2DSurface; *************** *** 109,113 **** void LogPixelFormats(); bool MoveSurfaceToTop(tc2DGraphicsSurface* ap2DSurface); ! bool RenderAll(void); void ToggleBlending() {mbBlend = !mbBlend;} void ToggleTexture2D() {mbTexture2D = !mbTexture2D;} --- 113,117 ---- void LogPixelFormats(); bool MoveSurfaceToTop(tc2DGraphicsSurface* ap2DSurface); ! bool RenderAll(); void ToggleBlending() {mbBlend = !mbBlend;} void ToggleTexture2D() {mbTexture2D = !mbTexture2D;} |
|
From: Dewitt C. <ddc...@us...> - 2004-09-14 02:02:32
|
Update of /cvsroot/gcblue/gcb_wx/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14891/src/common Modified Files: tcOggStreamer.cpp tcSound.cpp tcString.cpp Log Message: Index: tcString.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcString.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcString.cpp 8 Aug 2004 00:31:33 -0000 1.3 --- tcString.cpp 14 Sep 2004 02:01:46 -0000 1.4 *************** *** 65,70 **** } ! // this ignores length, needs to be fixed, included for compatibility with CString ! const char* tcString::GetBufferSetLength(int anMaxLength) { return c_str(); } --- 65,73 ---- } ! /** ! * this ignores length, needs to be fixed, included for compatibility with CString ! */ ! const char* tcString::GetBufferSetLength(int anMaxLength) ! { return c_str(); } Index: tcSound.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcSound.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tcSound.cpp 5 Aug 2004 02:22:35 -0000 1.16 --- tcSound.cpp 14 Sep 2004 02:01:46 -0000 1.17 *************** *** 56,70 **** { int i; ! ALuint moving_source = 0; ALfloat zeroes[] = { 0.0f, 0.0f, 0.0f }; ! ALfloat back[] = { 0.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f }; ALfloat front[] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f }; ! ALfloat position[] = { 0.0f, 0.0f, -4.0f }; alutInit(NULL,0); // Clear Error Code ! alGetError(); ! alListenerfv(AL_POSITION, zeroes ); --- 56,73 ---- { int i; ! // ALuint moving_source = 0; ALfloat zeroes[] = { 0.0f, 0.0f, 0.0f }; ! // ALfloat back[] = { 0.0f, 0.0f, -1.0f, 0.0f, 1.0f, 0.0f }; ALfloat front[] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f }; ! // ALfloat position[] = { 0.0f, 0.0f, -4.0f }; alutInit(NULL,0); // Clear Error Code ! if (alGetError() != AL_NO_ERROR) ! { ! wxMessageBox("Error during OpenAL init. " ! "Sound driver may not support OpenAL.", "Warning", wxICON_WARNING); ! } alListenerfv(AL_POSITION, zeroes ); *************** *** 326,330 **** oggStreamer->Play(); } ! bool isPlaying = oggStreamer->IsPlaying(); if (oggStreamer->IsSongQueued()) return; QueueRandomMusic(); --- 329,333 ---- oggStreamer->Play(); } ! // bool isPlaying = oggStreamer->IsPlaying(); if (oggStreamer->IsSongQueued()) return; QueueRandomMusic(); Index: tcOggStreamer.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcOggStreamer.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcOggStreamer.cpp 8 Aug 2004 00:31:33 -0000 1.9 --- tcOggStreamer.cpp 14 Sep 2004 02:01:46 -0000 1.10 *************** *** 314,329 **** bool tcOggStreamer::Stream(ALuint buffer) { ! int size = 0; int section; ! int result; ! while (size < BUFFER_SIZE) { result = ov_read(&oggStream, ! streamBuffer + size, BUFFER_SIZE - size, 0, 2, 1, §ion); ! if (result > 0) { ! size += result; } else if (result < 0) --- 314,331 ---- bool tcOggStreamer::Stream(ALuint buffer) { ! int currentSize = 0; int section; ! long result; ! currentSize = 0; ! while (currentSize < BUFFER_SIZE) { result = ov_read(&oggStream, ! streamBuffer + currentSize, BUFFER_SIZE - currentSize, 0, 2, 1, §ion); ! Check(); ! if (result > 0) { ! currentSize += result; } else if (result < 0) *************** *** 347,354 **** } ! if(size == 0) return false; ! alBufferData(buffer, format, streamBuffer, size, vorbisInfo->rate); Check(); --- 349,356 ---- } ! if(currentSize == 0) return false; ! alBufferData(buffer, format, streamBuffer, currentSize, vorbisInfo->rate); Check(); *************** *** 418,423 **** case OV_ENOSEEK: return string("The given stream is not seekable"); default: ! return string("Unknown Ogg error."); } } --- 420,440 ---- case OV_ENOSEEK: return string("The given stream is not seekable"); + case OV_ENOTAUDIO: + return string("This is not an audio data packet."); + case OV_EBADPACKET: + return string("Bad packet."); + case AL_INVALID_NAME: + return string("Invalid Name paramater passed to AL call."); + case AL_ILLEGAL_ENUM: + return string("Invalid parameter passed to AL call."); + case AL_INVALID_VALUE: + return string("Invalid enum parameter value."); + case AL_ILLEGAL_COMMAND: + return string("Illegal command."); + case AL_OUT_OF_MEMORY: + return string("AL out of memory."); default: ! wxString s = wxString::Format("Unknown Ogg error (%d)", code); ! return string(s.c_str()); } } |
|
From: Dewitt C. <ddc...@us...> - 2004-09-14 02:02:32
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14891/include/sim Modified Files: Game.h tc3DViewer.h tcDirectorEvent.h tcFlightPort.h Log Message: Index: tcFlightPort.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcFlightPort.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcFlightPort.h 9 Aug 2004 02:35:14 -0000 1.7 --- tcFlightPort.h 14 Sep 2004 02:01:45 -0000 1.8 *************** *** 112,115 **** --- 112,116 ---- void InitFromDatabase(Database::tcFlightportDBObject *dbObj); void InitRelPos(tcAirState *airstate); + bool IsHeloOnly() const; int Launch(int runway); // order unit on runway to take off int LaunchID(long id); // order unit with id to take off (if on runway) Index: tc3DViewer.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tc3DViewer.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** tc3DViewer.h 6 Sep 2004 01:08:03 -0000 1.27 --- tc3DViewer.h 14 Sep 2004 02:01:45 -0000 1.28 *************** *** 1,6 **** ! /* ! ** tc3DViewer.h ! ** ! ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. --- 1,6 ---- ! /** ! ** @file tc3DViewer.h ! */ ! /* Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. *************** *** 106,109 **** --- 106,110 ---- void UpdateTextObject(int key, const std::string& text); + osg::Projection* CreateDrawProjection(); void CreateScene(); void CreateSky(); *************** *** 115,118 **** --- 116,120 ---- float GetCameraRange() {return cameraRange;} osg::Vec3 GetCameraPosition(); + osg::MatrixTransform* GetDrawMatrixTransform(); double GetGameTime() const {return gameTime;} osg::Vec3 GetObjectPosition(tcGameObject *obj); Index: Game.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/Game.h,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** Game.h 6 Sep 2004 01:08:03 -0000 1.45 --- Game.h 14 Sep 2004 02:01:45 -0000 1.46 *************** *** 63,67 **** class tcDisplaySettingsView; class tcChatBox; ! using namespace ScriptInterface; --- 63,67 ---- class tcDisplaySettingsView; class tcChatBox; ! class tc3DWindow; using namespace ScriptInterface; *************** *** 175,178 **** --- 175,180 ---- tcScenarioSelectView* scenarioSelectView; + tc3DWindow* test3DWindow; + bool mbSaveScenario; char mzFileName[128]; *************** *** 247,250 **** --- 249,253 ---- void Set3D(wxCommandEvent& event); void SetBriefingMode(wxCommandEvent& event); + void SetBriefingMode(long state); void SetMultiplayerMode(wxCommandEvent& event); void SetPauseMode(wxCommandEvent& event); Index: tcDirectorEvent.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcDirectorEvent.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcDirectorEvent.h 17 Aug 2004 02:22:56 -0000 1.9 --- tcDirectorEvent.h 14 Sep 2004 02:01:45 -0000 1.10 *************** *** 107,110 **** --- 107,111 ---- { public: + enum {FADE_MASK = 0x01, RELATIVE_COORD_MASK = 0x02, MARKER_DISABLE_MASK = 0x04}; int effectCode; |
|
From: Dewitt C. <ddc...@us...> - 2004-09-14 02:02:32
|
Update of /cvsroot/gcblue/gcb_wx/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14891/scripts Modified Files: Menu.py UnitCommands.py Log Message: Index: UnitCommands.py =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/scripts/UnitCommands.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** UnitCommands.py 16 Aug 2004 01:43:30 -0000 1.9 --- UnitCommands.py 14 Sep 2004 02:01:45 -0000 1.10 *************** *** 101,104 **** --- 101,125 ---- SetFractionalSpeed(UI, 0.5) + + def GroupSpeed100(GI): + unit_count = GI.GetUnitCount() + for n in range(0, unit_count): + UnitInfo = GI.GetPlatformInterface(n) + Speed100(UnitInfo) + + def GroupSpeed80(GI): + unit_count = GI.GetUnitCount() + for n in range(0, unit_count): + UnitInfo = GI.GetPlatformInterface(n) + Speed80(UnitInfo) + + def GroupSpeed50(GI): + unit_count = GI.GetUnitCount() + for n in range(0, unit_count): + UnitInfo = GI.GetPlatformInterface(n) + Speed50(UnitInfo) + + + def AltitudeHigh(UI): max_altitude = UI.GetMaxAlt() Index: Menu.py =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/scripts/Menu.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Menu.py 16 Aug 2004 01:43:30 -0000 1.5 --- Menu.py 14 Sep 2004 02:01:45 -0000 1.6 *************** *** 34,37 **** --- 34,44 ---- GroupMenu.AddItemUI('Change heading','SetHeadingGroup','Heading') + GroupMenu.AddItem('Speed','') + GroupMenu.BeginSubMenu() + GroupMenu.AddItem('50%','GroupSpeed50') + GroupMenu.AddItem('80%','GroupSpeed80') + GroupMenu.AddItem('100%','GroupSpeed100') + GroupMenu.EndSubMenu() + # Group orders GroupMenu.AddItem('Orders','') |
|
From: Dewitt C. <ddc...@us...> - 2004-09-14 02:02:23
|
Update of /cvsroot/gcblue/gcb_wx/include/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14891/include/database Modified Files: tcDBObjSerializer.h Log Message: Index: tcDBObjSerializer.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/database/tcDBObjSerializer.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcDBObjSerializer.h 8 Aug 2004 00:31:32 -0000 1.3 --- tcDBObjSerializer.h 14 Sep 2004 02:01:45 -0000 1.4 *************** *** 87,91 **** T* obj = new T; obj->SerializeCSV(&csv, true); // load obj data from file ! int nResult = database->mcObjectData.AddElement(obj, key); // add to database, key gets new key val obj->mnKey = key; // set key val of object (may not be necessary anymore) } --- 87,91 ---- T* obj = new T; obj->SerializeCSV(&csv, true); // load obj data from file ! database->mcObjectData.AddElement(obj, key); // add to database, key gets new key val obj->mnKey = key; // set key val of object (may not be necessary anymore) } |
|
From: Dewitt C. <ddc...@us...> - 2004-09-14 02:02:23
|
Update of /cvsroot/gcblue/gcb_wx/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14891/docs Modified Files: CHANGES.txt Log Message: Index: CHANGES.txt =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/docs/CHANGES.txt,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** CHANGES.txt 17 Aug 2004 02:22:55 -0000 1.35 --- CHANGES.txt 14 Sep 2004 02:01:44 -0000 1.36 *************** *** 3,6 **** --- 3,17 ---- 0.6 --------------------------------------------------------------------- + *** 2004-09-13 Dewitt Colclough *** + - Initial 3D window commit + + *** 2004-09-06 Dewitt Colclough *** + - Added object 3D display to start screens + - Upgraded scenario file system to use directories + - Improved missile trail smoke a little + - Added some new group commands + - Added victory goal status summary to "game over" message box + - Adjusted level flight time for air launched missiles to 1.5 secs + *** 2004-08-15 Dewitt Colclough *** - Added grouping to OOB panel on the left |
|
From: Dewitt C. <ddc...@us...> - 2004-09-14 02:02:22
|
Update of /cvsroot/gcblue/gcb_wx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14891 Modified Files: GCblue.vcproj Log Message: Index: GCblue.vcproj =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/GCblue.vcproj,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** GCblue.vcproj 5 Sep 2004 01:01:59 -0000 1.66 --- GCblue.vcproj 14 Sep 2004 02:01:44 -0000 1.67 *************** *** 252,255 **** --- 252,258 ---- </File> <File + RelativePath=".\src\graphics\tc3DWindow.cpp"> + </File> + <File RelativePath="src\graphics\tcButton.cpp"> </File> *************** *** 1092,1095 **** --- 1095,1101 ---- </File> <File + RelativePath=".\include\graphics\tc3DWindow.h"> + </File> + <File RelativePath="include\graphics\tcButton.h"> </File> |
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14891/src/sim Modified Files: Game.cpp tc3DViewer.cpp tcDirector.cpp tcDirectorEvent.cpp tcESMSensor.cpp tcFlightOpsObject.cpp tcFlightPort.cpp tcGameObject.cpp tcGameView.cpp tcLauncherState.cpp tcMapData.cpp tcMapView.cpp tcMissileObject.cpp tcOOBView.cpp tcObjectControl.cpp tcRadar.cpp tcSensorMap.cpp tcSimState.cpp tcWeaponObject.cpp Log Message: Index: tcMissileObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcMissileObject.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tcMissileObject.cpp 6 Aug 2004 02:47:52 -0000 1.16 --- tcMissileObject.cpp 14 Sep 2004 02:01:47 -0000 1.17 *************** *** 233,237 **** float dp_rad,dp_min,dp_max; dp_rad = mfGoalPitch_rad - mcKin.mfPitch_rad; ! dp_max = 0.524f*dt_s; // 30 deg/s pitch rate, hard coded for now dp_min = -dp_max; if (dp_rad < dp_min) {dp_rad = dp_min;} --- 233,237 ---- float dp_rad,dp_min,dp_max; dp_rad = mfGoalPitch_rad - mcKin.mfPitch_rad; ! dp_max = 1.05f*dt_s; // 60 deg/s pitch rate, hard coded for now dp_min = -dp_max; if (dp_rad < dp_min) {dp_rad = dp_min;} *************** *** 293,297 **** } if (guidanceStatusTime == 0) {guidanceStatusTime = afStatusTime;} ! float dt_s = (float)(afStatusTime - guidanceStatusTime); guidanceStatusTime = afStatusTime; mfLastGuidanceUpdate = msKState.mfFlightTime; --- 293,297 ---- } if (guidanceStatusTime == 0) {guidanceStatusTime = afStatusTime;} ! // float dt_s = (float)(afStatusTime - guidanceStatusTime); guidanceStatusTime = afStatusTime; mfLastGuidanceUpdate = msKState.mfFlightTime; *************** *** 421,433 **** if (msKState.mfAltitude_m < fGoalAltitude_m - MISSILE_ACZ) { ! mfGoalPitch_rad = 1.0f; } else if (msKState.mfAltitude_m > fGoalAltitude_m + MISSILE_ACZ) { ! mfGoalPitch_rad = -1.0f; } else { ! mfGoalPitch_rad = 0.1f*(fGoalAltitude_m-msKState.mfAltitude_m)/MISSILE_ACZ; } } --- 421,433 ---- if (msKState.mfAltitude_m < fGoalAltitude_m - MISSILE_ACZ) { ! mfGoalPitch_rad = 0.7f; } else if (msKState.mfAltitude_m > fGoalAltitude_m + MISSILE_ACZ) { ! mfGoalPitch_rad = -0.7f; } else { ! mfGoalPitch_rad = 0.7f*(fGoalAltitude_m-msKState.mfAltitude_m)/MISSILE_ACZ; } } *************** *** 444,448 **** // force level flight for first few seconds for air-launched missiles ! if ((msKState.mfFlightTime < 3.0)&&(msKState.mfAltitude_m > 50.0f)) { mfGoalHeading_rad = mcKin.mfHeading_rad; --- 444,448 ---- // force level flight for first few seconds for air-launched missiles ! if ((msKState.mfFlightTime < 1.5)&&(msKState.mfAltitude_m > 50.0f)) { mfGoalHeading_rad = mcKin.mfHeading_rad; *************** *** 612,615 **** --- 612,616 ---- mfGuidanceUpdateInterval = 0.5f; mnCurrentSegment = 0; + mfRangeToObjective_km = 9999.0f; mfGoalPitch_rad = 0.01f; } *************** *** 648,651 **** --- 649,653 ---- guidanceStatusTime = 0; mfInterceptTime = 9999.0f; + mfRangeToObjective_km = 9999.0f; // if these inits are missing, causes a crash with time accel after missile launch Index: tcSensorMap.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSensorMap.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcSensorMap.cpp 8 Aug 2004 00:31:35 -0000 1.9 --- tcSensorMap.cpp 14 Sep 2004 02:01:47 -0000 1.10 *************** *** 207,216 **** // search for existing match ! for(int n=0;n<mnContributors;n++) { tcSensorReport *pSensorReport = &maSensorReport[n]; ! if (pSensorReport->mnFlags & (TRACK_BEARING_ONLY|TRACK_TRIANGULATED)) { ! int nPassiveIdx = n; } ! else if (pSensorReport->mnSensorPlatformID == anSensorID) { rpReport = pSensorReport; return true; --- 207,219 ---- // search for existing match ! for(int n=0; n<mnContributors; n++) ! { tcSensorReport *pSensorReport = &maSensorReport[n]; ! if (pSensorReport->mnFlags & (TRACK_BEARING_ONLY|TRACK_TRIANGULATED)) ! { ! nPassiveIdx = n; // used to have "int nPassiveIdx = n;" here !? } ! else if (pSensorReport->mnSensorPlatformID == anSensorID) ! { rpReport = pSensorReport; return true; *************** *** 241,245 **** bool tcSensorMapTrack::UpdatePassiveReport(Sensor::tcSensorReport*& rpReport, tnPoolIndex anSensorID) { ! int nPassiveIdx = -1; // if track already has active data then do not update with passive data --- 244,248 ---- bool tcSensorMapTrack::UpdatePassiveReport(Sensor::tcSensorReport*& rpReport, tnPoolIndex anSensorID) { ! //int nPassiveIdx = -1; // if track already has active data then do not update with passive data *************** *** 247,251 **** // search for existing match ! for(int n=0;n<mnContributors;n++) { tcSensorReport *pSensorReport = &maSensorReport[n]; if ((pSensorReport->mnFlags & (TRACK_BEARING_ONLY|TRACK_TRIANGULATED))&& --- 250,255 ---- // search for existing match ! for(int n=0;n<mnContributors;n++) ! { tcSensorReport *pSensorReport = &maSensorReport[n]; if ((pSensorReport->mnFlags & (TRACK_BEARING_ONLY|TRACK_TRIANGULATED))&& *************** *** 258,262 **** // add new report if there is room ! if (mnContributors < MAX_SENSOR_REPORTS) { tcSensorReport *pSensorReport = &maSensorReport[mnContributors++]; pSensorReport->Clear(); --- 262,267 ---- // add new report if there is room ! if (mnContributors < MAX_SENSOR_REPORTS) ! { tcSensorReport *pSensorReport = &maSensorReport[mnContributors++]; pSensorReport->Clear(); *************** *** 313,319 **** * check for update reports and update track */ ! void tcSensorMapTrack::UpdateTrack(void) { ! bool bUpdated = false; // find first new active report since last update and update track --- 318,324 ---- * check for update reports and update track */ ! void tcSensorMapTrack::UpdateTrack() { ! //bool bUpdated = false; // find first new active report since last update and update track *************** *** 911,918 **** } ! bool tcSensorMap::Test() { double fTime = 1.0f; tnPoolIndex nSensorPlatformIdx = 1; ! tnPoolIndex nTargetID = 3; tcSensorReport report; --- 916,924 ---- } ! bool tcSensorMap::Test() ! { double fTime = 1.0f; tnPoolIndex nSensorPlatformIdx = 1; ! // tnPoolIndex nTargetID = 3; tcSensorReport report; Index: tcFlightPort.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcFlightPort.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcFlightPort.cpp 9 Aug 2004 02:35:16 -0000 1.10 --- tcFlightPort.cpp 14 Sep 2004 02:01:47 -0000 1.11 *************** *** 436,439 **** --- 436,448 ---- pGameObj->SetRelativeOrientation(spotinfo->orientation, 0, 0); } + + /** + * @return true if all launch spots are heloOnly + */ + bool tcFlightPort::IsHeloOnly() const + { + return mpDBObject->heloOnly != 0; + } + //---------------------------------------------------------------------------- void tcFlightPort::SetObjectDestination(unsigned n, teLocation loc) *************** *** 446,450 **** void tcFlightPort::UpdateRelPos(tcAirState *airstate, double time) { ! tcGameObject *pGameObj = airstate->obj; if (airstate->current_location == TRANSIT) { --- 455,459 ---- void tcFlightPort::UpdateRelPos(tcAirState *airstate, double time) { ! // tcGameObject *pGameObj = airstate->obj; if (airstate->current_location == TRANSIT) { Index: tcESMSensor.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcESMSensor.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcESMSensor.cpp 8 Aug 2004 00:31:35 -0000 1.6 --- tcESMSensor.cpp 14 Sep 2004 02:01:47 -0000 1.7 *************** *** 61,65 **** // look az is az relative to north, might have to change later ! float lookAz_rad = parent->mcKin.mfHeading_rad + mountAz_rad; float emitterAz_rad = emitter_kin.mfHeading_rad + emitter->mountAz_rad; --- 61,65 ---- // look az is az relative to north, might have to change later ! // float lookAz_rad = parent->mcKin.mfHeading_rad + mountAz_rad; float emitterAz_rad = emitter_kin.mfHeading_rad + emitter->mountAz_rad; Index: tc3DViewer.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tc3DViewer.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** tc3DViewer.cpp 6 Sep 2004 01:08:04 -0000 1.35 --- tc3DViewer.cpp 14 Sep 2004 02:01:47 -0000 1.36 *************** *** 535,539 **** --- 535,555 ---- } + /** + * Creates new drawing projection and adds it to the scene graph. + * New owner should remove the projection from the scenegraph if + * it is destroyed before the 3DViewer. + * The default projection is the same size as the 3D viewer + * + * @return projection that was just created + */ + osg::Projection* tc3DViewer::CreateDrawProjection() + { + osg::Projection* projection = new osg::Projection(); + projection->setMatrix(osg::Matrix::ortho2D(0, mnWidth, 0, mnHeight)); + + rootnode->addChild(projection); + return projection; + } void tc3DViewer::CreateScene() *************** *** 667,671 **** positioned->addChild(glider); osg::PositionAttitudeTransform* xform = new osg::PositionAttitudeTransform; ! osg::AnimationPath* animationPath = createAnimationPath(10.0f); //xform->setUpdateCallback(new osg::AnimationPathCallback(animationPath,0.0,1.0)); xform->setUpdateCallback(new ObjectUpdater()); --- 683,687 ---- positioned->addChild(glider); osg::PositionAttitudeTransform* xform = new osg::PositionAttitudeTransform; ! // osg::AnimationPath* animationPath = createAnimationPath(10.0f); //xform->setUpdateCallback(new osg::AnimationPathCallback(animationPath,0.0,1.0)); xform->setUpdateCallback(new ObjectUpdater()); *************** *** 887,890 **** --- 903,914 ---- /** + * @return pointer to MatrixTransform used to display 2D objects like HUD text + */ + osg::MatrixTransform* tc3DViewer::GetDrawMatrixTransform() + { + return hudObjects.get(); + } + + /** * @return object position in world coordinates. */ Index: tcObjectControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcObjectControl.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcObjectControl.cpp 9 Aug 2004 02:35:16 -0000 1.17 --- tcObjectControl.cpp 14 Sep 2004 02:01:47 -0000 1.18 *************** *** 543,547 **** bool mbDrawSpeed = mbSurface || mbAir; bool mbDrawAltitude = mbAir; ! bool mbDrawEngagement = mbSurface; if (mbDrawSpeed) {DrawBarObject(pGraphics, &msSOI, pkin->mfSpeed_kts, mfGoalSpeed_kts);} --- 543,547 ---- bool mbDrawSpeed = mbSurface || mbAir; bool mbDrawAltitude = mbAir; ! // bool mbDrawEngagement = mbSurface; if (mbDrawSpeed) {DrawBarObject(pGraphics, &msSOI, pkin->mfSpeed_kts, mfGoalSpeed_kts);} *************** *** 1195,1200 **** else if (msHOI.mrectArc.Contains((float)point.x,(float)point.y)) { ! mpHookedGameObj->SetHeading(msHOI.mfMouseHeading_rad); ! msHOI.mbMouseOver = false; } else if (msSOI.mrectcontrol.Contains((float)point.x,(float)point.y)) --- 1195,1203 ---- else if (msHOI.mrectArc.Contains((float)point.x,(float)point.y)) { ! if (tcPlatformObject* plat = dynamic_cast<tcPlatformObject*>(mpHookedGameObj)) ! { ! plat->SetHeading(msHOI.mfMouseHeading_rad); ! msHOI.mbMouseOver = false; ! } } else if (msSOI.mrectcontrol.Contains((float)point.x,(float)point.y)) *************** *** 1205,1211 **** aeroAirObj->SetThrottleFraction(msSOI.mfmousevalue / aeroAirObj->mpDBObject->mfMaxSpeed_kts); } ! else if (tcPlatformObject *platformObj = dynamic_cast<tcPlatformObject*>(mpHookedGameObj)) { ! platformObj->SetSpeed(msSOI.mfmousevalue); } msSOI.mbMouseOver = false; --- 1208,1214 ---- aeroAirObj->SetThrottleFraction(msSOI.mfmousevalue / aeroAirObj->mpDBObject->mfMaxSpeed_kts); } ! else if (tcPlatformObject* plat = dynamic_cast<tcPlatformObject*>(mpHookedGameObj)) { ! plat->SetSpeed(msSOI.mfmousevalue); } msSOI.mbMouseOver = false; Index: tcGameObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcGameObject.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** tcGameObject.cpp 6 Sep 2004 01:08:04 -0000 1.21 --- tcGameObject.cpp 14 Sep 2004 02:01:47 -0000 1.22 *************** *** 235,239 **** void tcGameObject::RemoveChild(tcGameObject *child) { ! int nChildren = (int)children.size(); tcGameObject*& child_n = children.at(child->mnID); if (child_n == child) --- 235,239 ---- void tcGameObject::RemoveChild(tcGameObject *child) { ! // int nChildren = (int)children.size(); tcGameObject*& child_n = children.at(child->mnID); if (child_n == child) Index: tcDirector.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcDirector.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcDirector.cpp 24 Jun 2004 21:35:41 -0000 1.7 --- tcDirector.cpp 14 Sep 2004 02:01:47 -0000 1.8 *************** *** 79,83 **** AddEvent(new tcGameCommandEvent(ID_SET3D, 0, 0)); // deactivate 3D window ! AddEvent(new tcSoundEffectEvent(1.0f,SEFFECT_WELCOME)); //AddEvent(new tcMusicEvent("","pause",0,0,0)); AddEvent(new tcMusicEvent("tension1","play",0,2.0,30.0)); --- 79,83 ---- AddEvent(new tcGameCommandEvent(ID_SET3D, 0, 0)); // deactivate 3D window ! //AddEvent(new tcSoundEffectEvent(1.0f,SEFFECT_WELCOME)); //AddEvent(new tcMusicEvent("","pause",0,0,0)); AddEvent(new tcMusicEvent("tension1","play",0,2.0,30.0)); Index: tcSimState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSimState.cpp,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** tcSimState.cpp 6 Sep 2004 01:08:04 -0000 1.53 --- tcSimState.cpp 14 Sep 2004 02:01:47 -0000 1.54 *************** *** 359,370 **** if (trueRange2 < 64.0f) // 8.0 m range { - tcString s; - s.Format("weapon %d hit target %d, range^2: %3.1f m, time %.1f s", - missile->mnID, target->mnID, trueRange2, mfSimTime); - WTL(s.GetBuffer()); - std::cout << s.GetBuffer(); - fprintf(stdout," collision relative time: %f, dx:%f dy:%f dz:%f\n", - tclosest, dx, dy, dz); - float fDamage = missile->mpDBObject->mfDamage; float fDamageFract = GetFractionalDamage(fDamage, target); --- 359,362 ---- *************** *** 383,386 **** --- 375,386 ---- } } + + tcString s; + s.Format("weapon %d hit target %d, range^2: %3.1f m, dmg: %3.1f %%, time %.1f s", + missile->mnID, target->mnID, trueRange2, fDamageFract, mfSimTime); + WTL(s.GetBuffer()); + std::cout << s.GetBuffer(); + fprintf(stdout," collision relative time: %f, dx:%f dy:%f dz:%f\n", + tclosest, dx, dy, dz); } *************** *** 502,506 **** { bool bTerminal = (missileObj->GetGuidanceParameters(gp) != 0); ! if (gp.mnTargetID != -1) { if ((gp.mfInterceptTime < 10.0)) --- 502,506 ---- { bool bTerminal = (missileObj->GetGuidanceParameters(gp) != 0); ! if (bTerminal && (gp.mnTargetID != -1)) { if ((gp.mfInterceptTime < 10.0)) *************** *** 792,796 **** tnPoolIndex nSize = maPlatformState.GetCount(); tnPoolIndex nKey; - int nListIndex=0; for (tnPoolIndex i=0; i<nSize; i++) --- 792,795 ---- *************** *** 881,885 **** { enum {MAX_EMITTERS=4}; ! float fAz_rad; if (!mpUserInfo->IsOwnAlliance(apESMPlat->mnAlliance)) {return;} --- 880,884 ---- { enum {MAX_EMITTERS=4}; ! float fAz_rad = 0; if (!mpUserInfo->IsOwnAlliance(apESMPlat->mnAlliance)) {return;} *************** *** 1015,1019 **** apSensorState->GetTestArea(region); nCount = GetPlatformsWithinRegion(aTargetKeys, 100, ®ion); ! bool bOwnAllianceUpdate = mpUserInfo->IsOwnAlliance(applat->mnAlliance); for(int k=0;k<nCount;k++) { --- 1014,1018 ---- apSensorState->GetTestArea(region); nCount = GetPlatformsWithinRegion(aTargetKeys, 100, ®ion); ! // bool bOwnAllianceUpdate = mpUserInfo->IsOwnAlliance(applat->mnAlliance); for(int k=0;k<nCount;k++) { *************** *** 1063,1067 **** int bTargetExists = maPlatformState.Lookup(nTargetID,pTargetObj); bool bOwnAlliance = (pTargetObj->mnAlliance == apGameObj->mnAlliance); ! float fRange_km; if ((bTargetExists)&&(!bOwnAlliance)) // no own-alliance detections { --- 1062,1066 ---- int bTargetExists = maPlatformState.Lookup(nTargetID,pTargetObj); bool bOwnAlliance = (pTargetObj->mnAlliance == apGameObj->mnAlliance); ! float fRange_km = 0; if ((bTargetExists)&&(!bOwnAlliance)) // no own-alliance detections { *************** *** 1521,1525 **** bool bFound = false; int nTries = 0; ! tcDatabaseObject *pdata; while ((bSearching)&&(nTries++ < 128)) --- 1520,1524 ---- bool bFound = false; int nTries = 0; ! tcDatabaseObject *pdata = 0; while ((bSearching)&&(nTries++ < 128)) *************** *** 1538,1542 **** { tcGameObject *pplat; ! int nPlatDB = mpDatabase->mcObjectData.GetCount(); static int nSeedCount = 0; UINT platform_type; --- 1537,1541 ---- { tcGameObject *pplat; ! // int nPlatDB = mpDatabase->mcObjectData.GetCount(); static int nSeedCount = 0; UINT platform_type; Index: tcWeaponObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcWeaponObject.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcWeaponObject.cpp 8 Aug 2004 00:31:35 -0000 1.7 --- tcWeaponObject.cpp 14 Sep 2004 02:01:47 -0000 1.8 *************** *** 106,113 **** fprintf(stderr, "tcWeaponObject::SetIntendedTarget - targetId %d not found in sensor map", targetId); - - return; } ! smtrack->AddEngagement(tcGameObject::mnID); } --- 106,114 ---- fprintf(stderr, "tcWeaponObject::SetIntendedTarget - targetId %d not found in sensor map", targetId); } ! else ! { ! smtrack->AddEngagement(tcGameObject::mnID); ! } } Index: tcFlightOpsObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcFlightOpsObject.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcFlightOpsObject.cpp 9 Aug 2004 02:35:16 -0000 1.3 --- tcFlightOpsObject.cpp 14 Sep 2004 02:01:47 -0000 1.4 *************** *** 129,140 **** if (gameObj->mpDBObject == NULL) {return;} int nAircraft = flight_deck.GetHangarCapacity(); ! for(int i=0;i<nAircraft;i++) { // add FW air child for test ! tcDatabaseObject *dbObj = database->GetRandomOfType(MTYPE_FIXEDWINGX); ! tcAirDBObject *airDBObj = dynamic_cast<tcAirDBObject*>(dbObj); ! tcAeroAirObject *child = NULL; ! if (airDBObj) child = new tcAeroAirObject(airDBObj); /* This ASSERT can happen if bad model ids are in a database table (e.g. --- 129,152 ---- if (gameObj->mpDBObject == NULL) {return;} + bool heloOnly = flight_deck.IsHeloOnly(); + unsigned int modelType = (heloOnly) ? MTYPE_HELO : MTYPE_FIXEDWINGX; + int nAircraft = flight_deck.GetHangarCapacity(); ! for(int i=0; i<nAircraft; i++) { // add FW air child for test ! tcDatabaseObject* dbObj = database->GetRandomOfType(modelType); ! // tcAirDBObject* airDBObj = dynamic_cast<tcAirDBObject*>(dbObj); ! ! tcAirObject* child = 0; ! ! if (heloOnly) ! { ! child = new tcHeloObject(dynamic_cast<tcGenericDBObject*>(dbObj)); ! } ! else ! { ! child = new tcAeroAirObject(dynamic_cast<tcAirDBObject*>(dbObj)); ! } /* This ASSERT can happen if bad model ids are in a database table (e.g. *************** *** 144,148 **** if (child != NULL) { ! child->mzUnit = "AIRX_"; child->mzUnit.AssignRandomSuffix(); float z = -20.0f + (float)i * 18.0f; --- 156,160 ---- if (child != NULL) { ! child->mzUnit = (heloOnly) ? "HELO_" : "AIRX_"; child->mzUnit.AssignRandomSuffix(); float z = -20.0f + (float)i * 18.0f; Index: tcLauncherState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcLauncherState.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcLauncherState.cpp 16 Aug 2004 01:43:31 -0000 1.17 --- tcLauncherState.cpp 14 Sep 2004 02:01:47 -0000 1.18 *************** *** 551,555 **** for(int n = 0; n < mnCount; n++) { ! const tcLauncher* launcher = &launchers[n]; int launcherFlag = GetLauncherFlag(n); --- 551,555 ---- for(int n = 0; n < mnCount; n++) { ! // const tcLauncher* launcher = &launchers[n]; int launcherFlag = GetLauncherFlag(n); Index: tcOOBView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcOOBView.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcOOBView.cpp 17 Aug 2004 02:22:56 -0000 1.8 --- tcOOBView.cpp 14 Sep 2004 02:01:47 -0000 1.9 *************** *** 289,293 **** if (yheader > 0) { ! mpBrush->SetColor(Color(254,200,200,250)); DrawText(graphics, mpFont, mpBrush, "* Surface", mfXOffset, yheader - 15.0f); --- 289,293 ---- if (yheader > 0) { ! mpBrush->SetColor(Color(254,220,220,150)); DrawText(graphics, mpFont, mpBrush, "* Surface", mfXOffset, yheader - 15.0f); *************** *** 299,303 **** if (yheader > 0) { ! mpBrush->SetColor(Color(254,200,200,250)); DrawText(graphics, mpFont, mpBrush, "* Air", mfXOffset, yheader - 15.0f); } --- 299,303 ---- if (yheader > 0) { ! mpBrush->SetColor(Color(254,220,220,150)); DrawText(graphics, mpFont, mpBrush, "* Air", mfXOffset, yheader - 15.0f); } *************** *** 307,311 **** if (yheader > 0) { ! mpBrush->SetColor(Color(254,200,200,250)); DrawText(graphics, mpFont, mpBrush, "* CVs and Airfields", mfXOffset, yheader - 15.0f); --- 307,311 ---- if (yheader > 0) { ! mpBrush->SetColor(Color(254,220,220,150)); DrawText(graphics, mpFont, mpBrush, "* CVs and Airfields", mfXOffset, yheader - 15.0f); Index: tcDirectorEvent.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcDirectorEvent.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcDirectorEvent.cpp 8 Aug 2004 00:31:35 -0000 1.8 --- tcDirectorEvent.cpp 14 Sep 2004 02:01:47 -0000 1.9 *************** *** 114,118 **** return; } ! if (effectCode == 1) // alpha blend { double tspan = eventStop - eventStart; --- 114,118 ---- return; } ! if (effectCode & FADE_MASK) // alpha blend { double tspan = eventStop - eventStart; *************** *** 139,148 **** tcMapTextEvent::tcMapTextEvent(std::string text, double startTime, double endTime, double lon_deg, double lat_deg, int effect) ! : tcMapEvent(new tcMapTextObject(text, lon_deg, lat_deg)) , tcDirectorEvent(startTime, endTime) { effectCode = effect; } --- 139,155 ---- + /** + * effect - bit pos 0, fade in & out enabled + * effect - bit pos 1, enabled - use relative screen coords, disabled - use geo lat/lon + * effect - bit pos 2, disable marker + */ tcMapTextEvent::tcMapTextEvent(std::string text, double startTime, double endTime, double lon_deg, double lat_deg, int effect) ! : tcMapEvent(new tcMapTextObject(text, lon_deg, lat_deg, ! (effect & RELATIVE_COORD_MASK) != 0)) , tcDirectorEvent(startTime, endTime) { effectCode = effect; + mapObject->SetMarkerActive((effect & MARKER_DISABLE_MASK) == 0); } Index: tcMapView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcMapView.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** tcMapView.cpp 6 Sep 2004 01:08:04 -0000 1.32 --- tcMapView.cpp 14 Sep 2004 02:01:47 -0000 1.33 *************** *** 146,149 **** --- 146,150 ---- return afExtent_rad*mfScaleX_pelprad; } + /***********************************************************************************/ tcPoint tcMapView::ScreenToGeo(wxPoint pscreen) Index: tcGameView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcGameView.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcGameView.cpp 8 Aug 2004 00:31:35 -0000 1.12 --- tcGameView.cpp 14 Sep 2004 02:01:47 -0000 1.13 *************** *** 446,451 **** void tcGameView::Update(double afStatusTime) { ! tnPoolIndex cmappos = mpSS->maPlatformState.GetStartPosition(); ! int nSize = mpSS->maPlatformState.GetCount(); int nMapObj = 0; int nWorldMapObj = 0; --- 446,451 ---- void tcGameView::Update(double afStatusTime) { ! // tnPoolIndex cmappos = mpSS->maPlatformState.GetStartPosition(); ! // int nSize = mpSS->maPlatformState.GetCount(); int nMapObj = 0; int nWorldMapObj = 0; Index: tcMapData.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcMapData.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tcMapData.cpp 24 Jun 2004 21:35:41 -0000 1.12 --- tcMapData.cpp 14 Sep 2004 02:01:47 -0000 1.13 *************** *** 61,65 **** int trial = 0; ! float randomLon,randomLat,alt; while (trial++ < MAX_TRIALS) { --- 61,67 ---- int trial = 0; ! float randomLon = 0; ! float randomLat = 0; ! float alt = 0; while (trial++ < MAX_TRIALS) { Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** Game.cpp 6 Sep 2004 01:08:03 -0000 1.94 --- Game.cpp 14 Sep 2004 02:01:47 -0000 1.95 *************** *** 52,55 **** --- 52,56 ---- #include "network/tcMultiplayerInterface.h" #include "tcChatBox.h" + #include "tc3DWindow.h" #if defined(_MSC_VER) *************** *** 338,341 **** --- 339,344 ---- // deactivate delayed text so that briefing text is quickly available briefingConsoleLeft->SetDelayedTextEffect(false); + + SetBriefingMode(0); } *************** *** 344,347 **** --- 347,356 ---- if (InitGame()) { + // set hookID for windows that were just created + long hookID = tacticalMap->GetHookID(); + hookInfo->SetHookID(hookID); + oobView->SetHookID(hookID); + objectControl->SetHookID(hookID); + optionsView->SetActive(false); startView->SetActive(false); *************** *** 372,375 **** --- 381,385 ---- meScreenMode = CREDIT; tcSound::Get()->PlayMusic("tension1"); + tcSound::Get()->SeekMusic(3.0); } *************** *** 479,482 **** --- 489,497 ---- /* ** Init graphics engine * **/ mpGraphicsEngine = tcGraphicsEngine::Get(); + tc3DWindow::Set3DViewer(viewer); + + test3DWindow = + new tc3DWindow(viewer, wxPoint(0, 0), wxSize(150, 80), "Test3DWindow"); + test3DWindow->SetActive(true); /* start view has to be initialized first so that we can *************** *** 717,721 **** briefingConsoleLeft->Print(" "); // need this to get it to display // add buttons ! briefingConsoleLeft->AddButton(wxRect(10,leftConsoleHeight-20,50,14), ID_SKIPBRIEFING, "SKIP"); briefingConsoleBottom = new tcSoundConsole(glCanvas, wxPoint(0,mnHeight-mnBottomMargin), --- 732,736 ---- 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), *************** *** 1105,1108 **** --- 1120,1131 ---- { long state = event.m_extraLong; + SetBriefingMode(state); + } + + /** + * @param state 0 - deactivate briefing mode, 1 - activate briefing + */ + void tcGame::SetBriefingMode(long state) + { if (state == 1) { *************** *** 1115,1118 **** --- 1138,1142 ---- } + /** * Set multiplayer mode *************** *** 1329,1332 **** --- 1353,1358 ---- viewer->SetActive(true); + test3DWindow->Draw(); + viewer->SetCameraAz(viewer->GetCameraAz() + 0.02f); static float cameraTime = 0; *************** *** 1768,1772 **** bool tcGame::Finish() { ! mpGraphicsEngine->DeleteAllSurfaces(); /* if (mpGraphicsEngine != NULL) --- 1794,1798 ---- bool tcGame::Finish() { ! // mpGraphicsEngine->DeleteAllSurfaces(); /* if (mpGraphicsEngine != NULL) *************** *** 1796,1801 **** unsigned count = simState->GetAlliancePlatforms(&id[0], maxPlats, ownAlliance); ! unsigned idx = rand() % count; ! NewHook(id[idx]); } --- 1822,1835 ---- unsigned count = simState->GetAlliancePlatforms(&id[0], maxPlats, ownAlliance); ! if (count) ! { ! unsigned idx = rand() % count; ! NewHook(id[idx]); ! } ! { ! #ifdef _DEBUG ! fprintf(stderr, "tcGame::HookRandomFriendly - No friendlies found.\n"); ! #endif ! } } Index: tcRadar.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcRadar.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tcRadar.cpp 8 Aug 2004 00:31:35 -0000 1.11 --- tcRadar.cpp 14 Sep 2004 02:01:47 -0000 1.12 *************** *** 308,312 **** { long nTargetID; ! tcGameObject *ptarget; int bFound; --- 308,312 ---- { long nTargetID; ! tcGameObject *ptarget = 0; int bFound; *************** *** 458,462 **** if (target != parent) // no self detection { ! float range_km; bool bDetected = (parent->mnAlliance != target->mnAlliance) && CanDetectTarget(target,range_km); --- 458,462 ---- if (target != parent) // no self detection { ! float range_km = 0; bool bDetected = (parent->mnAlliance != target->mnAlliance) && CanDetectTarget(target,range_km); |
|
From: Dewitt C. <ddc...@us...> - 2004-09-14 02:01:56
|
Update of /cvsroot/gcblue/gcb_wx/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14891/xml Added Files: scenarioselect_view.xml Log Message: --- NEW FILE: scenarioselect_view.xml --- <Window> <Button X="30" Y="25" Width="65" Height="15" Caption="Main" Command="10"/> <Button X="100" Y="25" Width="65" Height="15" Caption="Credits" Command="20"/> <Button X="170" Y="25" Width="65" Height="15" Caption="Database" Command="30"/> <Button X="240" Y="25" Width="65" Height="15" Caption="Options" Command="40"/> <Button X="310" Y="25" Width="65" Height="15" Caption="Play" Command="70"/> </Window> |
|
From: Dewitt C. <ddc...@us...> - 2004-09-14 02:01:56
|
Update of /cvsroot/gcblue/gcb_wx/src/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14891/src/graphics Modified Files: ObjectUpdater.cpp tc3DModel.cpp tcCreditView.cpp tcGraphicsEngine.cpp tcMapObject.cpp tcPanel.cpp tcPopupControl.cpp tcScenarioSelectView.cpp tcWindow.cpp Added Files: tc3DWindow.cpp Log Message: Index: tcPanel.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcPanel.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcPanel.cpp 5 Sep 2004 01:02:02 -0000 1.1 --- tcPanel.cpp 14 Sep 2004 02:01:46 -0000 1.2 *************** *** 110,114 **** void tcPanel::Clear() { ! int nItems = (int)panelItems.size(); panelItems.clear(); --- 110,114 ---- void tcPanel::Clear() { ! // int nItems = (int)panelItems.size(); panelItems.clear(); Index: tc3DModel.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tc3DModel.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** tc3DModel.cpp 6 Sep 2004 01:08:03 -0000 1.13 --- tc3DModel.cpp 14 Sep 2004 02:01:46 -0000 1.14 *************** *** 481,485 **** , 10000.0, 20000.0); ! unsigned nRanges = modelGroup->getNumRanges(); --- 481,485 ---- , 10000.0, 20000.0); ! // unsigned nRanges = modelGroup->getNumRanges(); Index: tcMapObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcMapObject.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcMapObject.cpp 8 Aug 2004 00:31:34 -0000 1.3 --- tcMapObject.cpp 14 Sep 2004 02:01:46 -0000 1.4 *************** *** 50,58 **** float x = pscreen.x; float y = pscreen.y; ! Pen *pen = mapView->GetPen(); pen->SetColor(color); ! graphics->DrawLine(pen,x-8,y-8,x+8,y+8); ! graphics->DrawLine(pen,x+8,y-8,x-8,y+8); } --- 50,62 ---- float x = pscreen.x; float y = pscreen.y; ! ! Pen* pen = mapView->GetPen(); pen->SetColor(color); ! if (markerEnabled) ! { ! graphics->DrawLine(pen,x-8,y-8,x+8,y+8); ! graphics->DrawLine(pen,x+8,y-8,x-8,y+8); ! } } *************** *** 63,67 **** { wxASSERT(mapView); ! return mapView->GeoToScreen(lon_rad,lat_rad); } --- 67,79 ---- { wxASSERT(mapView); ! if (useRelativeCoords) ! { ! wxRealPoint p = mapView->RelativeToScreen(_x, _y); ! return tcPoint(p.x, p.y); ! } ! else ! { ! return mapView->GeoToScreen(_x, _y); ! } } *************** *** 80,89 **** } ! tcMapObject::tcMapObject(double lon_deg, double lat_deg) { ! lon_rad = lon_deg * C_PIOVER180; ! lat_rad = lat_deg * C_PIOVER180; color = 0xFE64FF64; // green default isActive = true; } --- 92,111 ---- } ! tcMapObject::tcMapObject(double x, double y, bool useRel) ! : useRelativeCoords(useRel) { ! if (useRel) ! { ! _x = x; ! _y = y; ! } ! else ! { ! _x = x * C_PIOVER180; // convert to radian lon/lat ! _y = y * C_PIOVER180; ! } color = 0xFE64FF64; // green default isActive = true; + markerEnabled = true; } *************** *** 112,117 **** x+5.0f, y); ! graphics->DrawLine(pen,x-8,y-8,x+8,y+8); ! graphics->DrawLine(pen,x+8,y-8,x-8,y+8); } --- 134,142 ---- x+5.0f, y); ! if (markerEnabled) // avoids parent draw overhead this way ! { ! graphics->DrawLine(pen,x-8,y-8,x+8,y+8); ! graphics->DrawLine(pen,x+8,y-8,x-8,y+8); ! } } *************** *** 122,127 **** } ! tcMapTextObject::tcMapTextObject(std::string text, double lon_deg, double lat_deg) ! : tcMapObject(lon_deg, lat_deg), caption(text) { --- 147,152 ---- } ! tcMapTextObject::tcMapTextObject(std::string text, double x, double y, bool useRel) ! : tcMapObject(x, y, useRel), caption(text) { Index: tcCreditView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcCreditView.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcCreditView.cpp 6 Sep 2004 01:08:03 -0000 1.2 --- tcCreditView.cpp 14 Sep 2004 02:01:46 -0000 1.3 *************** *** 68,72 **** AddCredit(s, 60.0f, 0); ! AddCredit(tcString("Other contributors"), 23.0f, 1); AddCredit(tcString("Xavi Rubio (Linux)"), 12.0f, 2); AddCredit(tcString(""), 25.0f, 2); --- 68,73 ---- AddCredit(s, 60.0f, 0); ! AddCredit(tcString("Contributors"), 25.0f, 1); ! AddCredit(tcString("Grahame Flint (Naval research)"), 12.0f, 2); AddCredit(tcString("Xavi Rubio (Linux)"), 12.0f, 2); AddCredit(tcString(""), 25.0f, 2); *************** *** 76,79 **** --- 77,81 ---- AddCredit(tcString("Dust"), 12.0f, 2); + AddCredit(tcString("Harpy"), 12.0f, 2); AddCredit(tcString("Marcelo C\341ceres"), 12.0f, 2); AddCredit(tcString(""), 60.0f, 2); Index: tcScenarioSelectView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcScenarioSelectView.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcScenarioSelectView.cpp 6 Sep 2004 01:08:03 -0000 1.2 --- tcScenarioSelectView.cpp 14 Sep 2004 02:01:46 -0000 1.3 *************** *** 67,71 **** wxString scenarioDir(SCENARIO_PATH); ! size_t scenarioDirLength = scenarioDir.size(); int findIdx = filename.find(scenarioDir); --- 67,71 ---- wxString scenarioDir(SCENARIO_PATH); ! // size_t scenarioDirLength = scenarioDir.size(); int findIdx = filename.find(scenarioDir); *************** *** 206,210 **** totalPath += filePath; ! mpSimState->mpPythonInterface->LoadScenario(totalPath.c_str(), filePath.c_str()); if (mpSimState->msScenarioInfo.mbLoaded) --- 206,217 ---- totalPath += filePath; ! if (!wxString(caption.c_str()).Contains("Random")) ! { ! mpSimState->mpPythonInterface->LoadScenario(totalPath.c_str(), filePath.c_str()); ! } ! else ! { ! mpSimState->RandInit(); ! } if (mpSimState->msScenarioInfo.mbLoaded) Index: tcPopupControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcPopupControl.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcPopupControl.cpp 5 Sep 2004 01:02:02 -0000 1.1 --- tcPopupControl.cpp 14 Sep 2004 02:01:46 -0000 1.2 *************** *** 207,211 **** void tcPopupControl::OnLButtonDown(wxMouseEvent& event) { ! int builtInCommand; std::string pythonCommand; std::string uiCommand; --- 207,211 ---- void tcPopupControl::OnLButtonDown(wxMouseEvent& event) { ! int builtInCommand = -1; std::string pythonCommand; std::string uiCommand; Index: tcGraphicsEngine.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcGraphicsEngine.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tcGraphicsEngine.cpp 8 Aug 2004 00:31:34 -0000 1.17 --- tcGraphicsEngine.cpp 14 Sep 2004 02:01:46 -0000 1.18 *************** *** 39,42 **** --- 39,43 ---- #include "wx/dcscreen.h" #include "tcDisplayModes.h" + #include <osg/MatrixTransform> #if _MSC_VER > 1000 *************** *** 155,158 **** --- 156,160 ---- } + /** * @return string with driver name and version *************** *** 731,734 **** --- 733,738 ---- } + + void tcGraphicsEngine::CheckGLError() { *************** *** 768,773 **** bool hw_accel =(!(flags & PFD_GENERIC_FORMAT) && !(flags & PFD_GENERIC_ACCELERATED)); bool supportsGL = (flags & PFD_SUPPORT_OPENGL) != 0; ! bool doubleBuffer = (flags & PFD_DOUBLEBUFFER) != 0; ! int nAlpha = pfd.cAlphaBits; if (hw_accel && supportsGL) return true; --- 772,777 ---- bool hw_accel =(!(flags & PFD_GENERIC_FORMAT) && !(flags & PFD_GENERIC_ACCELERATED)); bool supportsGL = (flags & PFD_SUPPORT_OPENGL) != 0; ! // bool doubleBuffer = (flags & PFD_DOUBLEBUFFER) != 0; ! // int nAlpha = pfd.cAlphaBits; if (hw_accel && supportsGL) return true; *************** *** 800,804 **** bool hw_accel =(!(flags & PFD_GENERIC_FORMAT) && !(flags & PFD_GENERIC_ACCELERATED)); bool supportsGL = (flags & PFD_SUPPORT_OPENGL) != 0; ! bool doubleBuffer = (flags & PFD_DOUBLEBUFFER) != 0; int nAlpha = pfd.cAlphaBits; --- 804,808 ---- bool hw_accel =(!(flags & PFD_GENERIC_FORMAT) && !(flags & PFD_GENERIC_ACCELERATED)); bool supportsGL = (flags & PFD_SUPPORT_OPENGL) != 0; ! // bool doubleBuffer = (flags & PFD_DOUBLEBUFFER) != 0; int nAlpha = pfd.cAlphaBits; Index: ObjectUpdater.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/ObjectUpdater.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ObjectUpdater.cpp 4 Jun 2004 21:39:22 -0000 1.8 --- ObjectUpdater.cpp 14 Sep 2004 02:01:46 -0000 1.9 *************** *** 104,112 **** model->SetDistanceFromCamera(distanceFromCamera); ! if ((distanceFromCamera <= 20)&&(gameObject->parent == 0)) { int xx = 8; } /* if ((abs(x) < 4000)&&(gameObject->parent == 0)) --- 104,113 ---- model->SetDistanceFromCamera(distanceFromCamera); ! /* if ((distanceFromCamera <= 20)&&(gameObject->parent == 0)) { int xx = 8; } + */ /* if ((abs(x) < 4000)&&(gameObject->parent == 0)) --- NEW FILE: tc3DWindow.cpp --- /** ** @file tc3DWindow.cpp: implementation of the tc3DWindow class. */ /* Copyright (C) 2004 Dewitt Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA [...1032 lines suppressed...] CreateBackgroundQuad(); LoadBackgroundImage("console_b.jpg"); SetBackgroundDraw(true); LEFT_BASE_LINE = osgText::Text::LEFT_BASE_LINE; CENTER_CENTER = osgText::Text::CENTER_CENTER; } tc3DWindow::~tc3DWindow() { #ifdef _DEBUG fprintf(stdout, "Destroying 3D window %s, %d text obj, %d image quad obj" ", line obj %d\n", wxWindow::GetName().c_str(), textPool.size(), imageQuadPool.size(), linePool.size()); #endif } Index: tcWindow.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcWindow.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcWindow.cpp 8 Aug 2004 00:31:34 -0000 1.7 --- tcWindow.cpp 14 Sep 2004 02:01:46 -0000 1.8 *************** *** 225,228 **** --- 225,241 ---- } + /** + * Converts relative coordinates to screen coordinates + */ + wxRealPoint tcWindow::RelativeToScreen(float x, float y) + { + wxRealPoint p; + + p.x = x * float(mnWidth); + p.y = (1-y) * float(mnHeight); + + return p; + } + bool tcWindow::ReleaseDrawDC(HDC hdc) { |
|
From: Dewitt C. <ddc...@us...> - 2004-09-14 02:01:54
|
Update of /cvsroot/gcblue/gcb_wx/src/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14891/src/database Modified Files: tcBallisticDBObject.cpp tcDatabase.cpp Log Message: Index: tcBallisticDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcBallisticDBObject.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcBallisticDBObject.cpp 12 Aug 2004 01:14:28 -0000 1.4 --- tcBallisticDBObject.cpp 14 Sep 2004 02:01:46 -0000 1.5 *************** *** 147,151 **** wxASSERT(node); ! TiXmlElement* localNode = node->InsertEndChild(TiXmlElement("sensor"))->ToElement(); //localNode->SetAttribute("maxRange_km" ,mfMaxRange_km); --- 147,152 ---- wxASSERT(node); ! //TiXmlElement* localNode = ! node->InsertEndChild(TiXmlElement("sensor"))->ToElement(); //localNode->SetAttribute("maxRange_km" ,mfMaxRange_km); Index: tcDatabase.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcDatabase.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** tcDatabase.cpp 9 Aug 2004 02:35:15 -0000 1.15 --- tcDatabase.cpp 14 Sep 2004 02:01:46 -0000 1.16 *************** *** 291,301 **** } ! int tcDatabase::Serialize(tcFile& file, bool mbLoad) { ! tnPoolIndex nMapSize, nKey, nPoolPos; ! tcDatabaseObject *pdbobj; ! tcGenericDBObject *pgeneric; ! tcLauncherDBObject *plauncher; ! tcMissileDBObject *pmissile; ! tcRadarDBObject *pradar; UINT nClassID; int nResult; --- 291,304 ---- } ! int tcDatabase::Serialize(tcFile& file, bool mbLoad) ! { ! long nMapSize = 0; ! long nKey = -1; ! long nPoolPos = -1; ! tcDatabaseObject *pdbobj = 0; ! tcGenericDBObject *pgeneric = 0; ! tcLauncherDBObject *plauncher = 0; ! tcMissileDBObject *pmissile = 0; ! tcRadarDBObject *pradar = 0; UINT nClassID; int nResult; *************** *** 907,910 **** --- 910,915 ---- /** * @return random database entry matching model type + * + * TODO fix this to guarantee return of object matching model type if one exists */ tcDatabaseObject* tcDatabase::GetRandomOfType(UINT model_type) *************** *** 915,919 **** tcDatabaseObject *pdata; ! while ((bSearching)&&(nTries++ < 128)) { tnPoolIndex nKey = GetRandomKey(); --- 920,924 ---- tcDatabaseObject *pdata; ! while ((bSearching)&&(nTries++ < 256)) { tnPoolIndex nKey = GetRandomKey(); *************** *** 1140,1144 **** tnPoolIndex nMapSize, nKey, nPoolPos; tcDatabaseObject *pdbobj; - int bFound = 0; nMapSize = mcObjectData.GetCount(); --- 1145,1148 ---- |
|
From: Dewitt C. <ddc...@us...> - 2004-09-06 01:08:16
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11943/src/sim Modified Files: Game.cpp tc3DViewer.cpp tcGameObject.cpp tcGoalTracker.cpp tcMapView.cpp tcPlatformObject.cpp tcSimState.cpp Log Message: Index: tcSimState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSimState.cpp,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** tcSimState.cpp 5 Sep 2004 02:38:45 -0000 1.52 --- tcSimState.cpp 6 Sep 2004 01:08:04 -0000 1.53 *************** *** 1894,1904 **** } /********************************************************************/ ! unsigned tcSimState::GetAlliancePlatforms(tnPoolIndex *aaKeyList, unsigned anMaxLength, int anAlliance) { tcGameObject *pGameObj; ! tnPoolIndex cmappos = maPlatformState.GetStartPosition(); ! tnPoolIndex nSize = maPlatformState.GetCount(); ! tnPoolIndex nKey; ! tnPoolIndex nListIndex=0; for (int i=0;(i<nSize)&&(nListIndex<(int)anMaxLength);i++) --- 1894,1904 ---- } /********************************************************************/ ! unsigned tcSimState::GetAlliancePlatforms(long *aaKeyList, unsigned anMaxLength, int anAlliance) { tcGameObject *pGameObj; ! long cmappos = maPlatformState.GetStartPosition(); ! long nSize = maPlatformState.GetCount(); ! long nKey; ! long nListIndex=0; for (int i=0;(i<nSize)&&(nListIndex<(int)anMaxLength);i++) Index: tcGameObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcGameObject.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** tcGameObject.cpp 9 Aug 2004 02:35:16 -0000 1.20 --- tcGameObject.cpp 6 Sep 2004 01:08:04 -0000 1.21 *************** *** 151,154 **** --- 151,170 ---- } + /** + * Uses 3D model for size info (diameter of bounding sphere) + * @return largest dimension of object in meters or 0 if no model available + */ + float tcGameObject::GetSpan() + { + if (model) + { + return 2.0f*model->GetRadius(); + } + else + { + return 0; + } + } + tsGeoPoint tcGameObject::RelPosToLatLonAlt(const tsRelativePosition& rel_pos) const { Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** Game.cpp 5 Sep 2004 02:38:45 -0000 1.93 --- Game.cpp 6 Sep 2004 01:08:03 -0000 1.94 *************** *** 1,5 **** ! /** @file Game.cpp main application class ! ** ! ** Copyright (C) 2003-2004 Dewitt Colclough (de...@tw...) ** All rights reserved. ** --- 1,6 ---- ! /** ! ** @file Game.cpp main application class ! */ ! /* Copyright (C) 2003-2004 Dewitt Colclough (de...@tw...) ** All rights reserved. ** *************** *** 80,83 **** --- 81,85 ---- EVT_COMMAND(ID_SCENARIOSELECTVIEW, wxEVT_COMMAND_BUTTON_CLICKED , tcGame::SwitchToScenarioSelect) EVT_COMMAND(ID_MULTIPLAYERVIEW, wxEVT_COMMAND_BUTTON_CLICKED , tcGame::SwitchToNetwork) + EVT_COMMAND(ID_ENDGAME, wxEVT_COMMAND_BUTTON_CLICKED , tcGame::EndGame) EVT_COMMAND(ID_STARTGAME, wxEVT_COMMAND_BUTTON_CLICKED , tcGame::StartGame) EVT_COMMAND(ID_NEWHOOK, wxEVT_COMMAND_BUTTON_CLICKED, tcGame::NewHook) *************** *** 177,181 **** int nAlliances = 2; char buff[256]; ! for (int idx=0; idx < nAlliances; idx++) { --- 179,183 ---- int nAlliances = 2; char buff[256]; ! for (int idx=0; idx < nAlliances; idx++) { *************** *** 184,195 **** if (goalTracker->HasAllianceFailed(alliance)) { ! sprintf(buff, "Alliance %d LOST\n", alliance); ! infoConsole->Print(buff); } if (goalTracker->HasAllianceSucceeded(alliance)) { ! sprintf(buff, "Alliance %d WON\n", alliance); ! infoConsole->Print(buff); } } --- 186,207 ---- if (goalTracker->HasAllianceFailed(alliance)) { ! if (goalTracker->HasStatusChanged(alliance)) ! { ! sprintf(buff, "Alliance %d LOST\n", alliance); ! infoConsole->Print(buff); ! if (mcUserInfo.IsOwnAlliance(alliance)) DisplayOutcomeDialog(false); ! } } if (goalTracker->HasAllianceSucceeded(alliance)) { ! if (goalTracker->HasStatusChanged(alliance)) ! { ! sprintf(buff, "Alliance %d WON\n", alliance); ! infoConsole->Print(buff); ! DisplayOutcomeDialog(mcUserInfo.IsOwnAlliance(alliance)); ! } ! ! } } *************** *** 224,227 **** --- 236,272 ---- } + /** + * Displays a simple message box with won or lost message. + * Player is given the option to quit or continue. + */ + void tcGame::DisplayOutcomeDialog(bool playerWon) + { + std::stringstream outcomeMessage; + + if (playerWon) + { + outcomeMessage << "You have Won!\n"; + } + else + { + outcomeMessage << "You have Lost!\n"; + } + + goalTracker->WriteStatus(outcomeMessage, mcUserInfo.GetOwnAlliance()); + + wxMessageDialog confirmQuit(this, outcomeMessage.str().c_str(), + "Game over, quit game?", wxOK | wxCANCEL, wxDefaultPosition); + + if (confirmQuit.ShowModal() == wxID_OK) + { + wxCommandEvent command(wxEVT_COMMAND_BUTTON_CLICKED, ID_ENDGAME); + AddPendingEvent(command); + } + } + + void tcGame::EndGame(wxCommandEvent& event) + { + EndGame(); + } /** *************** *** 230,233 **** --- 275,280 ---- void tcGame::EndGame() { + if (meGameMode == GM_START) return; // ignore if game has not started + goalTracker->LogAllianceGoalStatus("log\\goal_results.txt", mcUserInfo.GetOwnAlliance()); *************** *** 251,254 **** --- 298,302 ---- simState->RandInit(); // generate new random scenario + HookRandomFriendly(); // reset time *************** *** 266,269 **** --- 314,324 ---- director->InitTest(); // load test event sequence (for random scen) + // set viewer back to object display mode + viewer->SetTerrainActive(false); + viewer->SetClearMode(1); // depth clearing + viewer->SetText(""); + + size3D = MODE3D_START; + Update3DSize(); // switch mode back to start *************** *** 294,297 **** --- 349,362 ---- scenarioSelectView->SetActive(false); + viewer->SetTerrainActive(true); + viewer->SetClearMode(2); // depth and color buffer clearing + viewer->ClearDefaultTextObjects(); + + tcString s; + s.Format("Starting scenario: %s",simState->msScenarioInfo.mzName); + ConsoleMessage(s.GetBuffer()); + + simState->PrintToFile("log\\simstate_text.txt"); + meGameMode = GM_PLAY; meScreenMode = TACTICAL; *************** *** 361,365 **** r.height = mnHeight-mnBottomMargin; } ! else // size3D = MODE3D_FULL { r.x = 0; --- 426,430 ---- r.height = mnHeight-mnBottomMargin; } ! else if (size3D == MODE3D_FULL) { r.x = 0; *************** *** 368,371 **** --- 433,441 ---- r.height = mnHeight; } + else // (size3D == MODE3D_START) + { + r = wxRect(startViewerPosition, startViewerSize); + } + viewer->Freeze(); viewer->SetSize(r); *************** *** 470,473 **** --- 540,545 ---- InitializeDirector(); pythonInterface->AttachDirector(director); + + InitSim(); } catch(std::string s) *************** *** 486,489 **** --- 558,562 ---- /* ** Miscellaneous startup * **/ simState->RandInit(); + HookRandomFriendly(); } catch(std::string s) *************** *** 533,543 **** smallViewerSize = wxSize(380, 200); ! viewer = new tc3DViewer(glCanvas, smallViewerPosition, smallViewerSize); viewer->SetActive(false); viewer->Show(FALSE); viewer->Freeze(); mb3DActive = false; ! size3D = MODE3D_SMALL; } --- 606,625 ---- smallViewerSize = wxSize(380, 200); ! startViewerSize = wxSize(mnWidth/2, mnWidth/4); ! startViewerPosition = wxPoint(mnWidth - startViewerSize.x, ! mnHeight - startViewerSize.y); ! ! ! viewer = new tc3DViewer(glCanvas, startViewerPosition, startViewerSize); viewer->SetActive(false); + viewer->SetTerrainActive(false); + viewer->SetClearMode(1); // depth clearing + viewer->SetText(""); + viewer->Show(FALSE); viewer->Freeze(); mb3DActive = false; ! size3D = MODE3D_START; } *************** *** 897,901 **** tcCustomControl::InitGdi(); ! return InitSim(); } --- 979,989 ---- tcCustomControl::InitGdi(); ! ! wxASSERT(infoConsole); ! pythonInterface->AttachConsole(infoConsole); ! mcGameView.AttachObjectControl(objectControl); ! ! ! return true; } *************** *** 928,933 **** bool tcGame::InitSim() { - tcString s; - simState->AttachMapData(&mcMapData); simState->AttachPythonInterface(pythonInterface); --- 1016,1019 ---- *************** *** 935,947 **** simState->AttachCommandInterface(&mcCommandQueue); ! s.Format("Starting scenario: %s",simState->msScenarioInfo.mzName); ! ! ConsoleMessage(s.GetBuffer()); ! ! simState->PrintToFile("log\\simstate_text.txt"); - wxASSERT(infoConsole); wxASSERT(director); - pythonInterface->AttachConsole(infoConsole); pythonInterface->AttachSensorMap(simState->mcSensorMap.GetMap(mcUserInfo.GetOwnAlliance())); pythonInterface->AttachCommandQueue(&mcCommandQueue); --- 1021,1027 ---- simState->AttachCommandInterface(&mcCommandQueue); ! wxASSERT(director); pythonInterface->AttachSensorMap(simState->mcSensorMap.GetMap(mcUserInfo.GetOwnAlliance())); pythonInterface->AttachCommandQueue(&mcCommandQueue); *************** *** 952,956 **** mcGameView.AttachUserInfo(&mcUserInfo); mcGameView.AttachOptions(tcOptions::Get()); - mcGameView.AttachObjectControl(objectControl); viewer->AttachSimState(simState); --- 1032,1035 ---- *************** *** 959,964 **** //tcSound::Get()->PlayEffect(SEFFECT_WELCOME); - HookSomethingFriendly(); - return true; } --- 1038,1041 ---- *************** *** 1007,1014 **** size3D = MODE3D_MEDIUM; } ! else // state == 3 { size3D = MODE3D_FULL; } Update3DSize(); } --- 1084,1095 ---- size3D = MODE3D_MEDIUM; } ! else if (state == 3) { size3D = MODE3D_FULL; } + else // state == 4 + { + size3D = MODE3D_START; + } Update3DSize(); } *************** *** 1246,1250 **** break; } ! viewer->SetActive(false); viewer->Update(gameDateZulu); mpGraphicsEngine->RenderAll(); --- 1327,1382 ---- break; } ! viewer->SetActive(true); ! ! viewer->SetCameraAz(viewer->GetCameraAz() + 0.02f); ! static float cameraTime = 0; ! cameraTime += 0.03f; ! viewer->SetCameraEl(0.5f * sinf(0.1f*cameraTime)); ! ! if (!viewer->TextObjectExists(0)) ! { ! viewer->AddDefaultTextObjects(); ! } ! ! long hookID = tacticalMap->GetHookID(); ! if (tcGameObject* obj = simState->GetObject(hookID)) ! { ! viewer->SetCameraRange(1.2f * obj->GetSpan()); ! wxString description; ! description = wxString::Format("%s\n%s", obj->mzClass.mz, obj->mzUnit.mz); ! ! wxString launcherDescription; ! wxString sensorDescription; ! if (tcPlatformObject* plat = dynamic_cast<tcPlatformObject*>(obj)) ! { ! launcherDescription = plat->GetLauncherDescription(); ! sensorDescription = plat->GetSensorDescription(); ! } ! else ! { ! launcherDescription = "No weapons\n"; ! sensorDescription = "No sensors\n"; ! } ! ! viewer->UpdateTextObject(2, description.c_str()); ! ! viewer->UpdateTextObject(0, launcherDescription.c_str()); ! viewer->UpdateTextObject(1, sensorDescription.c_str()); ! } ! else ! { ! HookRandomFriendly(); ! } ! ! ! ! if (cameraTime > 7) ! { ! cameraTime = 0; ! HookRandomFriendly(); ! } ! ! ! viewer->Update(gameDateZulu); mpGraphicsEngine->RenderAll(); *************** *** 1656,1667 **** * Used to avoid blank 3D screen in rand scenario */ ! void tcGame::HookSomethingFriendly() { ! long id; int ownAlliance = mcUserInfo.GetOwnAlliance(); ! simState->GetAlliancePlatforms(&id, 1, ownAlliance); ! NewHook(id); } --- 1788,1801 ---- * Used to avoid blank 3D screen in rand scenario */ ! void tcGame::HookRandomFriendly() { ! const unsigned maxPlats = 32; ! long id[maxPlats]; int ownAlliance = mcUserInfo.GetOwnAlliance(); ! unsigned count = simState->GetAlliancePlatforms(&id[0], maxPlats, ownAlliance); ! unsigned idx = rand() % count; ! NewHook(id[idx]); } *************** *** 1823,1833 **** * Updates member objects with new hook ID. * hookID = -1 is used to clear the hooked obj */ void tcGame::NewHook(long hookID) { tacticalMap->SetHookID(hookID); ! hookInfo->SetHookID(hookID); ! oobView->SetHookID(hookID); ! objectControl->SetHookID(hookID); viewer->SetHookID(hookID); --- 1957,1969 ---- * Updates member objects with new hook ID. * hookID = -1 is used to clear the hooked obj + * This was modified to check for null objects so that + * it works when called in start screen mode. */ void tcGame::NewHook(long hookID) { tacticalMap->SetHookID(hookID); ! if (hookInfo) hookInfo->SetHookID(hookID); ! if (oobView) oobView->SetHookID(hookID); ! if (objectControl) objectControl->SetHookID(hookID); viewer->SetHookID(hookID); *************** *** 2282,2300 **** } // synch button bar state to options, call when options are changed ! void tcGame::SyncButtonBars(void) { maButtonBar[1].mnCurrentButton = (mcOptions.mbUseNTDS) ? 0 : 1; } ! void tcGame::Update3DMode(void) { ! if (!mb3DActive) { tacticalMap->SetActive(true); mp3DSurface->mbActive = false; maButtonBar[2].mnCurrentButton = 2; } ! else { mp3DSurface->mbActive = true; ! if (mb3DSmall) { mrect3D = mrect3DSmall; mp3DSurface->mrectWindow = mrect3D; --- 2418,2441 ---- } // synch button bar state to options, call when options are changed ! void tcGame::SyncButtonBars() ! { maButtonBar[1].mnCurrentButton = (mcOptions.mbUseNTDS) ? 0 : 1; } ! void tcGame::Update3DMode() ! { ! if (!mb3DActive) ! { tacticalMap->SetActive(true); mp3DSurface->mbActive = false; maButtonBar[2].mnCurrentButton = 2; } ! else ! { mp3DSurface->mbActive = true; ! if (mb3DSmall) ! { mrect3D = mrect3DSmall; mp3DSurface->mrectWindow = mrect3D; *************** *** 2302,2306 **** maButtonBar[2].mnCurrentButton = 0; } ! else { mrect3D = mrectMap; mp3DSurface->mrectWindow = mrect3D; --- 2443,2448 ---- maButtonBar[2].mnCurrentButton = 0; } ! else ! { mrect3D = mrectMap; mp3DSurface->mrectWindow = mrect3D; *************** *** 2313,2318 **** ! // change virtual base class function in CommandInterface if this is changed ! void tcGame::ProcessCommand(teGameCommand aeCmd, float afData, long anData, int anData2) { static float sfData; static long snData; --- 2455,2463 ---- ! /** ! * change virtual base class function in CommandInterface if this is changed ! */ ! void tcGame::ProcessCommand(teGameCommand aeCmd, float afData, long anData, int anData2) ! { static float sfData; static long snData; Index: tcMapView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcMapView.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** tcMapView.cpp 16 Aug 2004 01:43:31 -0000 1.31 --- tcMapView.cpp 6 Sep 2004 01:08:04 -0000 1.32 *************** *** 1629,1633 **** // search for hook ! fHookDistance = mfScaleX_radppel*16.0f; // 16 pixels fMinDistance = 1e15f; nMinID = NULL_INDEX; --- 1629,1633 ---- // search for hook ! fHookDistance = mfScaleX_radppel*24.0f; // 24 pixels fMinDistance = 1e15f; nMinID = NULL_INDEX; *************** *** 1838,1842 **** bool isAltDown = event.AltDown(); ! bool noDrag = (buttonDownPoint == buttonUpPoint); if (noDrag) --- 1838,1845 ---- bool isAltDown = event.AltDown(); ! int absDistance = abs(buttonDownPoint.x - buttonUpPoint.x) + ! abs(buttonDownPoint.y - buttonUpPoint.y); ! ! bool noDrag = absDistance <= 6; if (noDrag) Index: tcPlatformObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcPlatformObject.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** tcPlatformObject.cpp 9 Aug 2004 02:35:16 -0000 1.28 --- tcPlatformObject.cpp 6 Sep 2004 01:08:04 -0000 1.29 *************** *** 284,287 **** --- 284,313 ---- /** + * @return description of launchers for display + */ + wxString tcPlatformObject::GetLauncherDescription() + { + wxString description; + + unsigned nLaunchers = mcLauncherState.GetLauncherCount(); + for (unsigned n=0; n < nLaunchers; n++) + { + tcLauncher* launcher = GetLauncher(n); + description += wxString::Format("%s, %d x %s\n", + launcher->mpLauncherDBObj->mzClass.mz, + launcher->mnCurrent, + launcher->mpChildDBObj->mzClass.mz); + } + + if (nLaunchers == 0) + { + description = "No weapons\n"; + } + + return description; + } + + + /** * */ *************** *** 300,303 **** --- 326,352 ---- /** + * @return description of sensors for display + */ + wxString tcPlatformObject::GetSensorDescription() + { + wxString description; + + unsigned nSensors = GetSensorCount(); + for (unsigned n=0; n < nSensors; n++) + { + const tcSensorState* sensor = GetSensor(n); + description += wxString::Format("%s\n", + sensor->mpDBObj->mzClass.mz); + } + + if (nSensors == 0) + { + description = "No sensors\n"; + } + + return description; + } + + /** * consider all active (mbActive) sensors */ Index: tcGoalTracker.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcGoalTracker.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcGoalTracker.cpp 5 Sep 2004 02:38:45 -0000 1.5 --- tcGoalTracker.cpp 6 Sep 2004 01:08:04 -0000 1.6 *************** *** 47,50 **** --- 47,51 ---- delete allianceGoals[i]; allianceGoals[i] = new tcGoal(); // set default goal (always unresolved) (leaks memory) + previousGoalStatus[i] = tcGoal::UNRESOLVED; } } *************** *** 96,99 **** --- 97,110 ---- /** + * @return true if goalState for alliance changed during last update + */ + bool tcGoalTracker::HasStatusChanged(int alliance) + { + tcGoal* allianceGoal = allianceGoals[alliance]; + return (allianceGoal && + (allianceGoal->goalState != previousGoalStatus[alliance])); + } + + /** * Writes goal status out to file <fileName>. This should * be called at least once at the end of the game. *************** *** 133,137 **** { tcGoal* allianceGoal = allianceGoals[i]; ! if (allianceGoal) allianceGoal->Update(); } } --- 144,152 ---- { tcGoal* allianceGoal = allianceGoals[i]; ! if (allianceGoal) ! { ! previousGoalStatus[i] = allianceGoal->goalState; ! allianceGoal->Update(); ! } } } *************** *** 162,165 **** tcGoalTracker::~tcGoalTracker() { ! Clear(); } \ No newline at end of file --- 177,188 ---- tcGoalTracker::~tcGoalTracker() { ! // should use map iterator here ! for(int i=0;i<MAX_ALLIANCES;i++) ! { ! if (allianceGoals[i]) ! { ! delete allianceGoals[i]; ! } ! } ! } \ No newline at end of file Index: tc3DViewer.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tc3DViewer.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** tc3DViewer.cpp 9 Aug 2004 02:35:16 -0000 1.34 --- tc3DViewer.cpp 6 Sep 2004 01:08:04 -0000 1.35 *************** *** 1,6 **** ! /* ! ** tc3DViewer.cpp ! ** ! ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. --- 1,6 ---- ! /** ! ** @file tc3DViewer.cpp ! */ ! /* Copyright (C) 2003-2004 Dewitt Colclough (de...@tw...) ** All rights reserved. *************** *** 39,52 **** #include <osg/MatrixTransform> #include <osg/PolygonMode> #include <osgDB/Registry> #include <osgDB/ReadFile> ! #include <osg/PositionAttitudeTransform> #include <osgUtil/CullVisitor> #include <osgUtil/SceneView> #include <osgUtil/UpdateVisitor> ! #include <osgText/Font> ! #include <osgText/Text> ! #include <osgParticle/ParticleSystem> ! #include <osgParticle/ParticleSystemUpdater> #include "ObjectUpdater.h" --- 39,54 ---- #include <osg/MatrixTransform> #include <osg/PolygonMode> + #include <osg/PositionAttitudeTransform> #include <osgDB/Registry> #include <osgDB/ReadFile> ! #include <osgParticle/ParticleSystem> ! #include <osgParticle/ParticleSystemUpdater> ! #include <osgText/Font> ! #include <osgText/Text> #include <osgUtil/CullVisitor> #include <osgUtil/SceneView> #include <osgUtil/UpdateVisitor> ! ! #include "ObjectUpdater.h" *************** *** 285,288 **** --- 287,311 ---- } + /** + * @param modeCode 0 - no clearing, 1 - depth only, 2 - depth and color buffers + */ + void tc3DViewer::SetClearMode(int modeCode) + { + osgUtil::RenderStage* stage = sceneView->getRenderStage(); + + if (modeCode == 1) + { + stage->setClearMask(GL_DEPTH_BUFFER_BIT); + } + else if (modeCode == 2) + { + stage->setClearMask(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); + } + else + { + stage->setClearMask(0); + } + } + void tc3DViewer::SetGameTime(double t) { *************** *** 313,316 **** --- 336,340 ---- } + void tc3DViewer::SetPolarOffset(float az, float el, float range) { *************** *** 322,325 **** --- 346,373 ---- /** + * @param az camera az in radians for lookat modes + */ + void tc3DViewer::SetCameraAz(float az) + { + cameraAz = az; + } + + /** + * @param el camera el in radians for lookat modes + */ + void tc3DViewer::SetCameraEl(float el) + { + cameraEl = el; + } + + /** + * @param range_m camera range in meters for lookat modes + */ + void tc3DViewer::SetCameraRange(float range_m) + { + cameraRange = range_m; + } + + /** * Set the origin (0,0) of 3D world coordinates and * update lonToGridX and gridXToLon scale factors which *************** *** 335,339 **** gridXToLon = 1/lonToGridX; ! terrainManager->SetOrigin(lon, lat); } --- 383,390 ---- gridXToLon = 1/lonToGridX; ! if (isTerrainActive) ! { ! terrainManager->SetOrigin(lon, lat); ! } } *************** *** 561,583 **** rootnode->addChild(orthoProjection.get()); ! // tcParticleEffect* ps1 = new tcParticleEffect(); ! // ps1->AddToSceneGraph(rootnode.get()); ! ! //osgParticle::ParticleSystem *ps1 = create_simple_particle_system(rootnode.get()); ! ! // Now that the particle systems and all other related objects have been ! // created, we have to add an "updater" node to the scene graph. This node ! // will react to cull traversal by updating the specified particles system. ! ! //osgParticle::ParticleSystemUpdater *psu = new osgParticle::ParticleSystemUpdater; ! //psu->addParticleSystem(ps1); ! ! // add the updater node to the scene graph ! //rootnode->addChild(psu); ! ! ! //particleSystemUpdater = new osgParticle::ParticleSystemUpdater; ! //tcParticleEffect::SetParticleSystemUpdater(particleSystemUpdater.get()); ! } --- 612,616 ---- rootnode->addChild(orthoProjection.get()); ! isTerrainActive = true; } *************** *** 911,930 **** //sceneView->setComputeNearFarMode(osgUtil::CullVisitor::COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES); ! /* ! NO_CULLING = 0x0, ! VIEW_FRUSTUM_CULLING = 0x1, ! NEAR_PLANE_CULLING = 0x2, ! FAR_PLANE_CULLING = 0x4, ! SMALL_FEATURE_CULLING = 0x8, ! SHADOW_OCCLUSION_CULLING = 0x10, ! ENABLE_ALL_CULLING ! */ ! sceneView->setCullingMode( ! osg::CullStack::NO_CULLING ! //osg::CullStack::FAR_PLANE_CULLING ! // osg::CullStack::NEAR_PLANE_CULLING ! // osg::CullStack::VIEW_FRUSTUM_CULLING ! // osg::CullStack::SMALL_FEATURE_CULLING ! ); // set up the clear mask. --- 944,963 ---- //sceneView->setComputeNearFarMode(osgUtil::CullVisitor::COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES); ! /* ! NO_CULLING = 0x0, ! VIEW_FRUSTUM_CULLING = 0x1, ! NEAR_PLANE_CULLING = 0x2, ! FAR_PLANE_CULLING = 0x4, ! SMALL_FEATURE_CULLING = 0x8, ! SHADOW_OCCLUSION_CULLING = 0x10, ! ENABLE_ALL_CULLING ! */ ! sceneView->setCullingMode( ! osg::CullStack::NO_CULLING ! // osg::CullStack::FAR_PLANE_CULLING ! // osg::CullStack::NEAR_PLANE_CULLING ! // osg::CullStack::VIEW_FRUSTUM_CULLING ! // osg::CullStack::SMALL_FEATURE_CULLING ! ); // set up the clear mask. *************** *** 1004,1007 **** --- 1037,1041 ---- viewerText->setFontResolution(32,32); viewerText->setText("TEST TEXT"); + osg::StateSet *textState = textGeode->getOrCreateStateSet(); *************** *** 1023,1026 **** --- 1057,1091 ---- } + /** + * Used to enable or disable terrain and sky + */ + void tc3DViewer::SetTerrainActive(bool state) + { + if (isTerrainActive == state) return; // ignore if state already set + + wxASSERT(terrainManager); + + osg::ref_ptr<osg::Node> terrainNode = terrainManager->GetTerrainNode().get(); + if (state) + { + rootnode->addChild(skyTransform.get()); + foggedObjects->addChild(terrainNode.get()); + foggedObjects->addChild(skyLights.get()); + // update terrain here with current origin since it isn't updated while inactive + terrainManager->SetOrigin(lonOrigin_rad, latOrigin_rad); + } + else + { + if (!rootnode->removeChild(skyTransform.get()) || + !foggedObjects->removeChild(terrainNode.get()) || + !foggedObjects->removeChild(skyLights.get())) + { + fprintf(stderr, "tc3DViewer::SetTerrainActive - " + "tried to remove non-existent child\n"); + } + } + isTerrainActive = state; + } + void tc3DViewer::SetText(const char *s) { *************** *** 1028,1031 **** --- 1093,1230 ---- } + /** + * @param positionCode: 0 - upper left, 1 - top center, 2 - bottom center + */ + void tc3DViewer::SetTextPosition(int positionCode) + { + if (!viewerText.valid()) return; + + + if (positionCode == 0) + { + viewerText->setPosition(osg::Vec3(20.0f,(float)mnHeight - 40.0f,0.0f)); + viewerText->setAlignment(osgText::Text::AlignmentType::LEFT_BASE_LINE); + } + else if (positionCode == 1) + { + viewerText->setPosition(osg::Vec3(0.5f * (float)mnWidth, + (float)mnHeight - 40.0f, 0.0f)); + viewerText->setAlignment(osgText::Text::AlignmentType::CENTER_CENTER); + } + else + { + viewerText->setPosition(osg::Vec3(0.5f * (float)mnWidth, + (float)40.0f, 0.0f)); + viewerText->setAlignment(osgText::Text::AlignmentType::CENTER_CENTER); + } + } + + void tc3DViewer::AddDefaultTextObjects() + { + osg::Vec3 upperLeft(20.0f, (float)mnHeight - 40.0f, 0.0f); + osg::Vec3 upperRight((float)mnWidth - 150.0f, (float)mnHeight - 40.0f, 0.0f); + osg::Vec3 bottomCenter(0.5 * (float)mnWidth, 40.0f, 0.0f); + osg::Vec4 color(0.4f, 0.4f, 0.8f, 0.8f); + + AddTextObject(0, upperLeft, 12.0, color, + osgText::Text::AlignmentType::LEFT_BASE_LINE); + + AddTextObject(1, upperRight, 12.0, color, + osgText::Text::AlignmentType::LEFT_BASE_LINE); + + AddTextObject(2, bottomCenter, 16.0, osg::Vec4(0.9f, 0.9f, 0.7f, 0.9f), + osgText::Text::AlignmentType::CENTER_CENTER); + } + + void tc3DViewer::ClearDefaultTextObjects() + { + ClearTextObject(0); + ClearTextObject(1); + ClearTextObject(2); + } + + void tc3DViewer::AddTextObject(int key, const osg::Vec3& pos, float fontSize, + const osg::Vec4& color, + osgText::Text::AlignmentType alignment) + { + osgText::Text* text = new osgText::Text; + osgText::Font* font = osgText::readFontFile("fonts/arial.ttf"); + + text->setFont(font); + text->setColor(color); + text->setCharacterSize(fontSize, 1.2f); // font height, aspect ratio + text->setPosition(pos); + text->setLayout(osgText::Text::LEFT_TO_RIGHT); + text->setFontResolution(32,32); + text->setText(""); + text->setAlignment(alignment); + + textGeode->addDrawable(text); + + if (TextObjectExists(key)) + { + ClearTextObject(key); + fprintf(stderr, "tc3DViewer::AddTextObject - Replacing existing text obj\n"); + } + textMap[key] = text; + } + + void tc3DViewer::ClearTextObject(int key) + { + std::map<int,osgText::Text*>::iterator iter; + + iter = textMap.find(key); + if (iter == textMap.end()) + { + fprintf(stderr, "tc3DViewer::ClearTextObject - " + "Tried to clear non-existent text obj\n"); + return; + } + textGeode->removeDrawable(iter->second); + textMap.erase(iter); + } + + /** + * Not sure if destruction is done correctly here + */ + void tc3DViewer::ClearTextObjects() + { + std::map<int,osgText::Text*>::iterator iter; + + + for (iter = textMap.begin(); iter != textMap.end(); ++iter) + { + textGeode->removeDrawable(iter->second); + } + + textMap.clear(); + } + + /** + * @return true if text object matching key exists in map + */ + bool tc3DViewer::TextObjectExists(int key) + { + std::map<int,osgText::Text*>::const_iterator iter; + + iter = textMap.find(key); + return !(iter == textMap.end()); + } + + void tc3DViewer::UpdateTextObject(int key, const std::string& text) + { + std::map<int,osgText::Text*>::iterator iter; + + iter = textMap.find(key); + if (iter == textMap.end()) + { + fprintf(stderr, "tc3DViewer::UpdateTextObject - " + "Tried to update non-existent text obj\n"); + return; + } + iter->second->setText(text.c_str()); + } + + void tc3DViewer::Swap() { *************** *** 1073,1077 **** void tc3DViewer::Update(DateZulu& dateZulu) { ! static long lastHook = hookID; if (!simState) return; --- 1272,1276 ---- void tc3DViewer::Update(DateZulu& dateZulu) { ! static long lastHook = -1; if (!simState) return; *************** *** 1150,1153 **** --- 1349,1353 ---- isMouseDown = false; isActive = true; + isTerrainActive = false; isFrozen = false; viewWireframe = false; |
|
From: Dewitt C. <ddc...@us...> - 2004-09-06 01:08:15
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11943/include/graphics Modified Files: tc3DModel.h Log Message: Index: tc3DModel.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DModel.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tc3DModel.h 8 Aug 2004 00:31:32 -0000 1.7 --- tc3DModel.h 6 Sep 2004 01:08:03 -0000 1.8 *************** *** 78,81 **** --- 78,82 ---- osg::ref_ptr<osg::Node> GetNode(); unsigned int GetNumParents(); + float GetRadius(); bool IsSmokeEnabled() const {return smokeTrail.valid();} void Load(std::string model_name); |
|
From: Dewitt C. <ddc...@us...> - 2004-09-06 01:08:15
|
Update of /cvsroot/gcblue/gcb_wx/include/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11943/include/common Modified Files: wxcommands.h Log Message: Index: wxcommands.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/wxcommands.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxcommands.h 16 Aug 2004 01:43:29 -0000 1.18 --- wxcommands.h 6 Sep 2004 01:08:02 -0000 1.19 *************** *** 38,41 **** --- 38,42 ---- ID_MULTIPLAYERVIEW = 60, ///< switch to multiplayer view ID_STARTGAME = 70, ///< start game + ID_ENDGAME = 72, ///< end game ID_NEWHOOK = 80, ///< new platform has been hooked by user ID_GROUPHOOK = 82, ///< new group of platforms has been hooked by user |
|
From: Dewitt C. <ddc...@us...> - 2004-09-06 01:08:15
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11943/include/sim Modified Files: Game.h tc3DViewer.h tcGameObject.h tcGoalTracker.h tcPlatformObject.h tcSimState.h Log Message: Index: tcGameObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcGameObject.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** tcGameObject.h 8 Aug 2004 00:31:33 -0000 1.24 --- tcGameObject.h 6 Sep 2004 01:08:03 -0000 1.25 *************** *** 147,150 **** --- 147,151 ---- virtual void GetLauncherState(tcLauncherState*& pLauncherState) {pLauncherState = NULL;} virtual tcLauncher* GetLauncher(unsigned idx) {return 0;} + float GetSpan(); float GetTerrainElevation() {return mcTerrain.mfHeight_m;} virtual void Launch(tnPoolIndex& rnKey, unsigned& rnLauncher) {} Index: tcGoalTracker.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcGoalTracker.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcGoalTracker.h 5 Sep 2004 02:38:44 -0000 1.2 --- tcGoalTracker.h 6 Sep 2004 01:08:03 -0000 1.3 *************** *** 23,26 **** --- 23,27 ---- bool HasAllianceFailed(int alliance); bool HasAllianceSucceeded(int alliance); + bool HasStatusChanged(int alliance); void LogAllianceGoalStatus(std::string fileName, int alliance); void SetAllianceGoal(int alliance, tcGoal* goal); *************** *** 33,36 **** --- 34,38 ---- double lastUpdateTime; const double updateInterval; ///< game time between updates + std::map<int, int> previousGoalStatus; ///< status at last update }; Index: tcSimState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSimState.h,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** tcSimState.h 29 Jul 2004 00:14:16 -0000 1.27 --- tcSimState.h 6 Sep 2004 01:08:03 -0000 1.28 *************** *** 132,136 **** void GenerateRandomGoals(); int GetAllSensorPlatforms(long *apKeyList, int anMaxLength); ! unsigned GetAlliancePlatforms(tnPoolIndex *aaKeyList, unsigned anMaxLength, int anAlliance); int GetAllWeaponObjects(long *apKeyList,int anMaxLength); void GetDateZulu(DateZulu& dz) {dz = dateZulu;} --- 132,136 ---- void GenerateRandomGoals(); int GetAllSensorPlatforms(long *apKeyList, int anMaxLength); ! unsigned GetAlliancePlatforms(long *aaKeyList, unsigned anMaxLength, int anAlliance); int GetAllWeaponObjects(long *apKeyList,int anMaxLength); void GetDateZulu(DateZulu& dz) {dz = dateZulu;} Index: Game.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/Game.h,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** Game.h 16 Aug 2004 01:43:30 -0000 1.44 --- Game.h 6 Sep 2004 01:08:03 -0000 1.45 *************** *** 188,192 **** MODE3D_SMALL = 0, ///< corner view MODE3D_MEDIUM = 1, ///< size of tactical map ! MODE3D_FULL = 2 ///< full screen }; enum teTacticalMapSize --- 188,193 ---- MODE3D_SMALL = 0, ///< corner view MODE3D_MEDIUM = 1, ///< size of tactical map ! MODE3D_FULL = 2, ///< full screen ! MODE3D_START = 3 ///< mode for start screen display }; enum teTacticalMapSize *************** *** 208,216 **** --- 209,221 ---- wxPoint smallViewerPosition; wxSize smallViewerSize; + wxPoint startViewerPosition; + wxSize startViewerSize; int multiplayerMode; ///< 0 - single-player, 1 - client, 2 - server void Activate(); bool DirectoryExists(char *azDirectory); + void DisplayOutcomeDialog(bool playerWon); void EndGame(); + void EndGame(wxCommandEvent& event); bool Finish(); teMenuMode GetMenuMode(); *************** *** 221,225 **** void CheckGoals(); ///< checks if any win/loss goals satisfied void ConsoleMessage(const char *s); ///< print string to info console ! void HookSomethingFriendly(); ///< used to avoid blank 3D screen in rand scenario void NewGroupHook(wxCommandEvent& event); ///< event for group of units hooked void NewHook(wxCommandEvent& event); ///< event for single unit hooked (deprecated) --- 226,230 ---- void CheckGoals(); ///< checks if any win/loss goals satisfied void ConsoleMessage(const char *s); ///< print string to info console ! void HookRandomFriendly(); ///< hooks random friendly platform void NewGroupHook(wxCommandEvent& event); ///< event for group of units hooked void NewHook(wxCommandEvent& event); ///< event for single unit hooked (deprecated) Index: tcPlatformObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcPlatformObject.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** tcPlatformObject.h 8 Aug 2004 00:31:33 -0000 1.19 --- tcPlatformObject.h 6 Sep 2004 01:08:03 -0000 1.20 *************** *** 90,93 **** --- 90,94 ---- virtual void GetDatum(tsGeoPoint& p) {p=msTargetDatum;} virtual tcLauncher* GetLauncher(unsigned idx); + wxString GetLauncherDescription(); virtual int GetLauncherQuantity(unsigned anLauncher); virtual void GetLauncherState(tcLauncherState*& pLauncherState) {pLauncherState=&mcLauncherState;} *************** *** 101,104 **** --- 102,106 ---- //virtual std::vector<tcSensorState*>* GetSensorStateArray() {return &mapSensorState;} virtual const tcSensorState* GetSensor(unsigned idx); + wxString GetSensorDescription(); virtual tcSensorState* GetSensorMutable(unsigned idx); virtual void Launch(tnPoolIndex& rnKey, unsigned& rnLauncher); Index: tc3DViewer.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tc3DViewer.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** tc3DViewer.h 9 Aug 2004 02:35:14 -0000 1.26 --- tc3DViewer.h 6 Sep 2004 01:08:03 -0000 1.27 *************** *** 40,43 **** --- 40,44 ---- class tcSimState; class tcGameObject; + class tc3DModel; class tc3DTerrain; class tc3DSky; *************** *** 67,71 **** osg::ref_ptr<osg::Group> rootnode; osg::ref_ptr<osgParticle::ParticleSystemUpdater> particleSystemUpdater; ! osgUtil::Optimizer optimizer; tc3DTerrain *terrainManager; --- 68,72 ---- osg::ref_ptr<osg::Group> rootnode; osg::ref_ptr<osgParticle::ParticleSystemUpdater> particleSystemUpdater; ! osgUtil::Optimizer optimizer; tc3DTerrain *terrainManager; *************** *** 91,97 **** --- 92,109 ---- void AttachSimState(tcSimState *ss) {simState = ss;} void SkipMouseEvent(wxMouseEvent& event); ///< adjusts position to parent frame + void AddText(osgText::Text *text); void RemoveText(osgText::Text *text); + void AddDefaultTextObjects(); + void ClearDefaultTextObjects(); + void AddTextObject(int key, const osg::Vec3& pos, float fontSize, + const osg::Vec4& color, + osgText::Text::AlignmentType alignment); + void ClearTextObject(int key); + void ClearTextObjects(); + bool TextObjectExists(int key); + void UpdateTextObject(int key, const std::string& text); + void CreateScene(); void CreateSky(); *************** *** 99,102 **** --- 111,117 ---- void Frame(); void Freeze(); + float GetCameraAz() {return cameraAz;} + float GetCameraEl() {return cameraEl;} + float GetCameraRange() {return cameraRange;} osg::Vec3 GetCameraPosition(); double GetGameTime() const {return gameTime;} *************** *** 104,109 **** --- 119,127 ---- bool IsActive() {return isActive;} void LoadModel(tcGameObject *obj); + void SetActive(bool b) {isActive = b;wxWindow::Enable(b);wxWindow::Show(b);} void SetCameraMode(bool lookAt, bool moveWith); + void SetClearMode(int modeCode); + void SetGameTime(double t); void SetGeoPosition(double lon_rad, double lat_rad, float alt_m); *************** *** 111,116 **** void SetLook(float az, float el); void SetCartesianOffset(float x, float y, float z); ! void SetPolarOffset(float az, float el, float range); void SetText(const char *s); void Swap(); void ToggleFog(); --- 129,142 ---- void SetLook(float az, float el); void SetCartesianOffset(float x, float y, float z); ! ! void SetPolarOffset(float az, float el, float range); ! ! void SetCameraAz(float az); ! void SetCameraEl(float el); ! void SetCameraRange(float range_m); ! ! void SetTerrainActive(bool state); void SetText(const char *s); + void SetTextPosition(int positionCode); void Swap(); void ToggleFog(); *************** *** 132,135 **** --- 158,163 ---- bool isFrozen; ///< set true if window has been frozen bool isActive; + bool isTerrainActive; + bool impostorModeActive; ///< true if 3D is in imposter mode bool viewWireframe; bool useRelativeChildPos; ///< true to add children as children of parent transform group *************** *** 171,174 **** --- 199,203 ---- float lookElStart; ///< camera look el start for mouse look bool isMouseDown; + std::map<int, osgText::Text*> textMap; void InitLight(); |
|
From: Dewitt C. <ddc...@us...> - 2004-09-06 01:08:15
|
Update of /cvsroot/gcblue/gcb_wx/src/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11943/src/graphics Modified Files: tc3DModel.cpp tcCreditView.cpp tcScenarioSelectView.cpp Log Message: Index: tcCreditView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcCreditView.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcCreditView.cpp 5 Sep 2004 01:02:02 -0000 1.1 --- tcCreditView.cpp 6 Sep 2004 01:08:03 -0000 1.2 *************** *** 52,58 **** AddCredit(s, 40.0f, 1); - s = "CREDITS NOT UPDATED YET FOR 0.6"; - AddCredit(s, 75.0f, 1); - s = "Dewitt Colclough"; AddCredit(s, 25.0f, 1); --- 52,55 ---- *************** *** 61,85 **** AddCredit(s, 80.0f, 0); - s = "Marcelo C\341ceres (op4_delta)"; - AddCredit(s, 25.0f, 1); s = "3D art"; - AddCredit(s, 60.0f, 0); - - s = "Marco Belli"; AddCredit(s, 25.0f, 1); ! s = "Developer - Sound, Linux port"; AddCredit(s, 60.0f, 0); ! s = "Jason Morris"; ! AddCredit(s, 25.0f, 1); - s = "Developer"; - AddCredit(s, 60.0f, 0); ! s = "Test\n"; ! AddCredit(s, 23.0f, 1); AddCredit(tcString("Marco Belli"), 12.0f, 2); AddCredit(tcString("Marcelo C\341ceres"), 12.0f, 2); --- 58,89 ---- AddCredit(s, 80.0f, 0); s = "3D art"; AddCredit(s, 25.0f, 1); ! s = "Marcelo C\341ceres (op4_delta)"; ! AddCredit(s, 25.0f, 0); ! ! s = "Guido Militello"; AddCredit(s, 60.0f, 0); ! AddCredit(tcString("Other contributors"), 23.0f, 1); ! AddCredit(tcString("Xavi Rubio (Linux)"), 12.0f, 2); ! AddCredit(tcString(""), 25.0f, 2); ! AddCredit(tcString("Test"), 23.0f, 1); ! ! AddCredit(tcString("Dust"), 12.0f, 2); ! AddCredit(tcString("Marcelo C\341ceres"), 12.0f, 2); ! AddCredit(tcString(""), 60.0f, 2); + + AddCredit(tcString("GCB 0.5 Developers"), 23.0f, 1); + AddCredit(tcString("Marco Belli"), 12.0f, 2); + AddCredit(tcString("Dewitt Colclough"), 12.0f, 2); + AddCredit(tcString("Jason Morris"), 45.0f, 2); + + AddCredit(tcString("GCB 0.5 Test"), 23.0f, 1); AddCredit(tcString("Marco Belli"), 12.0f, 2); AddCredit(tcString("Marcelo C\341ceres"), 12.0f, 2); *************** *** 145,149 **** AddCredit(s, 30.0f, 0); ! s = "To those who offered advice through e-mail and \nthe global_conflict discussion group"; AddCredit(s, 120.0f, 0); --- 149,153 ---- AddCredit(s, 30.0f, 0); ! s = "To those who provided feedback and suggestions through e-mail and \nthe GCB discussion forums"; AddCredit(s, 120.0f, 0); *************** *** 243,247 **** mpBrush->SetColor(Color(255,255,255,255)); pGraphics->FillRectangle(mpBrush,0,0,mnWidth,mnHeight); ! tcSound::Get()->PlayEffect(SEFFECT_EXPLOSION2); } if (nFlashId >= 0) --- 247,251 ---- mpBrush->SetColor(Color(255,255,255,255)); pGraphics->FillRectangle(mpBrush,0,0,mnWidth,mnHeight); ! //tcSound::Get()->PlayEffect(SEFFECT_EXPLOSION2); } if (nFlashId >= 0) Index: tc3DModel.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tc3DModel.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tc3DModel.cpp 9 Aug 2004 02:35:15 -0000 1.12 --- tc3DModel.cpp 6 Sep 2004 01:08:03 -0000 1.13 *************** *** 267,275 **** } void tc3DModel::DetachFromParent() { ! if (modelTransform->getNumParents()) { ! modelTransform->getParent(0)->removeChild(modelTransform.get()); } } --- 267,277 ---- } + void tc3DModel::DetachFromParent() { ! unsigned nParents = modelTransform->getNumParents(); ! for(unsigned n=0; n < nParents; ++n) { ! modelTransform->getParent(n)->removeChild(modelTransform.get()); } } *************** *** 312,315 **** --- 314,325 ---- } + /** + * @return radius of bounding sphere in meters + */ + float tc3DModel::GetRadius() + { + return modelNode.get()->getBound().radius(); + } + void tc3DModel::Load(std::string model_name) { Index: tcScenarioSelectView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcScenarioSelectView.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcScenarioSelectView.cpp 5 Sep 2004 01:02:02 -0000 1.1 --- tcScenarioSelectView.cpp 6 Sep 2004 01:08:03 -0000 1.2 *************** *** 483,487 **** wxASSERT(surfaceHost); ! LoadBackgroundImage("start_background.jpg"); if (config) --- 483,487 ---- wxASSERT(surfaceHost); ! LoadBackgroundImage("start_background_plain.jpg"); if (config) |
|
From: Dewitt C. <ddc...@us...> - 2004-09-05 02:38:55
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11670/src/sim Modified Files: Game.cpp tcGoal.cpp tcGoalTracker.cpp tcSimState.cpp Log Message: Index: tcSimState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSimState.cpp,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** tcSimState.cpp 9 Aug 2004 02:35:16 -0000 1.51 --- tcSimState.cpp 5 Sep 2004 02:38:45 -0000 1.52 *************** *** 1486,1490 **** catch (...) { ! throw std::string("exception in GenerateRandomGoals"); } --- 1486,1498 ---- catch (...) { ! fprintf(stderr, "First exception in GenerateRandomGoals, trying again\n"); ! try ! { ! GenerateRandomGoals(); ! } ! catch (...) ! { ! throw std::string("exception in GenerateRandomGoals"); ! } } *************** *** 1842,1845 **** --- 1850,1854 ---- GetAlliancePlatforms(&key,1,1); obj = GetObject(key); + wxASSERT(obj); goalTracker->SetAllianceGoal(2, new tcDestroyGoal(obj->mzUnit.mz)); fprintf(stdout,"Added destroy goal for alliance %d: %s\n",2,obj->mzUnit.mz); *************** *** 1847,1850 **** --- 1856,1860 ---- GetAlliancePlatforms(&key,1,2); obj = GetObject(key); + wxASSERT(obj); goalTracker->SetAllianceGoal(1, new tcDestroyGoal(obj->mzUnit.mz)); fprintf(stdout,"Added destroy goal for alliance %d: %s\n",1,obj->mzUnit.mz); Index: tcGoal.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcGoal.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcGoal.cpp 8 Aug 2004 00:31:35 -0000 1.4 --- tcGoal.cpp 5 Sep 2004 02:38:45 -0000 1.5 *************** *** 81,84 **** --- 81,104 ---- /*** tcGoal ***/ + /** + * @return goalState as a string + */ + std::string tcGoal::GoalStateToString(int goalState) + { + if (goalState == UNRESOLVED) + { + return std::string("UNRESOLVED"); + } + else if (goalState == FAILED) + { + return std::string("FAILED"); + } + else + { + return std::string("PASSED"); + } + + } + tcGoal* tcGoal::Clone() { *************** *** 95,98 **** --- 115,126 ---- } + /** + * Writes status summary of goal condition to file + */ + void tcGoal::WriteStatus(std::stringstream& stream) + { + stream << "* Generic goal" << GoalStateToString(goalState) << "\n"; + } + tcGoal::tcGoal() { *************** *** 159,162 **** --- 187,229 ---- } } + void tcCompoundGoal::WriteStatus(std::stringstream& stream) + { + std::string typeString; + + if (logicType == AND) + { + typeString = "ALL"; + } + else + { + typeString = "ANY"; + } + + stream << "* Compound Goal -- " + "Mission to achieve " << typeString << " of these subgoals "; + + if (goalState == PASSED) + { + stream << "ACCOMPLISHED:\n"; + } + else if (goalState == FAILED) + { + stream << "FAILED:\n"; + } + else + { + stream << "NOT ACCOMPLISHED:\n"; + } + + + size_t nChildren = children.size(); + + for (size_t n=0; n<nChildren; n++) + { + stream << " "; + tcGoal* childGoal = children.at(n); + childGoal->WriteStatus(stream); + } + } tcCompoundGoal::tcCompoundGoal(int type) *************** *** 212,215 **** --- 279,306 ---- } + void tcTimeGoal::WriteStatus(std::stringstream& stream) + { + if (simState->GetTime() >= passTimeout) + { + stream << "* Time Goal -- " + "Orders were satisfied for specified time, goal SUCCESS\n"; + } + else if (simState->GetTime() >= failTimeout) + { + stream << "* Time Goal -- " + "The mission time limit was exceeded, goal FAILED\n"; + } + else if (failTimeout < passTimeout) + { + stream << "* Time Goal -- " + "Time limit not exceeded, goal UNRESOLVED\n"; + } + else + { + stream << "* Time Goal -- " + "Time goal not satisfied, goal NOT ACHIEVED\n"; + } + } + tcTimeGoal::tcTimeGoal() { *************** *** 248,251 **** --- 339,344 ---- tnPoolIndex key; bool unitFound = false; + + // inefficient linear search for now for(unsigned i=0;(i<nSize)&&(!unitFound);i++) { *************** *** 261,264 **** --- 354,372 ---- } + void tcDestroyGoal::WriteStatus(std::stringstream& stream) + { + stream << "* Destroy Goal -- Platform " << targetString; + + if (goalState == PASSED) + { + stream << " was DESTROYED.\n"; + } + else + { + stream << " NOT DESTROYED.\n"; + } + } + + tcDestroyGoal::tcDestroyGoal(const tcDestroyGoal& goal) : tcGoal(goal) Index: tcGoalTracker.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcGoalTracker.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcGoalTracker.cpp 8 Aug 2004 00:31:35 -0000 1.4 --- tcGoalTracker.cpp 5 Sep 2004 02:38:45 -0000 1.5 *************** *** 29,32 **** --- 29,34 ---- #include "tcGoalTracker.h" #include "tcGoal.h" + #include <sstream> + #include <fstream> #ifdef _DEBUG *************** *** 93,96 **** --- 95,118 ---- } + /** + * Writes goal status out to file <fileName>. This should + * be called at least once at the end of the game. + */ + void tcGoalTracker::LogAllianceGoalStatus(std::string fileName, int alliance) + { + std::stringstream statusStream; + + WriteStatus(statusStream, alliance); + + + std::ofstream logFile; + + logFile.open(fileName.c_str()); + + logFile << statusStream.str(); + + logFile.close(); + } + void tcGoalTracker::SetAllianceGoal(int alliance, tcGoal* goal) { *************** *** 115,118 **** --- 137,152 ---- } + void tcGoalTracker::WriteStatus(std::stringstream& stream, int alliance) + { + if (tcGoal* allianceGoal = allianceGoals[alliance]) + { + allianceGoal->WriteStatus(stream); + } + else + { + fprintf(stderr, "tcGoalTracker::WriteStatus - null alliance goal\n"); + } + } + tcGoalTracker::tcGoalTracker() : updateInterval(9.01) Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** Game.cpp 5 Sep 2004 01:02:03 -0000 1.92 --- Game.cpp 5 Sep 2004 02:38:45 -0000 1.93 *************** *** 230,233 **** --- 230,236 ---- void tcGame::EndGame() { + goalTracker->LogAllianceGoalStatus("log\\goal_results.txt", + mcUserInfo.GetOwnAlliance()); + // hide all game windows briefingConsoleLeft->SetActive(false); *************** *** 1762,1765 **** --- 1765,1770 ---- } + + /** * Update member objects with new hook ID. |
|
From: Dewitt C. <ddc...@us...> - 2004-09-05 02:38:53
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11670/include/sim Modified Files: tcGoal.h tcGoalTracker.h Log Message: Index: tcGoal.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcGoal.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcGoal.h 17 Aug 2004 02:22:56 -0000 1.3 --- tcGoal.h 5 Sep 2004 02:38:44 -0000 1.4 *************** *** 56,63 **** --- 56,66 ---- static void AttachSimState(tcSimState *ss) {simState = ss;} + + std::string GoalStateToString(int goalState); bool IsFailed() {return goalState == FAILED;} bool IsPassed() {return goalState == PASSED;} bool IsUnresolved() {return goalState == UNRESOLVED;} virtual void Update(); ///< updates goal state using on simState + virtual void WriteStatus(std::stringstream& stream); virtual tcGoal* Clone(); *************** *** 85,88 **** --- 88,92 ---- void SetLogic(int logic) {logicType = logic;} virtual void Update(); ///< updates goal state using on simState + virtual void WriteStatus(std::stringstream& stream); virtual tcGoal* Clone(); *************** *** 104,107 **** --- 108,112 ---- void SetPassTimeout(double t) {passTimeout = t;} virtual void Update(); ///< updates goal state using on simState + virtual void WriteStatus(std::stringstream& stream); virtual tcGoal* Clone(); *************** *** 120,123 **** --- 125,129 ---- virtual void Update(); + virtual void WriteStatus(std::stringstream& stream); virtual tcGoal* Clone(); Index: tcGoalTracker.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcGoalTracker.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcGoalTracker.h 11 Nov 2003 02:08:33 -0000 1.1 --- tcGoalTracker.h 5 Sep 2004 02:38:44 -0000 1.2 *************** *** 23,28 **** --- 23,31 ---- bool HasAllianceFailed(int alliance); bool HasAllianceSucceeded(int alliance); + void LogAllianceGoalStatus(std::string fileName, int alliance); void SetAllianceGoal(int alliance, tcGoal* goal); void Update(double currentTime); + void WriteStatus(std::stringstream& stream, int alliance); + tcGoalTracker(); ~tcGoalTracker(); |
|
From: Dewitt C. <ddc...@us...> - 2004-09-05 01:02:46
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28730/include/graphics Modified Files: tcDisplaySettingsView.h Added Files: tcCreditView.h tcNetworkView.h tcPanel.h tcPopupControl.h tcScenarioSelectView.h tcStartView.h tcXmlWindow.h Removed Files: tcStandardWindow.h Log Message: --- NEW FILE: tcPanel.h --- /* ** tcPanel.h ** ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _TCPANEL_H_ #define _TCPANEL_H_ #if _MSC_VER > 1000 #pragma once #endif #include "wx/wx.h" #include "wx/msw/private.h" // for MS Windows specific definitions #include <string> #include <vector> #include "gdiplus.h" struct tsItemData { std::string caption; std::string command; std::string userInput; int cmd; bool isSelected; bool isBold; Gdiplus::RectF rect; void Clear() { caption="";command="";userInput=""; cmd = 0;isSelected=0;isBold=0; } }; // 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, float x, float y, float width, float height, int param = -1); void AddItem(std::string caption, int cmd, float x, float y, float width, float height); void AddItemUI(std::string caption, std::string callback, std::string input, 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 }; #endif --- NEW FILE: tcXmlWindow.h --- /** @file tcXmlWindow.h */ /* ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _STANDARDWINDOW_H_ #define _STANDARDWINDOW_H_ #if _MSC_VER > 1000 #pragma once #endif #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 "tcWindow.h" #include "tcSound.h" class TiXmlDocument; /** * tcWindow with Gdiplus drawing objects and sound */ class tcXmlWindow : public tcWindow { public: tcXmlWindow(wxWindow *parent, const wxPoint& pos, const wxSize& size, const wxString& configFile = "", const wxString& name = "StandardWindow", tcWindow *surfaceHost = NULL); virtual ~tcXmlWindow(); protected: TiXmlDocument* config; ///< XML auto-configuration file for window static Gdiplus::SolidBrush* mpBrush; static Gdiplus::Font* font20; static Gdiplus::Font* font16; static Gdiplus::Font* font12; static Gdiplus::Font* font10; static Gdiplus::Font* font8; static Gdiplus::Pen* mpPen; 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() }; #endif Index: tcDisplaySettingsView.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcDisplaySettingsView.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcDisplaySettingsView.h 14 Jun 2004 21:52:55 -0000 1.1 --- tcDisplaySettingsView.h 5 Sep 2004 01:02:00 -0000 1.2 *************** *** 34,38 **** #include "tcOptions.h" ! #include "tcStandardWindow.h" #include "tcSound.h" --- 34,38 ---- #include "tcOptions.h" ! #include "tcXmlWindow.h" #include "tcSound.h" *************** *** 40,44 **** * Display settings GUI */ ! class tcDisplaySettingsView : public tcStandardWindow { public: --- 40,44 ---- * Display settings GUI */ ! class tcDisplaySettingsView : public tcXmlWindow { public: --- NEW FILE: tcStartView.h --- /* ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _STARTVIEW_H_ #define _STARTVIEW_H_ #if _MSC_VER > 1000 #pragma once #endif #include "wx/wx.h" #ifdef WIN32 #include "wx/msw/private.h" // for MS Windows specific definitions #endif #include "tcwindow.h" #include "aerror.h" #include "tcString.h" class tcOptions; class tcStartView : public tcWindow { public: // placement info for GUI buttons, text, etc. struct tsButtonInfo { tcString mzCaption; int mnButtonX; int mnButtonY; int mnTextX; int mnTextY; int mnButtonWidth; int mnButtonHeight; Gdiplus::Image *mpiButtonOn; Gdiplus::Image *mpiButtonOver; Gdiplus::Image *mpiButtonOff; int mnState; }; public: int mnActiveButton; bool mbPlayEnabled; // TODO create better implementation of this later void AttachOptions(tcOptions *apOptions) {mpOptions=apOptions;} bool Init(void); int Draw(void); void DrawButton(Gdiplus::Graphics *apGraphics, int anButton); void DrawButtonLine(Gdiplus::Graphics *apGraphics, int anButton); int GetActiveButton(void) {return mnActiveButton;} void OnLButtonDown(wxMouseEvent& event); void OnMouseMove(wxMouseEvent& event); void PlaceButtons(void); bool ButtonContainingPoint(wxPoint point, int& rnButton); tcStartView(wxWindow *parent, const wxPoint& pos, const wxSize& size, const wxString& name = "StartView"); virtual ~tcStartView(); private: enum {N_START_BUTTONS = 6}; tcOptions *mpOptions; Gdiplus::SolidBrush *mpBrush; Gdiplus::Font *mpFont; Gdiplus::Pen *mpPen; tsButtonInfo maButton[N_START_BUTTONS]; int mnXStart,mnYStart; }; #endif --- NEW FILE: tcPopupControl.h --- /** ** @file tcPopupControl.h */ /* Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _POPUPCONTROL_H_ #define _POPUPCONTROL_H_ #if _MSC_VER > 1000 #pragma once #endif #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" namespace ScriptInterface { class tcSimPythonInterface; } using namespace ScriptInterface; enum teMenuMode { MENUMODE_GAME, MENUMODE_PLATFORM, MENUMODE_GROUP, MENUMODE_TRACK, MENUMODE_GAMEEDIT, MENUMODE_PLATFORMEDIT, MENUMODE_FLIGHTPANEL }; class tcPopupControl : public tcWindow { public: tcCommandQueue *mpCommandInterface; tcSimPythonInterface *mpPythonInterface; teMenuMode meMode; void AttachCommandInterface(tcCommandQueue *apCommandInterface) {mpCommandInterface=apCommandInterface;} void AttachPythonInterface(tcSimPythonInterface *apIF) {mpPythonInterface = apIF;} void SetMenu(teMenuMode mode); void SetMenu(); ///< this shouldn't be an override? bool Track(wxPoint point); void OnLButtonDown(wxMouseEvent& event); void OnMouseMove(wxMouseEvent& event); int Draw(); void UpdateRegions(); void InitMenu(); tcPopupControl(wxWindow *parent, const wxPoint& pos, const wxSize& size, const wxString& name = "PopupControl"); virtual ~tcPopupControl(); private: tcMenu mcGameMenu; tcMenu mcGameEditMenu; tcMenu mcPlatformMenu; tcMenu mcPlatformEditMenu; tcMenu mcTrackMenu; // menu for (non-alliance) sensor tracks tcPanel mcPanel; tcMenu *mpMenu; // current menu tcPanel *mpPanel; // current panel (may have more than one panel in future) wxPoint mpointUpperLeft; // upperleft coords of menu wxRect mrectMenuExtent; Gdiplus::Pen *mpPen; Gdiplus::SolidBrush *mpBrush; Gdiplus::Font *mpFont; WCHAR mzwchar[255]; // wide char array for string buffer bool mbShowDebug; bool mbRebuildMenu; // set true to rebuild menu before draw wxPoint mpointMouse; }; #endif --- NEW FILE: tcScenarioSelectView.h --- /* ** @file tcScenarioSelectView.h */ /* Copyright (C) 2003-2004 Dewitt Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _SCENARIOSELECTVIEW_H_ #define _SCENARIOSELECTVIEW_H_ #if _MSC_VER > 1000 #pragma once #endif #include "wx/wx.h" #include "wx/dir.h" #ifdef WIN32 #include "wx/msw/private.h" // for MS Windows specific definitions #endif #include "tcXmlWindow.h" #include "tcSound.h" #include "tcSimState.h" // to load scenario #include "aerror.h" #include "tcString.h" #ifndef SCENARIO_PATH #define SCENARIO_PATH "scenarios" #endif /** * TODO: this class along with StartView class should be derived from a more * general button interface or user interface class */ class tcScenarioSelectView : public tcXmlWindow { struct scenarioInfo { std::string path; ///< path after SCENARIO_PATH including filename std::string caption; ///< dir name or filename without the .py extension std::vector<scenarioInfo> children; bool showChildren; ///< for directories struct { float x; float y; float width; float height; } drawBox; ///< location to draw to screen enum {OFF = 0, OVER = 1, ON = 2} drawState; }; /** * Directory traverser to build scenario tree */ class wxScenarioTraverser : public wxDirTraverser { public: wxScenarioTraverser(std::vector<scenarioInfo>& sInfo); wxDirTraverseResult OnFile(const wxString& filename); wxDirTraverseResult OnDir(const wxString& WXUNUSED(dirname)); private: std::vector<scenarioInfo>& info; }; public: bool Init(); int Draw(); void OnLButtonDown(wxMouseEvent& event); void OnMouseMove(wxMouseEvent& event); tcScenarioSelectView(wxWindow *parent, tcWindow *surfaceHost, const wxPoint& pos, const wxSize& size, const wxString& name = "ScenarioSelectView"); virtual ~tcScenarioSelectView(); private: const float xIndent; const float xStart; const float xWidth; const float yHeight; ///< vertical spacing between scen items const float yHeightDir; ///< vertical spacing between directory and next item const float yStart; const wxRealPoint basePosition; wxPoint mousePosition; tcOptions *mpOptions; Gdiplus::Image* directoryIcon; Gdiplus::Image* scenarioIcon; std::string loadedScenarioCaption; int mnButtonWidth; int mnButtonHeight; std::vector<scenarioInfo> scenInfo; tcSimState *mpSimState; void BuildScenarioInfo(); void DrawScenarioDirectory(std::vector<scenarioInfo>& info, Gdiplus::Graphics* graphics); wxArrayString GetListOfScenarioFiles(); void LoadScenario(std::string filePath, std::string caption); void LogScenarioInfo(std::vector<scenarioInfo>& info, int level); bool ProcessMouseClick(std::vector<scenarioInfo>& info, wxPoint pos); void UpdateDrawInfo(std::vector<scenarioInfo>& info, wxRealPoint& currentPos); }; #endif --- NEW FILE: tcCreditView.h --- /* ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _CREDITVIEW_H_ #define _CREDITVIEW_H_ #if _MSC_VER > 1000 #pragma once #endif #include "wx/wx.h" #ifdef WIN32 #include "wx/msw/private.h" //for MS Windows specific definitions #endif #include "tcwindow.h" #include "tcSound.h" #include "aerror.h" #include "tcString.h" /** * View window to display scrolling credits */ class tcCreditView : public tcWindow { struct tsCreditInfo { tcString mzCaption; float mfTrailSpace; int mnEffect; ///< 0 - standard text, 1 - bold, 2 - small }; public: void AddCredit(tcString& s, float afTrailSpace, int effect); bool Init(); int Draw(); void OnLButtonDown(wxMouseEvent& event); void Rewind(); tcCreditView(wxWindow *parent, const wxPoint& pos, const wxSize& size, const wxString& name = "CreditView", tcWindow *sharedSurface = NULL); virtual ~tcCreditView(void); private: enum {MAX_CREDITS = 96}; Gdiplus::SolidBrush *mpBrush; Gdiplus::Font *mpFont; Gdiplus::Font *mpFontLarge; Gdiplus::Font *mpFontSmall; Gdiplus::Pen *mpPen; UINT32 mnStartTime; // 30 Hz counter to mark start of sequence int mnXStart,mnYStart; tcString crawlstring; tsCreditInfo maCredit[MAX_CREDITS]; unsigned mnCredits; bool mbDrawRewind; // flag to reset Draw() method }; #endif --- tcStandardWindow.h DELETED --- --- NEW FILE: tcNetworkView.h --- /** @file tcNetworkView.h */ /* ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. ** This file is part of the Global Conflict Blue (GCB) program. ** GCB is free software; you can redistribute it and/or modify ** it under the terms of version 2 of the GNU General Public License as ** published by the Free Software Foundation. ** GCB is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** You should have received a copy of the GNU General Public License ** along with GCB; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _NETWORKVIEW_H_ #define _NETWORKVIEW_H_ #if _MSC_VER > 1000 #pragma once #endif #include "wx/wx.h" #ifdef WIN32 #include "wx/msw/private.h" //for MS Windows specific definitions #endif #include "tcXmlWindow.h" class tcEditBox; class tcConsoleBox; /** * User interface window for multiplayer and network * setup and test. * Called a "view" even though this class has data and more * included to be consistent with other view classes. */ class tcNetworkView : public tcXmlWindow { public: int Draw(); void DrawStatusBox(Gdiplus::Graphics *graphics); void OnConnect(wxCommandEvent& event); void OnLButtonDown(wxMouseEvent& event); void SendChatText(wxCommandEvent& event); void SendTest(wxCommandEvent& event); void SetChatProtocol(wxCommandEvent& event); void SetIPText(wxCommandEvent& event); void SetNetworkMode(wxCommandEvent& event); tcNetworkView(wxWindow *parent, tcWindow *surfaceHost, const wxPoint& pos, const wxSize& size, const wxString& name = "NetworkView"); virtual ~tcNetworkView(); private: std::string ipText; int networkMode; tcEditBox *ipEdit; tcConsoleBox *chatBox; tcEditBox *chatEntry; wxRect statusBoxBounds; DECLARE_EVENT_TABLE() }; #endif |
|
From: Dewitt C. <ddc...@us...> - 2004-09-05 01:02:46
|
Update of /cvsroot/gcblue/gcb_wx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28730 Modified Files: GCblue.vcproj Log Message: Index: GCblue.vcproj =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/GCblue.vcproj,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** GCblue.vcproj 1 Sep 2004 02:55:33 -0000 1.65 --- GCblue.vcproj 5 Sep 2004 01:01:59 -0000 1.66 *************** *** 261,264 **** --- 261,267 ---- </File> <File + RelativePath=".\src\graphics\tcCreditView.cpp"> + </File> + <File RelativePath=".\src\graphics\tcDisplayModes.cpp"> </File> *************** *** 279,289 **** </File> <File RelativePath=".\src\graphics\tcParticleEffect.cpp"> </File> <File RelativePath="src\graphics\tcRadioButton.cpp"> </File> <File ! RelativePath="src\graphics\tcStandardWindow.cpp"> </File> <File --- 282,304 ---- </File> <File + RelativePath=".\src\graphics\tcNetworkView.cpp"> + </File> + <File + RelativePath=".\src\graphics\tcPanel.cpp"> + </File> + <File RelativePath=".\src\graphics\tcParticleEffect.cpp"> </File> <File + RelativePath=".\src\graphics\tcPopupControl.cpp"> + </File> + <File RelativePath="src\graphics\tcRadioButton.cpp"> </File> <File ! RelativePath=".\src\graphics\tcScenarioSelectView.cpp"> ! </File> ! <File ! RelativePath=".\src\graphics\tcStartView.cpp"> </File> <File *************** *** 293,296 **** --- 308,314 ---- RelativePath=".\src\graphics\tcWindow.cpp"> </File> + <File + RelativePath=".\src\graphics\tcXmlWindow.cpp"> + </File> </Filter> <Filter *************** *** 368,374 **** </File> <File - RelativePath="src\sim\tcCreditView.cpp"> - </File> - <File RelativePath="src\sim\tcCustomControl.cpp"> </File> --- 386,389 ---- *************** *** 443,449 **** </File> <File - RelativePath="src\sim\tcNetworkView.cpp"> - </File> - <File RelativePath="src\sim\tcObjectControl.cpp"> </File> --- 458,461 ---- *************** *** 452,470 **** </File> <File - RelativePath="src\sim\tcPanel.cpp"> - </File> - <File RelativePath="src\sim\tcPlatformObject.cpp"> </File> <File - RelativePath="src\sim\tcPopupControl.cpp"> - </File> - <File RelativePath="src\sim\tcRadar.cpp"> </File> <File - RelativePath="src\sim\tcScenarioSelectView.cpp"> - </File> - <File RelativePath="src\sim\tcSensorMap.cpp"> </File> --- 464,473 ---- *************** *** 476,482 **** </File> <File - RelativePath="src\sim\tcStartView.cpp"> - </File> - <File RelativePath="src\sim\tcSurfaceObject.cpp"> </File> --- 479,482 ---- *************** *** 1101,1104 **** --- 1101,1107 ---- </File> <File + RelativePath=".\include\graphics\tcCreditView.h"> + </File> + <File RelativePath=".\include\graphics\tcDisplayModes.h"> </File> *************** *** 1119,1122 **** --- 1122,1131 ---- </File> <File + RelativePath=".\include\graphics\tcNetworkView.h"> + </File> + <File + RelativePath=".\include\graphics\tcPanel.h"> + </File> + <File RelativePath=".\include\graphics\tcParticleEffect.h"> </File> *************** *** 1125,1132 **** </File> <File RelativePath="include\graphics\tcRadioButton.h"> </File> <File ! RelativePath="include\graphics\tcStandardWindow.h"> </File> <File --- 1134,1147 ---- </File> <File + RelativePath=".\include\graphics\tcPopupControl.h"> + </File> + <File RelativePath="include\graphics\tcRadioButton.h"> </File> <File ! RelativePath=".\include\graphics\tcScenarioSelectView.h"> ! </File> ! <File ! RelativePath=".\include\graphics\tcStartView.h"> </File> <File *************** *** 1136,1139 **** --- 1151,1157 ---- RelativePath=".\include\graphics\tcWindow.h"> </File> + <File + RelativePath=".\include\graphics\tcXmlWindow.h"> + </File> </Filter> <Filter *************** *** 1211,1217 **** </File> <File - RelativePath="include\sim\tcCreditView.h"> - </File> - <File RelativePath="include\sim\tcCustomControl.h"> </File> --- 1229,1232 ---- *************** *** 1286,1292 **** </File> <File - RelativePath="include\sim\tcNetworkView.h"> - </File> - <File RelativePath="include\sim\tcObjectControl.h"> </File> --- 1301,1304 ---- *************** *** 1295,1301 **** </File> <File - RelativePath="include\sim\tcPanel.h"> - </File> - <File RelativePath="include\sim\tcPlatformObject.h"> </File> --- 1307,1310 ---- *************** *** 1304,1316 **** </File> <File - RelativePath="include\sim\tcPopupControl.h"> - </File> - <File RelativePath="include\sim\tcRadar.h"> </File> <File - RelativePath="include\sim\tcScenarioSelectView.h"> - </File> - <File RelativePath="include\sim\tcSensorMap.h"> </File> --- 1313,1319 ---- *************** *** 1322,1328 **** </File> <File - RelativePath="include\sim\tcStartView.h"> - </File> - <File RelativePath="include\sim\tcSurfaceObject.h"> </File> --- 1325,1328 ---- |
|
From: Dewitt C. <ddc...@us...> - 2004-09-05 01:02:45
|
Update of /cvsroot/gcblue/gcb_wx/include/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28730/include/common Modified Files: tcOptionsView.h Log Message: Index: tcOptionsView.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/tcOptionsView.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcOptionsView.h 14 Jun 2004 22:37:11 -0000 1.8 --- tcOptionsView.h 5 Sep 2004 01:02:00 -0000 1.9 *************** *** 31,40 **** #endif #include "tcOptions.h" ! #include "tcStandardWindow.h" #include "tcSound.h" // View and GUI for user options data ! class tcOptionsView : public tcStandardWindow { // placement info for GUI buttons, text, etc. --- 31,40 ---- #endif #include "tcOptions.h" ! #include "tcXmlWindow.h" #include "tcSound.h" // View and GUI for user options data ! class tcOptionsView : public tcXmlWindow { // placement info for GUI buttons, text, etc. |
|
From: Dewitt C. <ddc...@us...> - 2004-09-05 01:02:45
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28730/include/sim Modified Files: tcChatBox.h Log Message: Index: tcChatBox.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcChatBox.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcChatBox.h 17 Aug 2004 02:22:56 -0000 1.2 --- tcChatBox.h 5 Sep 2004 01:02:01 -0000 1.3 *************** *** 31,35 **** #endif ! #include "tcStandardWindow.h" --- 31,35 ---- #endif ! #include "tcXmlWindow.h" *************** *** 41,45 **** * is a small popup window used from within the game. */ ! class tcChatBox : public tcStandardWindow { public: --- 41,45 ---- * is a small popup window used from within the game. */ ! class tcChatBox : public tcXmlWindow { public: |
|
From: Dewitt C. <ddc...@us...> - 2004-09-05 01:02:20
|
Update of /cvsroot/gcblue/gcb_wx/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28730/xml Modified Files: displaysettings_gui.xml network_view.xml options_view.xml Log Message: Index: network_view.xml =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/xml/network_view.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** network_view.xml 14 Jun 2004 22:37:12 -0000 1.4 --- network_view.xml 5 Sep 2004 01:02:04 -0000 1.5 *************** *** 1,4 **** <Window> ! <Button X="30" Y="50" Width="65" Height="15" Caption="Start" Command="10"/> <Button X="100" Y="50" Width="65" Height="15" Caption="Credits" Command="20"/> <Button X="170" Y="50" Width="65" Height="15" Caption="Database" Command="30"/> --- 1,4 ---- <Window> ! <Button X="30" Y="50" Width="65" Height="15" Caption="Main" Command="10"/> <Button X="100" Y="50" Width="65" Height="15" Caption="Credits" Command="20"/> <Button X="170" Y="50" Width="65" Height="15" Caption="Database" Command="30"/> Index: options_view.xml =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/xml/options_view.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** options_view.xml 14 Jun 2004 22:38:21 -0000 1.1 --- options_view.xml 5 Sep 2004 01:02:04 -0000 1.2 *************** *** 1,4 **** <Window> ! <Button X="30" Y="65" Width="65" Height="15" Caption="Start" Command="10"/> <Button X="100" Y="65" Width="65" Height="15" Caption="Credits" Command="20"/> <Button X="170" Y="65" Width="65" Height="15" Caption="Database" Command="30"/> --- 1,4 ---- <Window> ! <Button X="30" Y="65" Width="65" Height="15" Caption="Main" Command="10"/> <Button X="100" Y="65" Width="65" Height="15" Caption="Credits" Command="20"/> <Button X="170" Y="65" Width="65" Height="15" Caption="Database" Command="30"/> Index: displaysettings_gui.xml =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/xml/displaysettings_gui.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** displaysettings_gui.xml 14 Jun 2004 21:52:55 -0000 1.1 --- displaysettings_gui.xml 5 Sep 2004 01:02:04 -0000 1.2 *************** *** 1,7 **** <Window> ! <Button X="30" Y="50" Width="65" Height="15" Caption="Start" Command="10"/> ! <Button X="100" Y="50" Width="65" Height="15" Caption="Credits" Command="20"/> ! <Button X="170" Y="50" Width="65" Height="15" Caption="Database" Command="30"/> ! <Button X="240" Y="50" Width="65" Height="15" Caption="Options" Command="40"/> ! <Button X="310" Y="50" Width="65" Height="15" Caption="Scenarios" Command="50"/> </Window> \ No newline at end of file --- 1,7 ---- <Window> ! <Button X="30" Y="30" Width="65" Height="15" Caption="Main" Command="10"/> ! <Button X="100" Y="30" Width="65" Height="15" Caption="Credits" Command="20"/> ! <Button X="170" Y="30" Width="65" Height="15" Caption="Database" Command="30"/> ! <Button X="240" Y="30" Width="65" Height="15" Caption="Options" Command="40"/> ! <Button X="310" Y="30" Width="65" Height="15" Caption="Scenarios" Command="50"/> </Window> \ No newline at end of file |
|
From: Dewitt C. <ddc...@us...> - 2004-09-05 01:02:19
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28730/src/sim Modified Files: Game.cpp tcChatBox.cpp Log Message: Index: tcChatBox.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcChatBox.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcChatBox.cpp 8 Aug 2004 00:31:35 -0000 1.2 --- tcChatBox.cpp 5 Sep 2004 01:02:03 -0000 1.3 *************** *** 39,43 **** using namespace Gdiplus; ! BEGIN_EVENT_TABLE(tcChatBox, tcStandardWindow) EVT_COMMAND(1, wxEVT_COMMAND_TEXT_UPDATED, tcChatBox::SendChatText) END_EVENT_TABLE() --- 39,43 ---- using namespace Gdiplus; ! BEGIN_EVENT_TABLE(tcChatBox, tcXmlWindow) EVT_COMMAND(1, wxEVT_COMMAND_TEXT_UPDATED, tcChatBox::SendChatText) END_EVENT_TABLE() *************** *** 128,132 **** const wxPoint& pos, const wxSize& size, const wxString& name, const wxString& configFile) ! : tcStandardWindow(parent, pos, size, configFile, name, surfaceHost) { --- 128,132 ---- const wxPoint& pos, const wxSize& size, const wxString& name, const wxString& configFile) ! : tcXmlWindow(parent, pos, size, configFile, name, surfaceHost) { Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -d -r1.91 -r1.92 *** Game.cpp 17 Aug 2004 02:22:56 -0000 1.91 --- Game.cpp 5 Sep 2004 01:02:03 -0000 1.92 *************** *** 46,50 **** #include "cspDate.h" #include "tcDirector.h" ! #include "tcStandardWindow.h" #include "tcNetworkView.h" #include "tcDisplaySettingsView.h" --- 46,50 ---- #include "cspDate.h" #include "tcDirector.h" ! #include "tcXmlWindow.h" #include "tcNetworkView.h" #include "tcDisplaySettingsView.h" *************** *** 706,714 **** { wxASSERT(startView); - scenarioSelectView = new tcScenarioSelectView(glCanvas, - wxPoint(0,0), frameSize, "ScenarioSelect", startView); ! scenarioSelectView->AttachSimState(simState); ! scenarioSelectView->LoadBackgroundImage("start_background.jpg"); if (scenarioSelectView->Init() == false) --- 706,712 ---- { wxASSERT(startView); ! scenarioSelectView = ! new tcScenarioSelectView(glCanvas, startView, wxPoint(0,0), frameSize); if (scenarioSelectView->Init() == false) |