[Gcblue-commits] gcb_wx/include/sim tcChatBox.h,NONE,1.1 tcCommandObject.h,NONE,1.1 tcLauncher.h,NON
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-05-24 00:14:59
|
Update of /cvsroot/gcblue/gcb_wx/include/sim In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26112/include/sim Modified Files: tcAirObject.h tcESMSensor.h tcLauncherState.h tcPlatformObject.h tcRadar.h tcSensorState.h tcSimState.h Added Files: tcChatBox.h tcCommandObject.h tcLauncher.h Log Message: Multiplayer changes --- NEW FILE: tcLauncher.h --- /** @file tcLauncher.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 _TCLAUNCHER_H_ #define _TCLAUNCHER_H_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "simmath.h" #include "AError.h" #include <vector> namespace Database { class tcDatabase; class tcLauncherDBObject; class tcDatabaseObject; enum teWeaponLaunchMode; } using namespace Database; class tcGameObject; class tcSimState; class tcRadar; class tcStream; class tcCommandStream; class tcCreateStream; class tcUpdateStream; /** * State for individual launcher. */ class tcLauncher { public: int mbActive; long mnDBKey; ///< key in launcher database tcLauncherDBObject *mpLauncherDBObj; long mnChildDBKey; tcDatabaseObject *mpChildDBObj; float mfTimeToReady; unsigned int mnCurrent; unsigned int mnUncommitted; ///< mnCurrent - mnUncommitted = # pending launch tsGeoPoint msDatum; ///< datum to pass to weapon nav guidance tnPoolIndex mnTargetID; ///< track that seeker can acquire teWeaponLaunchMode meLaunchMode; int mnTargetFlags; ///< 0x01 - surface, 0x02 - air, 0x03 - land float pointingAngle; ///< boresight azimuth angle in radians relative nose/bow tcRadar *fireControlSensor; ///< sensor for fire control guidance unsigned fireControlSensorIdx; ///< index of sensor on parent platform tcCommandStream& operator<<(tcCommandStream& stream); tcCreateStream& operator<<(tcCreateStream& stream); tcUpdateStream& operator<<(tcUpdateStream& stream); tcCommandStream& operator>>(tcCommandStream& stream); tcCreateStream& operator>>(tcCreateStream& stream); tcUpdateStream& operator>>(tcUpdateStream& stream); bool CommandInfoMatches(const tcLauncher& launcher); void CopyCommandInfoFrom(const tcLauncher& launcher); }; #endif Index: tcAirObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcAirObject.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcAirObject.h 1 May 2004 21:49:24 -0000 1.7 --- tcAirObject.h 24 May 2004 00:14:46 -0000 1.8 *************** *** 23,27 **** #pragma once ! #include "tcplatformobject.h" class tcUpdateStream; --- 23,28 ---- #pragma once ! #include "tcPlatformObject.h" ! #include "tcCommandObject.h" class tcUpdateStream; *************** *** 41,51 **** int readyForLanding; ///< 1 if gear down/ready for landing, 0 otherwise - bool newCommand; ///< flag to indicate new obj command since last update - /** - * bitfield to manage acknowledgement for command updates. - * appropriate bit is set when new command update is generated, - * bit is cleared when ack update is received. - */ - int commandStatus; virtual void ApplyRestrictions(); --- 42,45 ---- *************** *** 77,80 **** --- 71,77 ---- virtual ~tcAirObject(); protected: + tcCommandObject commandObj; + + virtual void UpdateHeading(float dt_s); float maxPitch_rad; ///< user imposed restriction to pitch angle --- NEW FILE: tcCommandObject.h --- /** @file tcCommandObject.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 _TCCOMMANDOBJECT_H_ #define _TCCOMMANDOBJECT_H_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class tcCommandStream; class tcLauncher; /** * Class to provide methods and variables for multiplayer command management * In some cases both the parent of a class and the class itself can derive * from this. */ class tcCommandObject { public: void ClearNewCommand(); bool HasNewCommand() const; bool HasUnacknowledgedCommand() const; /// implements rules for updating command params over multiplayer connection void LoadCommandParam(tcCommandStream& stream, float& param, int flag); void LoadCommandParam(tcCommandStream& stream, int& param, int flag); void LoadCommandParam(tcCommandStream& stream, tcLauncher& param, int flag); void SetNewCommand(int flag); static void SetClientMode(bool state) {clientMode = state;} tcCommandObject(); virtual ~tcCommandObject(); private: /// flag to indicate new obj command since last update bool newCommand; /** * bitfield to manage acknowledgement for command updates. * appropriate bit is set when new command update is generated, * bit is cleared when ack update is received. */ int commandStatus; static bool clientMode; ///< true if running as multiplayer client }; #endif Index: tcLauncherState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcLauncherState.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tcLauncherState.h 13 Apr 2004 00:24:37 -0000 1.6 --- tcLauncherState.h 24 May 2004 00:14:46 -0000 1.7 *************** *** 1,28 **** ! /* ! * Copyright (C) 2003 Dewitt "Cole" 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 ! */ ! ! #pragma once #ifndef _TCLAUNCHERSTATE_H_ #define _TCLAUNCHERSTATE_H_ #include "simmath.h" #include "AError.h" #include <vector> --- 1,33 ---- ! /** @file tcLauncherState.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 _TCLAUNCHERSTATE_H_ #define _TCLAUNCHERSTATE_H_ + #if _MSC_VER > 1000 + #pragma once + #endif // _MSC_VER > 1000 + + #include "simmath.h" #include "AError.h" + #include "tcCommandObject.h" #include <vector> *************** *** 41,73 **** class tcRadar; class tcStream; - /** - * State for individual launcher. - */ - struct tsLData - { - int mbActive; - - long mnDBKey; ///< key in launcher database - tcLauncherDBObject *mpLauncherDBObj; - long mnChildDBKey; - tcDatabaseObject *mpChildDBObj; - - float mfTimeToReady; - unsigned int mnCurrent; - unsigned int mnPending; - - tsGeoPoint msDatum; ///< datum to pass to weapon nav guidance - tnPoolIndex mnTargetID; ///< track that seeker can acquire - teWeaponLaunchMode meLaunchMode; - int mnTargetFlags; ///< 0x01 - surface, 0x02 - air, 0x03 - land - float pointingAngle; ///< boresight azimuth angle in radians relative nose/bow - - tcRadar *fireControlSensor; ///< sensor for fire control guidance - unsigned fireControlSensorIdx; ///< index of sensor on parent platform - - tcStream& operator<<(tcStream& buffer); - tcStream& operator>>(tcStream& buffer); - }; /** --- 46,54 ---- class tcRadar; class tcStream; + class tcCommandStream; + class tcCreateStream; + class tcUpdateStream; + class tcLauncher; /** *************** *** 92,98 **** NO_FIRECONTROL = 11, }; ///< launcher status codes tcGameObject *parent; int mnCount; ! std::vector<tsLData> launchers; ///< vector of launcher state info static tcDatabase *mpDatabase; --- 73,81 ---- NO_FIRECONTROL = 11, }; ///< launcher status codes + + tcGameObject *parent; int mnCount; ! static tcDatabase *mpDatabase; *************** *** 100,103 **** --- 83,90 ---- void AddFullLauncher(tnPoolIndex anKey, float azimuth_rad); + const char* GetFireControlSensorClass(unsigned nLauncher) const; + const tcLauncher* GetLauncher(unsigned nLauncher) const; + const char* GetLauncherChildClass(unsigned nLauncher) const; + int GetLauncherCount() const; int GetLauncherQuantity(unsigned anLauncher); int GetLauncherStatus(unsigned nLauncher); *************** *** 106,117 **** bool IsSeekerLaunch(unsigned anLauncher); ! tcStream& operator<<(tcStream& buffer); ! tcStream& operator>>(tcStream& buffer); void Serialize(tcFile& file, bool abLoad); void SetFireControlSensor(unsigned nLauncher, tcRadar* radar, unsigned sensorIdx); bool SetLauncherDatum(unsigned nLauncher, double lon_rad, double lat_rad); bool SetLauncherTarget(unsigned nLauncher, long targetID); void SetParent(tcGameObject *obj) {parent = obj;} static std::string TranslateLauncherStatus(int status); tcLauncherState(); tcLauncherState(tcGameObject *parentObj); --- 93,117 ---- bool IsSeekerLaunch(unsigned anLauncher); ! void Launch(long& key, unsigned& nLauncher); ///< needs to be reworked ! ! tcCommandStream& operator<<(tcCommandStream& stream); ! tcUpdateStream& operator<<(tcUpdateStream& stream); ! ! tcCommandStream& operator>>(tcCommandStream& stream); ! tcUpdateStream& operator>>(tcUpdateStream& stream); ! ! void ClearNewCommand(); ! bool HasNewCommand() const; ! bool HasUnacknowledgedCommand() const; ! void Serialize(tcFile& file, bool abLoad); void SetFireControlSensor(unsigned nLauncher, tcRadar* radar, unsigned sensorIdx); + int SetLaunch(int nLauncher, int quantity); bool SetLauncherDatum(unsigned nLauncher, double lon_rad, double lat_rad); bool SetLauncherTarget(unsigned nLauncher, long targetID); void SetParent(tcGameObject *obj) {parent = obj;} static std::string TranslateLauncherStatus(int status); + void Update(float dt_s); + tcLauncherState(); tcLauncherState(tcGameObject *parentObj); *************** *** 120,124 **** --- 120,128 ---- private: + std::vector<tcLauncher> launchers; ///< vector of launcher state info + tcCommandObject commandObj; static tcSimState *simState; + + int GetLauncherFlag(int nLauncher) const {return 0x01 << nLauncher;} }; #endif \ No newline at end of file Index: tcRadar.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcRadar.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcRadar.h 23 Apr 2004 00:14:56 -0000 1.5 --- tcRadar.h 24 May 2004 00:14:46 -0000 1.6 *************** *** 42,45 **** --- 42,46 ---- class tcGameObject; class tcStream; + class tcUpdateStream; /** *************** *** 78,83 **** tcRadar& operator=(tcRadar& ss); ! virtual tcStream& operator<<(tcStream& stream); ! virtual tcStream& operator>>(tcStream& stream); tcRadar* Clone(); tcRadar(); --- 79,86 ---- tcRadar& operator=(tcRadar& ss); ! ! virtual tcUpdateStream& operator<<(tcUpdateStream& stream); ! virtual tcUpdateStream& operator>>(tcUpdateStream& stream); ! tcRadar* Clone(); tcRadar(); Index: tcSimState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSimState.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** tcSimState.h 8 May 2004 21:25:25 -0000 1.23 --- tcSimState.h 24 May 2004 00:14:46 -0000 1.24 *************** *** 192,196 **** float GetFractionalDamage(float afDamage, tcGameObject *apGameObj); ! bool IsDetectedESM(tcESMSensor *apESM, tcRadar *apEmitterRadar, float& rfAz_rad); void PerformAutoEngage(tcGameObject* apGameObj, double afTime); void ProcessRadarDetection(tcGameObject *apRadarPlat,tcGameObject *apTarget, --- 192,196 ---- float GetFractionalDamage(float afDamage, tcGameObject *apGameObj); ! bool IsDetectedESM(tcESMSensor* apESM, const tcRadar* apEmitterRadar, float& rfAz_rad); void PerformAutoEngage(tcGameObject* apGameObj, double afTime); void ProcessRadarDetection(tcGameObject *apRadarPlat,tcGameObject *apTarget, Index: tcSensorState.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcSensorState.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcSensorState.h 23 Apr 2004 00:14:56 -0000 1.9 --- tcSensorState.h 24 May 2004 00:14:46 -0000 1.10 *************** *** 1,20 **** ! /* ! * Copyright (C) 2003 Dewitt "Cole" 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 ! */ #pragma once --- 1,21 ---- ! /** @file tcSensorState.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 ! */ #pragma once *************** *** 39,43 **** class tcSimState; class tcGameObject; ! class tcStream; /** --- 40,44 ---- class tcSimState; class tcGameObject; ! class tcUpdateStream; /** *************** *** 64,68 **** --- 65,73 ---- void GetTestArea(tcRect& region); virtual bool InitFromDB(tcDatabase *apDatabase, tnPoolIndex anKey, float mountAzimuth_rad); + void Serialize(tcFile& file, bool mbLoad); + virtual tcUpdateStream& operator<<(tcUpdateStream& stream); + virtual tcUpdateStream& operator>>(tcUpdateStream& stream); + virtual void SetActive(bool active); void SetMountAz(float az) {mountAz_rad = az;} *************** *** 71,77 **** int UpdateScan(double afTime); tcSensorState& operator=(tcSensorState& ss); ! virtual tcStream& operator<<(tcStream& stream); ! virtual tcStream& operator>>(tcStream& stream); ! tcSensorState* Clone(void); tcSensorState(); tcSensorState(tcGameObject *obj); --- 76,81 ---- int UpdateScan(double afTime); tcSensorState& operator=(tcSensorState& ss); ! ! tcSensorState* Clone(); tcSensorState(); tcSensorState(tcGameObject *obj); Index: tcPlatformObject.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcPlatformObject.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tcPlatformObject.h 1 May 2004 21:49:24 -0000 1.16 --- tcPlatformObject.h 24 May 2004 00:14:46 -0000 1.17 *************** *** 1,3 **** ! /* * Copyright (C) 2003 Dewitt "Cole" Colclough (de...@tw...) * All rights reserved. --- 1,3 ---- ! /** @file tcPlatformObject * Copyright (C) 2003 Dewitt "Cole" Colclough (de...@tw...) * All rights reserved. *************** *** 18,22 **** --- 18,27 ---- */ + #ifndef _TCPLATFORMOBJECT_H_ + #define _TCPLATFORMOBJECT_H_ + + #if _MSC_VER > 1000 #pragma once + #endif // _MSC_VER > 1000 #include "tcFile.h" *************** *** 25,28 **** --- 30,34 ---- #include "tcGuidanceState.h" #include "tcGameObject.h" + #include "tcCommandObject.h" #include "tcAIData.h" *************** *** 57,61 **** enum { ! UPDATE_GUIDANCE = 0x01 }; --- 63,69 ---- enum { ! UPDATE_GUIDANCE = 0x01, ! UPDATE_LAUNCHERS = 0x02, ! UPDATE_SENSORS = 0x04 }; *************** *** 71,85 **** tsFormationParameters msFormationParameters; tcGenericDBObject *mpDBObject; ! ! bool newCommand; ///< flag to indicate new obj command since last update ! /** ! * bitfield to manage acknowledgement for command updates. ! * appropriate bit is set when new command update is generated, ! * bit is cleared when ack update is received. ! */ ! int commandStatus; ! virtual void Clear(void); virtual void DesignateDatum(tcPoint p); virtual void DesignateLauncherDatum(tcPoint p, unsigned int anLauncher); --- 79,87 ---- tsFormationParameters msFormationParameters; tcGenericDBObject *mpDBObject; ! tcCommandObject commandObj; ! tcCommandObject sensorCommandObj; ///< ugly, could fix by handling sensors like launchers ! virtual void Clear(); virtual void DesignateDatum(tcPoint p); virtual void DesignateLauncherDatum(tcPoint p, unsigned int anLauncher); *************** *** 89,103 **** virtual int GetLauncherQuantity(unsigned anLauncher); virtual void GetLauncherState(tcLauncherState*& pLauncherState) {pLauncherState=&mcLauncherState;} // virtual void GetSensorState(tcSensorState** aapSensorState, int& rnCount); // virtual void GetSensorStateRef(tcSensorState**& rapSensorState, int& rnCount); ! virtual bool HasActivatedSensor(void); virtual bool IsInterceptingTrack(long id); ! virtual bool IsRadiating(void); ! virtual std::vector<tcSensorState*>* GetSensorStateArray(void) {return &mapSensorState;} ! virtual tcSensorState* GetSensor(unsigned idx); virtual void Launch(tnPoolIndex& rnKey, unsigned& rnLauncher); virtual void RandInitNear(float afLon_deg, float afLat_deg); virtual void SetAltitude(float new_altitude_m); virtual void SetHeading(float afNewHeading); virtual void SetSpeed(float afNewSpeed); virtual int SetLaunch(int anLauncher, int anQuantity); --- 91,108 ---- virtual int GetLauncherQuantity(unsigned anLauncher); virtual void GetLauncherState(tcLauncherState*& pLauncherState) {pLauncherState=&mcLauncherState;} + unsigned GetSensorCount() const; // virtual void GetSensorState(tcSensorState** aapSensorState, int& rnCount); // virtual void GetSensorStateRef(tcSensorState**& rapSensorState, int& rnCount); ! virtual bool HasActivatedSensor(); virtual bool IsInterceptingTrack(long id); ! virtual bool IsRadiating(); ! //virtual std::vector<tcSensorState*>* GetSensorStateArray() {return &mapSensorState;} ! virtual const tcSensorState* GetSensor(unsigned idx); ! virtual tcSensorState* GetSensorMutable(unsigned idx); virtual void Launch(tnPoolIndex& rnKey, unsigned& rnLauncher); virtual void RandInitNear(float afLon_deg, float afLat_deg); virtual void SetAltitude(float new_altitude_m); virtual void SetHeading(float afNewHeading); + void SetSensorState(unsigned idx, bool state); virtual void SetSpeed(float afNewSpeed); virtual int SetLaunch(int anLauncher, int anQuantity); *************** *** 122,140 **** virtual bool HasUnacknowledgedCommand() const; ! ! tcPlatformObject(void); tcPlatformObject(tcPlatformObject&); tcPlatformObject(tcGenericDBObject *obj); ! virtual ~tcPlatformObject(void); protected: float lastHeadingDelta; // a workaround to smooth heading rate changes ! virtual void ApplyRestrictions(void); virtual void SetFireControlSensors(); - /// implements rules for updating command params over multiplayer connection - void LoadCommandParam(tcCommandStream& stream, float& param, int& cmdStatus, int flag); - void LoadCommandParam(tcCommandStream& stream, int& param, int& cmdStatus, int flag); virtual void Move(float dt_s); --- 127,141 ---- virtual bool HasUnacknowledgedCommand() const; ! tcPlatformObject(); tcPlatformObject(tcPlatformObject&); tcPlatformObject(tcGenericDBObject *obj); ! virtual ~tcPlatformObject(); protected: float lastHeadingDelta; // a workaround to smooth heading rate changes ! virtual void ApplyRestrictions(); virtual void SetFireControlSensors(); virtual void Move(float dt_s); *************** *** 145,147 **** virtual void UpdateSensors(double t); virtual void UpdateSpeed(float dt_s); ! }; \ No newline at end of file --- 146,150 ---- virtual void UpdateSensors(double t); virtual void UpdateSpeed(float dt_s); ! }; ! ! #endif --- NEW FILE: tcChatBox.h --- /** @file tcChatBox.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 _CHATBOX_H_ #define _CHATBOX_H_ #pragma once #include "wx/wx.h" #ifdef WIN32 #include "wx/msw/private.h" //for MS Windows specific definitions #endif #include "tcStandardWindow.h" class tcEditBox; class tcConsoleBox; /** * User interface window for multiplayer chat. The ChatBox * is a small popup window used from within the game. */ class tcChatBox : public tcStandardWindow { public: int Draw(); void OnLButtonDown(wxMouseEvent& event); void SendChatText(wxCommandEvent& event); tcChatBox(wxWindow *parent, tcWindow *surfaceHost, const wxPoint& pos, const wxSize& size, const wxString& name = "NetworkView", const wxString& configFile = "xml/chat_box.xml"); virtual ~tcChatBox(); private: tcConsoleBox *chatHistory; tcEditBox *chatEntry; DECLARE_EVENT_TABLE() }; #endif Index: tcESMSensor.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/sim/tcESMSensor.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcESMSensor.h 23 Apr 2004 00:14:56 -0000 1.3 --- tcESMSensor.h 24 May 2004 00:14:46 -0000 1.4 *************** *** 47,52 **** tcESMSensor& operator=(tcESMSensor& ss); ! virtual tcStream& operator<<(tcStream& stream); ! virtual tcStream& operator>>(tcStream& stream); tcESMSensor* Clone(void); tcESMSensor(); --- 47,52 ---- tcESMSensor& operator=(tcESMSensor& ss); ! //virtual tcStream& operator<<(tcStream& stream); ! //virtual tcStream& operator>>(tcStream& stream); tcESMSensor* Clone(void); tcESMSensor(); |