gcblue-commits Mailing List for Global Conflict Blue (Page 57)
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: Xavi <xr...@us...> - 2004-04-11 22:01:07
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3298 Modified Files: tc3DModel.h Log Message: + added ifdef MSV for #pragma once instruction + newline at the end of file Index: tc3DModel.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DModel.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tc3DModel.h 18 Jan 2004 18:42:41 -0000 1.4 --- tc3DModel.h 11 Apr 2004 21:47:23 -0000 1.5 *************** *** 22,26 **** --- 22,28 ---- #define _TC3DMODEL_H_ + #if _MSC_VER > 1000 #pragma once + #endif #include <osg/ref_ptr> *************** *** 86,89 **** }; - #endif \ No newline at end of file --- 88,91 ---- }; + #endif |
|
From: Xavi <xr...@us...> - 2004-04-11 21:59:24
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2979 Modified Files: tcWindow.h Log Message: + added ifdef MSV where needed Index: tcWindow.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcWindow.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcWindow.h 4 Apr 2004 21:21:54 -0000 1.1 --- tcWindow.h 11 Apr 2004 21:45:39 -0000 1.2 *************** *** 20,24 **** */ ! #if !defined _TCWINDOW_H_ #define _TCWINDOW_H_ --- 20,24 ---- */ ! #ifndef _TCWINDOW_H_ #define _TCWINDOW_H_ *************** *** 27,32 **** #endif // _MSC_VER > 1000 ! #include "wx/wx.h" #include "wx/msw/private.h" // for MS Windows specific definitions #include "gdiplus.h" #include <vector> --- 27,36 ---- #endif // _MSC_VER > 1000 ! #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 "gdiplus.h" #include <vector> *************** *** 156,160 **** }; - #endif --- 160,163 ---- |
|
From: Xavi <xr...@us...> - 2004-04-11 21:55:44
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2267 Modified Files: tcFIFO.h Log Message: + added ifdef MSV for #pragma once instruction Index: tcFIFO.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcFIFO.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcFIFO.h 19 Oct 2003 17:46:01 -0000 1.2 --- tcFIFO.h 11 Apr 2004 21:42:02 -0000 1.3 *************** *** 18,28 **** */ ! #if !defined _TCFIFO_H_ #define _TCFIFO_H_ #pragma once ! #include "wx/wx.h" #include "wx/msw/private.h" // for MS Windows specific definitions // FIFO for resource management, up to 64k elements (UINT16 id's) --- 18,36 ---- */ ! #ifndef _TCFIFO_H_ #define _TCFIFO_H_ + #if _MSC_VER > 1000 #pragma once + #endif // _MSC_VER > 1000 ! #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 "gctypes.h" // FIFO for resource management, up to 64k elements (UINT16 id's) *************** *** 142,143 **** --- 150,152 ---- #endif + |
|
From: Xavi <xr...@us...> - 2004-04-11 21:51:37
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1658 Modified Files: tc2DGraphicsSurface.h Log Message: + added ifdef MSV for #pragma once instruction + corrected includes where path was set in windows-style (GL\glu.h) for standard path (GL/glu.h) Index: tc2DGraphicsSurface.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc2DGraphicsSurface.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tc2DGraphicsSurface.h 20 Mar 2004 18:46:46 -0000 1.8 --- tc2DGraphicsSurface.h 11 Apr 2004 21:37:55 -0000 1.9 *************** *** 18,21 **** --- 18,23 ---- ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + #ifndef _TC2DGRAPHICSSURFACE_H_ + #define _TC2DGRAPHICSSURFACE_H_ #ifdef WIN32 *************** *** 23,41 **** #endif ! #ifndef _TC2DGRAPHICSSURFACE_H_ ! #define _TC2DGRAPHICSSURFACE_H_ ! ! ! ! #include "wx/wx.h" #include "wx/msw/private.h" // for MS Windows specific definitions #include <gdiplus.h> ! #include <GL\gl.h> // Header file for the OpenGL32 library ! #include <GL\glu.h> // Header file for the GLu32 library ! #include <GL\glaux.h> // Header file for the GLaux library ! ! #define DEFAULT_TEXTURE_SIZE 256 --- 25,40 ---- #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 <gdiplus.h> ! #include <GL/gl.h> // Header file for the OpenGL32 library ! #include <GL/glu.h> // Header file for the GLu32 library ! #include <GL/glaux.h> // Header file for the GLaux library #define DEFAULT_TEXTURE_SIZE 256 |
|
From: Xavi <xr...@us...> - 2004-04-11 21:42:21
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32139 Modified Files: tcEditBox.h Log Message: + added ifdef MSV for #pragma once instruction + newline at the end of file Index: tcEditBox.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcEditBox.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcEditBox.h 24 Mar 2004 21:09:26 -0000 1.3 --- tcEditBox.h 11 Apr 2004 21:28:37 -0000 1.4 *************** *** 22,26 **** --- 22,28 ---- #define _EDITBOX_H_ + #if _MSC_VER > 1000 #pragma once + #endif #include "tcWindow.h" *************** *** 73,74 **** --- 75,77 ---- #endif + |
|
From: Xavi <xr...@us...> - 2004-04-11 21:38:40
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31431 Modified Files: tcTerrainTextureFactory.h Log Message: + destructor made virtual (because the class has virtual methods, so it is mandatory). + newline at the end of file Index: tcTerrainTextureFactory.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcTerrainTextureFactory.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcTerrainTextureFactory.h 26 Nov 2003 20:39:14 -0000 1.1 --- tcTerrainTextureFactory.h 11 Apr 2004 21:24:57 -0000 1.2 *************** *** 20,30 **** */ - #ifdef WIN32 - #pragma once - #endif #ifndef _TERRAINTEXTUREFACTORY_H_ #define _TERRAINTEXTUREFACTORY_H_ #include <osg/Image> #include <Demeter/Terrain.h> --- 20,31 ---- */ #ifndef _TERRAINTEXTUREFACTORY_H_ #define _TERRAINTEXTUREFACTORY_H_ + #ifdef WIN32 + #pragma once + #endif + #include <osg/Image> #include <Demeter/Terrain.h> *************** *** 38,42 **** void BuildTextures(); ///< rebuilds procedural textures, called when origin changes tcTerrainTextureFactory(Demeter::Terrain* pTerrain, tc3DTerrain *tm, int griddimension); ! ~tcTerrainTextureFactory(); virtual Demeter::Texture* GetTexture(int index,float originX,float originY,float width,float height); virtual void UnloadTexture(int index); --- 39,43 ---- void BuildTextures(); ///< rebuilds procedural textures, called when origin changes tcTerrainTextureFactory(Demeter::Terrain* pTerrain, tc3DTerrain *tm, int griddimension); ! virtual ~tcTerrainTextureFactory(); virtual Demeter::Texture* GetTexture(int index,float originX,float originY,float width,float height); virtual void UnloadTexture(int index); *************** *** 74,76 **** }; ! #endif \ No newline at end of file --- 75,78 ---- }; ! #endif ! |
|
From: Xavi <xr...@us...> - 2004-04-11 21:36:32
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31025 Modified Files: tcButtonConsole.h tcStandardWindow.h Log Message: + added ifdef MSV for #pragma once instruction + newline at the end of file Index: tcButtonConsole.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcButtonConsole.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcButtonConsole.h 3 Jan 2004 00:45:12 -0000 1.1 --- tcButtonConsole.h 11 Apr 2004 21:22:50 -0000 1.2 *************** *** 24,31 **** --- 24,37 ---- #define _BUTTONCONSOLE_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 "tcSoundConsole.h" #include <vector> *************** *** 54,56 **** }; ! #endif --- 60,63 ---- }; ! #endif ! Index: tcStandardWindow.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcStandardWindow.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcStandardWindow.h 24 Mar 2004 21:09:26 -0000 1.7 --- tcStandardWindow.h 11 Apr 2004 21:22:50 -0000 1.8 *************** *** 22,31 **** #define _STANDARDWINDOW_H_ #pragma once #include "wx/wx.h" #ifdef WIN32 ! #include "wx/msw/private.h" //for MS Windows specific definitions ! #endif #include "tcWindow.h" --- 22,35 ---- #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" *************** *** 64,66 **** }; ! #endif \ No newline at end of file --- 68,71 ---- }; ! #endif ! |
|
From: Xavi <xr...@us...> - 2004-04-11 21:32:27
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30275 Modified Files: tcConsoleBox.h Log Message: + added ifdef MSV for #pragma once instruction + newline at the end of file + removed comma at the end of enum Index: tcConsoleBox.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcConsoleBox.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcConsoleBox.h 24 Mar 2004 21:09:26 -0000 1.2 --- tcConsoleBox.h 11 Apr 2004 21:18:45 -0000 1.3 *************** *** 23,27 **** --- 23,29 ---- #define _CONSOLEBOX_H_ + #if _MSC_VER > 1000 #pragma once + #endif #include "wx/wx.h" *************** *** 44,48 **** { REMOVE_LINES = 64, ! MAX_LINES = 256, }; wxArrayString textArray; --- 46,50 ---- { REMOVE_LINES = 64, ! MAX_LINES = 256 }; wxArrayString textArray; *************** *** 86,87 **** --- 88,90 ---- #endif + |
|
From: Xavi <xr...@us...> - 2004-04-11 21:31:10
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30054 Modified Files: tcButton.h Log Message: + added ifdef MSV for #pragma once instruction + newline at the end of file Index: tcButton.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcButton.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcButton.h 24 Mar 2004 21:09:26 -0000 1.6 --- tcButton.h 11 Apr 2004 21:17:27 -0000 1.7 *************** *** 25,29 **** --- 25,31 ---- #define _TCBUTTON_H_ + #if _MSC_VER > 1000 #pragma once + #endif #include "tcWindow.h" *************** *** 86,91 **** }; - - - #endif \ No newline at end of file --- 88,91 ---- }; + #endif |
|
From: Xavi <xr...@us...> - 2004-04-11 21:27:51
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29368 Modified Files: tcRadioButton.h Log Message: + added ifdef MSV for #pragma once instruction + newline at the end of file + removed unnecessary name of class in a method declaration Index: tcRadioButton.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcRadioButton.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcRadioButton.h 24 Mar 2004 21:09:26 -0000 1.2 --- tcRadioButton.h 11 Apr 2004 21:14:07 -0000 1.3 *************** *** 23,27 **** --- 23,29 ---- #define _TCRADIOBUTTON_H_ + #if _MSC_VER > 1000 #pragma once + #endif #include "tcWindow.h" *************** *** 65,69 **** virtual void CleanupGdi(); virtual void InitGdi(); ! virtual void tcRadioButton::OnButtonCommand(wxCommandEvent& event); virtual void OnEnterWindow(wxMouseEvent& event); virtual void OnLButtonDown(wxMouseEvent& event); --- 67,71 ---- virtual void CleanupGdi(); virtual void InitGdi(); ! virtual void OnButtonCommand(wxCommandEvent& event); virtual void OnEnterWindow(wxMouseEvent& event); virtual void OnLButtonDown(wxMouseEvent& event); *************** *** 74,79 **** }; - - - #endif \ No newline at end of file --- 76,79 ---- }; + #endif |
|
From: Xavi <xr...@us...> - 2004-04-11 21:26:42
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29117 Modified Files: tc3DTerrain.h Log Message: + newline at the end of file Index: tc3DTerrain.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DTerrain.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tc3DTerrain.h 18 Feb 2004 18:53:55 -0000 1.8 --- tc3DTerrain.h 11 Apr 2004 21:13:00 -0000 1.9 *************** *** 89,92 **** }; - #endif \ No newline at end of file --- 89,92 ---- }; + #endif |
|
From: Xavi <xr...@us...> - 2004-04-11 21:24:39
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28742 Modified Files: tcMapObject.h Log Message: + added ifdef MSV for #pragma once instruction + newline at the end of file Index: tcMapObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcMapObject.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcMapObject.h 22 Dec 2003 02:32:37 -0000 1.2 --- tcMapObject.h 11 Apr 2004 21:10:57 -0000 1.3 *************** *** 24,31 **** #define _TCMAPOBJECT_H_ #pragma once ! #include "wx/wx.h" #include "wx/msw/private.h" // for MS Windows specific definitions #include "simmath.h" --- 24,38 ---- #define _TCMAPOBJECT_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 "simmath.h" *************** *** 86,88 **** }; ! #endif \ No newline at end of file --- 93,96 ---- }; ! #endif ! |
|
From: Xavi <xr...@us...> - 2004-04-11 21:23:37
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28493 Modified Files: ObjectUpdater.h Log Message: + modified the way #ifdef are defined (trivial change) Index: ObjectUpdater.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/ObjectUpdater.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ObjectUpdater.h 14 Jan 2004 01:13:21 -0000 1.5 --- ObjectUpdater.h 11 Apr 2004 21:09:52 -0000 1.6 *************** *** 1,4 **** ! #if !defined _OBJECTUPDATER_H_ ! #define _OBJECTUPDATER_H_ #include <osg/NodeCallback> --- 1,5 ---- ! ! #ifndef __ObjectUpdater_h__ ! #define __ObjectUpdater_h__ #include <osg/NodeCallback> *************** *** 35,38 **** }; ! #endif --- 36,39 ---- }; ! #endif // __ObjectUpdater_h__ |
|
From: Xavi <xr...@us...> - 2004-04-11 21:19:11
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27603 Modified Files: tc3DSky.h Log Message: + newline at the end of file Index: tc3DSky.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DSky.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tc3DSky.h 30 Nov 2003 23:30:55 -0000 1.1 --- tc3DSky.h 11 Apr 2004 21:05:28 -0000 1.2 *************** *** 47,49 **** }; ! #endif \ No newline at end of file --- 47,50 ---- }; ! #endif ! |
|
From: Xavi <xr...@us...> - 2004-04-09 14:31:02
|
Update of /cvsroot/gcblue/gcb_wx/src/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32375 Modified Files: tcDatabase.cpp tcFlightportDBObject.cpp tcGenericDBObject.cpp Log Message: + changed #include "aerror.h" to "AError.h" + added #ifdef MSVC where needed Index: tcFlightportDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcFlightportDBObject.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcFlightportDBObject.cpp 28 Mar 2004 23:12:28 -0000 1.2 --- tcFlightportDBObject.cpp 9 Apr 2004 14:17:42 -0000 1.3 *************** *** 20,24 **** --- 20,26 ---- #include "stdwx.h" + #if _MSC_VER > 1000 #pragma warning(disable:4786) // suppress warning for STL bug in VC6, see Q167355 in the MSDN Library. + #endif #include "tcFlightportDBObject.h" *************** *** 240,242 **** } ! } \ No newline at end of file --- 242,244 ---- } ! } Index: tcGenericDBObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcGenericDBObject.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcGenericDBObject.cpp 30 Mar 2004 01:15:21 -0000 1.7 --- tcGenericDBObject.cpp 9 Apr 2004 14:17:42 -0000 1.8 *************** *** 20,24 **** --- 20,26 ---- #include "stdwx.h" + #if _MSC_VER > 1000 #pragma warning(disable:4786) // suppress warning for STL bug in VC6, see Q167355 in the MSDN Library. + #endif #include "tcGenericDBObject.h" *************** *** 473,475 **** } ! } \ No newline at end of file --- 475,477 ---- } ! } Index: tcDatabase.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcDatabase.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcDatabase.cpp 28 Mar 2004 23:12:28 -0000 1.9 --- tcDatabase.cpp 9 Apr 2004 14:17:42 -0000 1.10 *************** *** 23,32 **** #pragma warning(disable:4786) // suppress warning for STL bug in VC6, see Q167355 in the MSDN Library. #include "tcDatabase.h" #include "math_constants.h" #include "randfn.h" ! #include "aerror.h" #include <iostream> #include <fstream> --- 23,35 ---- + #if _MSC_VER > 1000 #pragma warning(disable:4786) // suppress warning for STL bug in VC6, see Q167355 in the MSDN Library. + #endif + #include "tcDatabase.h" #include "math_constants.h" #include "randfn.h" ! #include "AError.h" #include <iostream> #include <fstream> |
|
From: Xavi <xr...@us...> - 2004-04-09 14:28:43
|
Update of /cvsroot/gcblue/gcb_wx/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31695 Modified Files: tcConsole.cpp tcSound.cpp Log Message: + changed #include "aerror.h" to "AError.h" Index: tcConsole.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcConsole.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcConsole.cpp 21 Mar 2004 21:03:25 -0000 1.7 --- tcConsole.cpp 9 Apr 2004 14:15:18 -0000 1.8 *************** *** 22,30 **** #include "stdwx.h" - #ifndef WX_PRECOMP - #endif - #include "tcConsole.h" ! #include "aerror.h" #include <stdio.h> --- 22,27 ---- #include "stdwx.h" #include "tcConsole.h" ! #include "AError.h" #include <stdio.h> Index: tcSound.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcSound.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tcSound.cpp 6 Mar 2004 20:52:29 -0000 1.14 --- tcSound.cpp 9 Apr 2004 14:15:18 -0000 1.15 *************** *** 32,36 **** #include <stdlib.h> #include <stdio.h> ! #include <string.h> #ifdef _DEBUG --- 32,36 ---- #include <stdlib.h> #include <stdio.h> ! #include <string> #ifdef _DEBUG |
|
From: Xavi <xr...@us...> - 2004-04-09 14:22:36
|
Update of /cvsroot/gcblue/gcb_wx/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29896 Modified Files: tcOptionsView.cpp Log Message: + changed #include "aerror.h" to "AError.h" Index: tcOptionsView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/tcOptionsView.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcOptionsView.cpp 20 Mar 2004 18:46:46 -0000 1.5 --- tcOptionsView.cpp 9 Apr 2004 14:09:15 -0000 1.6 *************** *** 22,30 **** #include "stdwx.h" - #ifndef WX_PRECOMP - #endif - #include "tcOptionsView.h" ! #include "aerror.h" #include "tcString.h" #include "wxcommands.h" --- 22,27 ---- #include "stdwx.h" #include "tcOptionsView.h" ! #include "AError.h" #include "tcString.h" #include "wxcommands.h" |
|
From: Xavi <xr...@us...> - 2004-04-09 14:12:04
|
Update of /cvsroot/gcblue/gcb_wx/include/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27938 Modified Files: tcOptionsView.h Log Message: + changed #include "tcwindow.h" to "tcWindow.h" Index: tcOptionsView.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/tcOptionsView.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcOptionsView.h 9 Apr 2004 13:49:40 -0000 1.6 --- tcOptionsView.h 9 Apr 2004 13:58:44 -0000 1.7 *************** *** 31,35 **** #endif #include "tcOptions.h" ! #include "tcwindow.h" #include "tcSound.h" --- 31,35 ---- #endif #include "tcOptions.h" ! #include "tcWindow.h" #include "tcSound.h" |
|
From: Xavi <xr...@us...> - 2004-04-09 14:03:00
|
Update of /cvsroot/gcblue/gcb_wx/include/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26011 Modified Files: tcButtonBar.h tcConsole.h tcOptionsView.h Log Message: + added ifdef MSV for #pragma once instruction + newline at the end of file Index: tcButtonBar.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/tcButtonBar.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcButtonBar.h 27 Sep 2003 23:22:24 -0000 1.1 --- tcButtonBar.h 9 Apr 2004 13:49:40 -0000 1.2 *************** *** 19,24 **** ! #if !defined(AFX_TCBUTTONBAR_H__4A4C1CC1_652B_4304_B78E_BC364E6998A5__INCLUDED_) ! #define AFX_TCBUTTONBAR_H__4A4C1CC1_652B_4304_B78E_BC364E6998A5__INCLUDED_ #if _MSC_VER > 1000 --- 19,24 ---- ! #ifndef __tcButtonBar_h__ ! #define __tcButtonBar_h__ #if _MSC_VER > 1000 *************** *** 31,34 **** --- 31,35 ---- #include <string> #include "gdiplus.h" + using namespace Gdiplus; *************** *** 77,79 **** }; ! #endif // !defined(AFX_TCBUTTONBAR_H__4A4C1CC1_652B_4304_B78E_BC364E6998A5__INCLUDED_) --- 78,81 ---- }; ! #endif // __tcButtonBar_h__ ! Index: tcOptionsView.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/tcOptionsView.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcOptionsView.h 20 Mar 2004 18:46:45 -0000 1.5 --- tcOptionsView.h 9 Apr 2004 13:49:40 -0000 1.6 *************** *** 22,26 **** --- 22,28 ---- #define _OPTIONSVIEW_H_ + #if _MSC_VER > 1000 #pragma once + #endif #include "wx/wx.h" *************** *** 71,73 **** }; ! #endif // !defined(AFX_TCOPTIONVIEW_H__7458FB25_23DB_41E7_84C7_A58F9F165E05__INCLUDED_) --- 73,76 ---- }; ! #endif // _OPTIONSVIEW_H_ ! Index: tcConsole.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/tcConsole.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcConsole.h 21 Mar 2004 21:03:25 -0000 1.7 --- tcConsole.h 9 Apr 2004 13:49:40 -0000 1.8 *************** *** 24,28 **** --- 24,30 ---- #define _CONSOLE_H_ + #if _MSC_VER > 1000 #pragma once + #endif #include "wx/wx.h" *************** *** 78,80 **** }; ! #endif --- 80,83 ---- }; ! #endif // _CONSOLE_H_ ! |
|
From: Dewitt C. <ddc...@us...> - 2004-04-09 03:21:29
|
Update of /cvsroot/gcblue/gcb_wx/src/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12869/src/sim Modified Files: Game.cpp tcGameObjIterator.cpp tcGameObject.cpp tcNetworkView.cpp tcSimState.cpp Log Message: multiplayer related changes Index: tcSimState.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcSimState.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** tcSimState.cpp 7 Apr 2004 00:41:08 -0000 1.37 --- tcSimState.cpp 9 Apr 2004 03:08:09 -0000 1.38 *************** *** 294,305 **** } } ! UpdateWeaponHits(); ! UpdateLandings(mfSimTime); ! RemoveDestroyedObjects(); UpdateLaunch(); ! mcSensorMap.Update(mfSimTime); ! UpdateSensors(); ! UpdateObjFormations(mfSimTime); ! UpdateObjEngagements(mfSimTime); // FC engagement list and auto launch if ((mfSimTime-mfLastTileAgeOut) > 25.4f) { --- 294,313 ---- } } ! ! if (multiplayerMode != MM_CLIENT) ! { ! UpdateWeaponHits(); ! UpdateLandings(mfSimTime); ! RemoveDestroyedObjects(); ! } UpdateLaunch(); ! ! if (multiplayerMode != MM_CLIENT) ! { ! mcSensorMap.Update(mfSimTime); ! UpdateSensors(); ! UpdateObjFormations(mfSimTime); ! UpdateObjEngagements(mfSimTime); // FC engagement list and auto launch ! } if ((mfSimTime-mfLastTileAgeOut) > 25.4f) { *************** *** 307,312 **** mpMapData->AgeOutTiles(mfSimTime); } ! UpdateAI(mfSimTime); ! goalTracker->Update(mfSimTime); #ifdef _DEBUG --- 315,324 ---- mpMapData->AgeOutTiles(mfSimTime); } ! ! if (multiplayerMode != MM_CLIENT) ! { ! UpdateAI(mfSimTime); ! goalTracker->Update(mfSimTime); ! } #ifdef _DEBUG *************** *** 1504,1507 **** --- 1516,1524 ---- pplat->mcKin.mfLat_rad*C_180OVERPI, pplat->mcKin.mfLon_rad*C_180OVERPI); file.WriteString(buff); + + std::stringstream test; + pplat->SaveToStream(test); + pplat->LoadFromStream(test); + idx++; } *************** *** 1839,1842 **** --- 1856,1894 ---- } + /** + * Sets multiplayer mode to MM_OFF, the default single-player state. + * Loads random scenario for the play button default. + */ + void tcSimState::SetMultiplayerOff() + { + multiplayerMode = MM_OFF; + RandInit(); + } + + /** + * Sets multiplayer mode to MM_CLIENT. In client mode sim state only + * performs updates necessary to predict game state in between server + * updates to reduce apparent lag. The real work is done on the server. + * Client updates are for visual smoothness only. + * + * Creates a single sensor map for client player's sensor tracks. + * Client player alliance is always set to 1 (for now). + */ + void tcSimState::SetMultiplayerClient() + { + Clear(); + mcSensorMap.CreateMapForAlliance(1); // alliance 1 is always own-alliance + multiplayerMode = MM_CLIENT; + } + + /** + * Sets multiplayer mode to MM_SERVER. Server mode performs all of + * the simulation done in single player / MM_OFF mode. + */ + void tcSimState::SetMultiplayerServer() + { + multiplayerMode = MM_SERVER; + RandInit(); + } void tcSimState::SetScenarioDescription(std::string s) *************** *** 1889,1893 **** /********************************************************************/ tcSimState::tcSimState() ! : dateZulu(2000,4,10,5,0,0) { mpCommandInterface = NULL; --- 1941,1946 ---- /********************************************************************/ tcSimState::tcSimState() ! : dateZulu(2000,4,10,5,0,0), ! multiplayerMode(MM_OFF) { mpCommandInterface = NULL; Index: tcNetworkView.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcNetworkView.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcNetworkView.cpp 7 Apr 2004 00:41:08 -0000 1.10 --- tcNetworkView.cpp 9 Apr 2004 03:08:09 -0000 1.11 *************** *** 35,38 **** --- 35,39 ---- #include "network/tcMultiplayerInterface.h" #include "wxcommands.h" + #include "tcSimState.h" using namespace Gdiplus; *************** *** 179,190 **** // switching to client mode also terminates all connections ! if (mode <= 1) { tcMultiplayerInterface::Get()->MakeClient(); } - else if (mode == 2) { tcMultiplayerInterface::Get()->MakeServer(); } --- 180,197 ---- // switching to client mode also terminates all connections ! if (mode == 0) { tcMultiplayerInterface::Get()->MakeClient(); + tcSimState::Get()->SetMultiplayerOff(); + } + else if (mode <= 1) + { + tcMultiplayerInterface::Get()->MakeClient(); + tcSimState::Get()->SetMultiplayerClient(); } else if (mode == 2) { tcMultiplayerInterface::Get()->MakeServer(); + tcSimState::Get()->SetMultiplayerServer(); } *************** *** 192,195 **** --- 199,204 ---- networkMode = mode; + + event.Skip(); // send event on to application } Index: tcGameObject.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcGameObject.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tcGameObject.cpp 21 Mar 2004 21:03:27 -0000 1.11 --- tcGameObject.cpp 9 Apr 2004 03:08:09 -0000 1.12 *************** *** 30,33 **** --- 30,59 ---- #include "tcSimState.h" + + void tsRelativePosition::LoadFromStream(std::stringstream& buffer) + { + buffer.read((char*)&dx, sizeof(dx)); + buffer.read((char*)&dy, sizeof(dy)); + buffer.read((char*)&dz, sizeof(dz)); + buffer.read((char*)&yaw, sizeof(yaw)); + buffer.read((char*)&pitch, sizeof(pitch)); + buffer.read((char*)&roll, sizeof(roll)); + buffer.read((char*)&isVisible, sizeof(isVisible)); + } + + void tsRelativePosition::SaveToStream(std::stringstream& buffer) + { + buffer.write((char*)&dx, sizeof(dx)); + buffer.write((char*)&dy, sizeof(dy)); + buffer.write((char*)&dz, sizeof(dz)); + buffer.write((char*)&yaw, sizeof(yaw)); + buffer.write((char*)&pitch, sizeof(pitch)); + buffer.write((char*)&roll, sizeof(roll)); + buffer.write((char*)&isVisible, sizeof(isVisible)); + } + + + + tcMapData* tcGameObject::mapData = NULL; Database::tcDatabase* tcGameObject::database = NULL; *************** *** 230,233 **** --- 256,307 ---- /** + * Loads object state from stream + */ + void tcGameObject::LoadFromStream(std::stringstream& buffer) + { + rel_pos.LoadFromStream(buffer); + + buffer.read((char*)&mnModelType, sizeof(mnModelType)); + buffer.read((char*)&mnID, sizeof(mnID)); + + mzClass << buffer; + + buffer.read((char*)&mnDBKey, sizeof(mnID)); + + mzUnit << buffer; + + buffer.read((char*)&mnAlliance, sizeof(mnAlliance)); + buffer.read((char*)&mfStatusTime, sizeof(mfStatusTime)); + + mcKin.LoadFromStream(buffer); + + buffer.read((char*)&mfDamageLevel, sizeof(mfDamageLevel)); + } + + /** + * Saves object state to stream + */ + void tcGameObject::SaveToStream(std::stringstream& buffer) + { + rel_pos.SaveToStream(buffer); + + buffer.write((char*)&mnModelType, sizeof(mnModelType)); + buffer.write((char*)&mnID, sizeof(mnID)); + + mzClass >> buffer; + + buffer.write((char*)&mnDBKey, sizeof(mnID)); + + mzUnit >> buffer; + + buffer.write((char*)&mnAlliance, sizeof(mnAlliance)); + buffer.write((char*)&mfStatusTime, sizeof(mfStatusTime)); + + mcKin.SaveToStream(buffer); + + buffer.write((char*)&mfDamageLevel, sizeof(mfDamageLevel)); + } + + /** * */ Index: tcGameObjIterator.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/tcGameObjIterator.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcGameObjIterator.cpp 12 Feb 2004 01:54:49 -0000 1.2 --- tcGameObjIterator.cpp 9 Apr 2004 03:08:09 -0000 1.3 *************** *** 44,47 **** --- 44,48 ---- currentPos = -1; currentObj = NULL; + nIterated = 1; return; } Index: Game.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/sim/Game.cpp,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** Game.cpp 7 Apr 2004 00:41:08 -0000 1.74 --- Game.cpp 9 Apr 2004 03:08:08 -0000 1.75 *************** *** 81,84 **** --- 81,85 ---- EVT_COMMAND(ID_SECONDARYHOOK, wxEVT_COMMAND_BUTTON_CLICKED, tcGame::SecondaryHook) EVT_COMMAND(ID_SETBRIEFING, wxEVT_COMMAND_BUTTON_CLICKED, tcGame::SetBriefingMode) + EVT_COMMAND(ID_MULTIPLAYERMODE, wxEVT_COMMAND_BUTTON_CLICKED , tcGame::SetMultiplayerMode) EVT_COMMAND(ID_SETPAUSE, wxEVT_COMMAND_BUTTON_CLICKED, tcGame::SetPauseMode) EVT_COMMAND(ID_SET3D, wxEVT_COMMAND_BUTTON_CLICKED, tcGame::Set3D) *************** *** 136,139 **** --- 137,141 ---- directorTime = 0; nLastCount = 0; + multiplayerMode = 0; // single-player default mnBriefingWidth = 350; *************** *** 384,388 **** InitializeScenarioSelectView(); ! /*** Init edit control ***/ --- 386,390 ---- InitializeScenarioSelectView(); ! tcMultiplayerInterface::Get()->SetEvtHandler(this); /*** Init edit control ***/ *************** *** 943,946 **** --- 945,960 ---- /** + * Set multiplayer mode + */ + void tcGame::SetMultiplayerMode(wxCommandEvent& event) + { + int mode = event.m_extraLong; + + if (multiplayerMode == mode) return; + + multiplayerMode = mode; + } + + /** * Pause mode change through wxWindows event. * State stored in event.m_extraLong *************** *** 1089,1092 **** --- 1103,1107 ---- * Perform frame update applicable to current screen mode. * Update window status and draw windows. + * TODO: clean this up */ void tcGame::UpdateForScreenMode() *************** *** 1100,1103 **** --- 1115,1119 ---- briefingConsoleBottom->SetActive(false); optionsView->SetActive(false); + networkView->SetActive(false); tacticalMap->SetActive(drawTacticalMap); infoConsole->SetActive(drawEdgeWindows); *************** *** 1126,1129 **** --- 1142,1146 ---- briefingConsoleBottom->SetActive(drawEdgeWindows); optionsView->SetActive(false); + networkView->SetActive(false); tacticalMap->SetActive(drawTacticalMap); infoConsole->SetActive(false); *************** *** 1148,1151 **** --- 1165,1169 ---- briefingConsoleBottom->SetActive(false); optionsView->SetActive(true); + networkView->SetActive(false); tacticalMap->SetActive(false); infoConsole->SetActive(false); *************** *** 1156,1159 **** --- 1174,1191 ---- optionsView->Draw(); } + else if (meScreenMode == NETWORK) + { + briefingConsoleLeft->SetActive(false); + briefingConsoleBottom->SetActive(false); + optionsView->SetActive(false); + networkView->SetActive(true); + tacticalMap->SetActive(false); + infoConsole->SetActive(false); + hookInfo->SetActive(false); + oobView->SetActive(false); + objectControl->SetActive(false); + viewer->SetActive(false); + networkView->Draw(); + } } *************** *** 1219,1222 **** --- 1251,1257 ---- } + // update multiplayer interface at start and end of this method + tcMultiplayerInterface::Get()->Update(); + // periodically reset frame counter if (snFrameCount % 150 == 0) *************** *** 1292,1296 **** } ! director->Update(directorTime); mcGameView.Update(gameTime); --- 1327,1342 ---- } ! /* Skip director update for multiplayer until ! ** this is fixed. Currently there is no way to send briefing ! ** state over to client. ! */ ! if (multiplayerMode == 0) ! { ! director->Update(directorTime); ! } ! else ! { ! director->Update(1000); ! } mcGameView.Update(gameTime); *************** *** 1370,1373 **** --- 1416,1422 ---- } + // update multiplayer interface at start and end of this method + tcMultiplayerInterface::Get()->Update(); + return mbQuit; } *************** *** 1561,1569 **** return; case WXK_F5: if (meScreenMode == TACTICAL) { meScreenMode = TACTICALBRIEF; - // briefingConsoleLeft->Print("BRIEFING VIEW via F5"); - // briefingConsoleBottom->Print(" "); } else if (meScreenMode == TACTICALBRIEF) --- 1610,1617 ---- return; case WXK_F5: + // toggle briefing screen mode if (meScreenMode == TACTICAL) { meScreenMode = TACTICALBRIEF; } else if (meScreenMode == TACTICALBRIEF) *************** *** 1572,1575 **** --- 1620,1629 ---- } return; + case WXK_F6: + if (multiplayerMode != 0) + { + meScreenMode = NETWORK; + } + return; case WXK_F8: viewer->ToggleWireframe(); |
|
From: Dewitt C. <ddc...@us...> - 2004-04-09 03:21:23
|
Update of /cvsroot/gcblue/gcb_wx/src/database In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12869/src/database Modified Files: tcDBString.cpp Log Message: multiplayer related changes Index: tcDBString.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/database/tcDBString.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcDBString.cpp 28 Mar 2004 18:53:03 -0000 1.2 --- tcDBString.cpp 9 Apr 2004 03:08:08 -0000 1.3 *************** *** 126,129 **** --- 126,147 ---- } + std::stringstream& tcDBString::operator<<(std::stringstream& buffer) + { + size_t len; + buffer.read((char*)&len, sizeof(len)); + buffer.read(mz, len); + + return buffer; + } + + std::stringstream& tcDBString::operator>>(std::stringstream& buffer) + { + size_t len = strlen(mz); + buffer.write((char*)&len, sizeof(len)); + buffer.write(mz, len); + + return buffer; + } + int tcDBString::Serialize(tcFile& file, bool mbLoad) { |
|
From: Dewitt C. <ddc...@us...> - 2004-04-09 03:21:23
|
Update of /cvsroot/gcblue/gcb_wx/src/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12869/src/network Modified Files: tcControlMessageHandler.cpp tcMultiplayerInterface.cpp Log Message: multiplayer related changes Index: tcMultiplayerInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/network/tcMultiplayerInterface.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcMultiplayerInterface.cpp 7 Apr 2004 00:41:08 -0000 1.5 --- tcMultiplayerInterface.cpp 9 Apr 2004 03:08:08 -0000 1.6 *************** *** 129,132 **** --- 129,138 ---- } + wxEvtHandler* tcMultiplayerInterface::GetEvtHandler() const + { + wxASSERT(evtHandler); + return evtHandler; + } + /** * @return identification name string for player using this interface *************** *** 466,469 **** --- 472,483 ---- /** + * Sets wxWidgets event handler for posting messages to application. + */ + void tcMultiplayerInterface::SetEvtHandler(wxEvtHandler *eh) + { + evtHandler = eh; + } + + /** * Sets identification name string for player using this interface */ *************** *** 545,549 **** tcMultiplayerInterface::tcMultiplayerInterface() ! : tcpChat(true), myName("Somebody") { networkInterface = new tcNetworkInterface(); --- 559,563 ---- tcMultiplayerInterface::tcMultiplayerInterface() ! : tcpChat(true), myName("Somebody"), evtHandler(0) { networkInterface = new tcNetworkInterface(); Index: tcControlMessageHandler.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/network/tcControlMessageHandler.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcControlMessageHandler.cpp 7 Apr 2004 00:41:08 -0000 1.1 --- tcControlMessageHandler.cpp 9 Apr 2004 03:08:08 -0000 1.2 *************** *** 26,32 **** --- 26,35 ---- #endif #include "wx/string.h" + #include "wx/event.h" #include "network/tcControlMessageHandler.h" #include "network/tcMultiplayerInterface.h" + #include "tcSimState.h" + #include "wxcommands.h" BEGIN_NAMESPACE(network) *************** *** 75,81 **** memcpy(&messageCode, data, sizeof(messageCode)); ! wxMessageBox(wxString::Format("Received control message %d", messageCode), ! "Msg received", wxOK); } --- 78,107 ---- memcpy(&messageCode, data, sizeof(messageCode)); ! switch (messageCode) ! { ! case CM_BEEP: ! { ! } ! break; ! case CM_STARTGAME: ! { ! wxEvtHandler* evtHandler = tcMultiplayerInterface::Get()->GetEvtHandler(); ! wxCommandEvent command(wxEVT_COMMAND_BUTTON_CLICKED, ID_STARTGAME); ! // command.SetEventObject(evtHandler); ! evtHandler->AddPendingEvent(command); ! } ! break; ! default: ! { ! fprintf(stderr, "Warning - Unrecognized control message " ! "received by server (src:%d, id:%d)\n", connectionId, messageCode); ! return; ! } ! } + /* + wxMessageBox(wxString::Format("Received control message %d", messageCode), + "Msg received", wxOK); + */ } |
|
From: Dewitt C. <ddc...@us...> - 2004-04-09 03:21:23
|
Update of /cvsroot/gcblue/gcb_wx/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12869/src/common Modified Files: simmath.cpp Log Message: multiplayer related changes Index: simmath.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/common/simmath.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** simmath.cpp 7 Feb 2004 02:19:54 -0000 1.7 --- simmath.cpp 9 Apr 2004 03:08:08 -0000 1.8 *************** *** 392,396 **** --- 392,420 ---- } + void tcKinematics::LoadFromStream(std::stringstream& buffer) + { + buffer.read((char*)&mfLon_rad, sizeof(mfLon_rad)); + buffer.read((char*)&mfLat_rad, sizeof(mfLat_rad)); + buffer.read((char*)&mfAlt_m, sizeof(mfAlt_m)); + buffer.read((char*)&mfHeading_rad, sizeof(mfHeading_rad)); + buffer.read((char*)&mfClimbAngle_rad, sizeof(mfClimbAngle_rad)); + buffer.read((char*)&mfYaw_rad, sizeof(mfYaw_rad)); + buffer.read((char*)&mfPitch_rad, sizeof(mfPitch_rad)); + buffer.read((char*)&mfRoll_rad, sizeof(mfRoll_rad)); + buffer.read((char*)&mfSpeed_kts, sizeof(mfSpeed_kts)); + } + void tcKinematics::SaveToStream(std::stringstream& buffer) + { + buffer.write((char*)&mfLon_rad, sizeof(mfLon_rad)); + buffer.write((char*)&mfLat_rad, sizeof(mfLat_rad)); + buffer.write((char*)&mfAlt_m, sizeof(mfAlt_m)); + buffer.write((char*)&mfHeading_rad, sizeof(mfHeading_rad)); + buffer.write((char*)&mfClimbAngle_rad, sizeof(mfClimbAngle_rad)); + buffer.write((char*)&mfYaw_rad, sizeof(mfYaw_rad)); + buffer.write((char*)&mfPitch_rad, sizeof(mfPitch_rad)); + buffer.write((char*)&mfRoll_rad, sizeof(mfRoll_rad)); + buffer.write((char*)&mfSpeed_kts, sizeof(mfSpeed_kts)); + } void tcKinematics::Serialize(tcFile& file, bool abLoad) { |
|
From: Dewitt C. <ddc...@us...> - 2004-04-09 03:21:23
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12869/include/sim Modified Files: Game.h tcGameObject.h tcSimState.h Log Message: multiplayer related changes Index: tcGameObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcGameObject.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tcGameObject.h 15 Feb 2004 19:47:21 -0000 1.14 --- tcGameObject.h 9 Apr 2004 03:08:07 -0000 1.15 *************** *** 24,27 **** --- 24,28 ---- #include <vector> + #include <sstream> #include <osg/Node> *************** *** 65,68 **** --- 66,72 ---- float yaw, pitch, roll; bool isVisible; + + void LoadFromStream(std::stringstream& buffer); + void SaveToStream(std::stringstream& buffer); }; *************** *** 104,107 **** --- 108,113 ---- virtual void PrintToFile(tcFile&); virtual void SaveToFile(tcFile& file); + virtual void LoadFromStream(std::stringstream& buffer); + virtual void SaveToStream(std::stringstream& buffer); virtual void LoadFromFile(tcFile& file); virtual void Serialize(tcFile& file, bool mbLoad); Index: tcSimState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSimState.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** tcSimState.h 7 Apr 2004 00:41:08 -0000 1.19 --- tcSimState.h 9 Apr 2004 03:08:07 -0000 1.20 *************** *** 76,79 **** --- 76,85 ---- bool mbLoaded; ///< true if scenario is loaded }; + enum MultiplayerMode + { + MM_OFF = 0, + MM_CLIENT = 1, + MM_SERVER = 2 + }; ///< multiplayer mode options public: tcPool<tcGameObject,N_GAME_OBJECTS> maPlatformState; *************** *** 153,156 **** --- 159,165 ---- int Serialize(tcString scenname, bool mbLoad); void SetDateTime(DateZulu dz) {dateZulu = dz;} ///< Sets DateZulu object for environment date (sky, etc) + void SetMultiplayerOff(); + void SetMultiplayerClient(); + void SetMultiplayerServer(); void SetScenarioDescription(std::string s); void SetScenarioLoaded(bool state); *************** *** 174,177 **** --- 183,187 ---- double mfSimTime; DateZulu dateZulu; + MultiplayerMode multiplayerMode; ///< multiplayer mode, default = MM_OFF float GetFractionalDamage(float afDamage, tcGameObject *apGameObj); Index: Game.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/Game.h,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Game.h 7 Apr 2004 00:41:08 -0000 1.32 --- Game.h 9 Apr 2004 03:08:07 -0000 1.33 *************** *** 203,206 **** --- 203,207 ---- wxPoint smallViewerPosition; wxSize smallViewerSize; + int multiplayerMode; ///< 0 - single-player, 1 - client, 2 - server void Activate(); *************** *** 234,237 **** --- 235,239 ---- void Set3D(wxCommandEvent& event); void SetBriefingMode(wxCommandEvent& event); + void SetMultiplayerMode(wxCommandEvent& event); void SetPauseMode(wxCommandEvent& event); void SetTacticalMapSize(teTacticalMapSize mapSize); |
|
From: Dewitt C. <ddc...@us...> - 2004-04-09 03:21:23
|
Update of /cvsroot/gcblue/gcb_wx/include/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12869/include/network Modified Files: tcMultiplayerInterface.h Log Message: multiplayer related changes Index: tcMultiplayerInterface.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/network/tcMultiplayerInterface.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcMultiplayerInterface.h 7 Apr 2004 00:41:07 -0000 1.6 --- tcMultiplayerInterface.h 9 Apr 2004 03:08:07 -0000 1.7 *************** *** 36,39 **** --- 36,41 ---- #define END_NAMESPACE } + class wxEvtHandler; + BEGIN_NAMESPACE(network) *************** *** 41,45 **** class tcMessageHandler; - class tcPlayerStatus { --- 43,46 ---- *************** *** 74,77 **** --- 75,79 ---- int GetConnectionId(unsigned connectionIdx); std::string GetConnectionStatus(unsigned connectionIdx); + wxEvtHandler* GetEvtHandler() const; std::string GetName() const; unsigned GetNumConnections(); *************** *** 90,93 **** --- 92,96 ---- void SendTestUDP(int destination, std::string message); void SetChatProtocol(int code); + void SetEvtHandler(wxEvtHandler *eh); void SetName(const std::string& name); void Update(); *************** *** 101,104 **** --- 104,108 ---- bool tcpChat; ///< true to use TCP for chat protocol, otherwise UDP tcPlayerStatus errorPlayerStatus; ///< status to return if player not found + wxEvtHandler* evtHandler; ///< wxWidgets event handler for posting messages to application void ClearMessageMap(); |