[Gcblue-commits] gcb_wx/include/sim Game.h,1.32,1.33 tcGameObject.h,1.14,1.15 tcSimState.h,1.19,1.20
Status: Alpha
Brought to you by:
ddcforge
|
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); |