[Balder-cvs] balder2d/include networkmanager.h, 1.5, 1.6 gamemanager.h, 1.11, 1.12
Status: Beta
Brought to you by:
holomorph
From: Reuben <col...@us...> - 2006-06-03 00:07:06
|
Update of /cvsroot/balder/balder2d/include In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30578/include Modified Files: gamemanager.h Added Files: networkmanager.h Log Message: 2-June-2006 - Reuben added the new NetworkManager.cpp and NetworkManager.h files. - Reuben introduced a new dependency, RakNet from www.rakkarsoft.com. This allows for network capabilities in the game. Index: gamemanager.h =================================================================== RCS file: /cvsroot/balder/balder2d/include/gamemanager.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** gamemanager.h 19 May 2006 21:56:47 -0000 1.11 --- gamemanager.h 3 Jun 2006 00:07:01 -0000 1.12 *************** *** 39,42 **** --- 39,43 ---- class Renderer; class SoundManager; + class NetworkManager; class CollisionMask; class Entity; *************** *** 67,70 **** --- 68,72 ---- Renderer *render; SoundManager *sound; + NetworkManager *network; Input* input; CollisionMask *collision_mask; *************** *** 89,93 **** public: ! GameManager(Renderer *, SoundManager *); ~GameManager(); frame_number GetFrame() const {return frame;} --- 91,95 ---- public: ! GameManager(Renderer *, SoundManager *, NetworkManager *); ~GameManager(); frame_number GetFrame() const {return frame;} --- NEW FILE: networkmanager.h --- /*************************************************************************** * Copyright (C) 2004 by Bjorn Hansen * * hol...@us... * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program 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 this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef NETWORKMANAGER_H #define NETWORKMANAGER_H #include "../include/balder2dtypes.h" #include <raknet/PacketEnumerations.h> #include <raknet/RakNetworkFactory.h> #include <raknet/RakPeerInterface.h> #include <raknet/NetworkTypes.h> #include <sstream> namespace Balder{ class NetworkManager{ public: NetworkManager(); ~NetworkManager(); int startHost(); int joinHost(); int Disconnect(); const std::string getServerIP() {return server_ip_address;} private: std::string server_ip_address; bool connected; bool is_host; RakServerInterface* server; RakClientInterface* client; }; } #endif // NETWORKMANAGER_H |