[Gcblue-commits] gcb_wx/include/network tcUpdateMessageHandler.h,NONE,1.1 tcMessage.h,1.4,1.5 tcMult
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-04-13 00:38:33
|
Update of /cvsroot/gcblue/gcb_wx/include/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27636/include/network Modified Files: tcMessage.h tcMultiplayerInterface.h Added Files: tcUpdateMessageHandler.h Log Message: Multiplayer related updates --- NEW FILE: tcUpdateMessageHandler.h --- /** @file tcUpdateMessageHandler.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 _UPDATEMESSAGEHANDLER_H_ #define _UPDATEMESSAGEHANDLER_H_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include <queue> #include <string> #include "network/tcMessageHandler.h" class tcGameObject; class tcStream; #define BEGIN_NAMESPACE(x) namespace x { #define END_NAMESPACE } BEGIN_NAMESPACE(network) /** * Game object update handler */ class tcUpdateMessageHandler : public tcMessageHandler { public: static void AddUpdate(tcGameObject* obj, tcStream& stream); virtual void Handle(int connectionId, unsigned messageSize, const unsigned char *data); tcUpdateMessageHandler(); virtual ~tcUpdateMessageHandler(); }; END_NAMESPACE #endif Index: tcMultiplayerInterface.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/network/tcMultiplayerInterface.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tcMultiplayerInterface.h 9 Apr 2004 03:08:07 -0000 1.7 --- tcMultiplayerInterface.h 13 Apr 2004 00:24:37 -0000 1.8 *************** *** 37,40 **** --- 37,41 ---- class wxEvtHandler; + class tcStream; BEGIN_NAMESPACE(network) *************** *** 42,47 **** class tcNetworkInterface; class tcMessageHandler; - class tcPlayerStatus { public: --- 43,48 ---- class tcNetworkInterface; class tcMessageHandler; class tcPlayerStatus + { public: *************** *** 66,70 **** MSG_CHATTEXT = 1, MSG_CONTROL = 2, ! MSG_USERNAME = 3 }; static tcMultiplayerInterface* Get(); --- 67,72 ---- MSG_CHATTEXT = 1, MSG_CONTROL = 2, ! MSG_USERNAME = 3, ! MSG_UPDATE = 4 }; static tcMultiplayerInterface* Get(); *************** *** 91,94 **** --- 93,97 ---- void SendControlMessage(int destination, int messageCode); void SendTestUDP(int destination, std::string message); + void SendUpdateMessage(int destination, tcStream& stream); void SetChatProtocol(int code); void SetEvtHandler(wxEvtHandler *eh); *************** *** 113,116 **** --- 116,120 ---- void ProcessReceiveMessages(); + void UpdateObjects(); void UpdatePlayerInfo(); Index: tcMessage.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/network/tcMessage.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tcMessage.h 4 Apr 2004 20:52:23 -0000 1.4 --- tcMessage.h 13 Apr 2004 00:24:37 -0000 1.5 *************** *** 37,41 **** enum { ! BUFFER_SIZE = 1024, /// < max size in bytes of total message including header HEADER_SIZE = 8, SIZE_SIZE = 2, ///< size of messageSize field (first field in header) --- 37,41 ---- enum { ! BUFFER_SIZE = 2048, /// < max size in bytes of total message including header HEADER_SIZE = 8, SIZE_SIZE = 2, ///< size of messageSize field (first field in header) |