- Timestamp:
- Dec 14, 2005, 11:19:11 PM (19 years ago)
- Location:
- branches/network/src/lib
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/Makefile.am
r6106 r6116 13 13 server_socket.cc \ 14 14 handshake.cc \ 15 entity_manager.cc \15 network_game_manager.cc \ 16 16 converter.cc 17 17 … … 28 28 server_socket.h \ 29 29 handshake.h \ 30 entity_manager.h \30 network_game_manager.h \ 31 31 converter.h 32 32 -
branches/network/src/lib/network/handshake.cc
r6115 r6116 22 22 #include "handshake.h" 23 23 24 Handshake::Handshake( bool server, int clientId, int entityManagerId )24 Handshake::Handshake( bool server, int clientId, int networkGameManagerId ) 25 25 { 26 26 /* set the class id for the base object */ 27 27 this->setClassID(CL_HANDSHAKE, "Handshake"); 28 28 29 if ( clientId > 255 )30 {31 PRINTF(1)("clientId is too big for type byte (%d)! connection to client %d will not work!", clientId, clientId);32 }33 34 if ( entityManagerId > 255 )35 {36 PRINTF(1)("entityManagerId is too big for type byte (%d)! connection to client %d will not work!", entityManagerId, clientId);37 }38 39 29 this->setIsServer(server); 40 30 this->clientId = clientId; 41 this-> entityManagerId = entityManagerId;31 this->networkGameManagerId = networkGameManagerId; 42 32 this->state = 0; 43 33 this->isOk = false; … … 110 100 this->isOk = true; 111 101 this->newHostId = data[0]; 112 this->new EntityManagerId = data[1];102 this->newNetworkGameManagerId = data[1]; 113 103 114 104 if ( newHostId == 0 ) … … 120 110 else 121 111 { 122 PRINTF(0)("got my hostID: %d \n", newHostId);112 PRINTF(0)("got my hostID: %d and networkGameManagerId: %d\n", newHostId, newNetworkGameManagerId); 123 113 } 124 114 return; … … 189 179 //memcpy(data, &clientId, 4); 190 180 data[0] = (byte)clientId; 191 data[1] = (byte) entityManagerId;181 data[1] = (byte)networkGameManagerId; 192 182 } 193 183 *reciever = clientId; -
branches/network/src/lib/network/handshake.h
r6115 r6116 34 34 { 35 35 public: 36 Handshake(bool server, int clientId = 0, int entityManagerId = 0);36 Handshake(bool server, int clientId = 0, int networkGameManagerId = 0); 37 37 inline bool completed(){ return hasState( HS_COMPLETED ); } 38 38 inline bool ok(){ return isOk; } 39 39 inline int getHostId(){ return newHostId; } 40 inline int getNetworkGameManagerId(){ return newNetworkGameManagerId; } 40 41 41 42 inline void doReject(){ setState(HS_DO_REJECT); } … … 49 50 int state; 50 51 int clientId; 51 int entityManagerId;52 int networkGameManagerId; 52 53 int newHostId; 53 int new EntityManagerId;54 int newNetworkGameManagerId; 54 55 bool isOk; 55 56 -
branches/network/src/lib/network/network_game_manager.cc
r6111 r6116 21 21 22 22 /* include your own header */ 23 #include " entity_manager.h"23 #include "network_game_manager.h" 24 24 25 25 … … 30 30 * Standard constructor 31 31 */ 32 EntityManager::EntityManager()32 NetworkGameManager::NetworkGameManager() 33 33 { 34 34 /* set the class id for the base object */ … … 39 39 * Standard destructor 40 40 */ 41 EntityManager::~EntityManager()41 NetworkGameManager::~NetworkGameManager() 42 42 { 43 43 } 44 44 45 45 46 void EntityManager::writeBytes(const byte* data, int length)46 void NetworkGameManager::writeBytes(const byte* data, int length) 47 47 { 48 48 } 49 49 50 int EntityManager::readBytes(byte* data, int maxLength, int * reciever)50 int NetworkGameManager::readBytes(byte* data, int maxLength, int * reciever) 51 51 { 52 52 } 53 53 54 void EntityManager::writeDebug() const54 void NetworkGameManager::writeDebug() const 55 55 { 56 56 } 57 57 58 void EntityManager::readDebug() const58 void NetworkGameManager::readDebug() const 59 59 { 60 60 } … … 66 66 * @param classID: The ID of the class of which an entity should be created 67 67 */ 68 void EntityManager::createEntity(int classID)68 void NetworkGameManager::createEntity(int classID) 69 69 { 70 70 } … … 75 75 * @param uniqueID: The ID of the entity object which should be removed 76 76 */ 77 void EntityManager::removeEntity(int uniqueID)77 void NetworkGameManager::removeEntity(int uniqueID) 78 78 { 79 79 } … … 85 85 * @param classID: The ID of the class of which an entity should be created 86 86 */ 87 void EntityManager::requestCreateEntity(int classID)87 void NetworkGameManager::requestCreateEntity(int classID) 88 88 { 89 89 } … … 93 93 * @param uniqueID: The ID of the entity object which should be removed 94 94 */ 95 void EntityManager::requestRemoveEntity(int uniqueID)95 void NetworkGameManager::requestRemoveEntity(int uniqueID) 96 96 { 97 97 } … … 102 102 * @param classID: The ID of the class of which an entity should be created 103 103 */ 104 void EntityManager::executeCreateEntity(int classID)104 void NetworkGameManager::executeCreateEntity(int classID) 105 105 { 106 106 } … … 111 111 * @param uniqueID: The ID of the entity object which should be removed 112 112 */ 113 void EntityManager::executeRemoveEntity(int uniqueID)113 void NetworkGameManager::executeRemoveEntity(int uniqueID) 114 114 { 115 115 } … … 119 119 * @return: true if the entity can be created, false otherwise 120 120 */ 121 bool EntityManager::canCreateEntity(int classID)121 bool NetworkGameManager::canCreateEntity(int classID) 122 122 { 123 123 } -
branches/network/src/lib/network/network_game_manager.h
r6111 r6116 4 4 */ 5 5 6 #ifndef _ ENTITY_MANGER7 #define _ ENTITY_MANAGER6 #ifndef _NETWORK_GAME_MANGER 7 #define _NETWORK_GAME_MANAGER 8 8 9 9 /* include this file, it contains some default definitions */ … … 45 45 * a class that can create and remove entities 46 46 */ 47 class EntityManager: public Synchronizeable47 class NetworkGameManager: public Synchronizeable 48 48 { 49 49 public: 50 EntityManager();51 ~ EntityManager();50 NetworkGameManager(); 51 ~NetworkGameManager(); 52 52 53 53 virtual void writeBytes(const byte* data, int length); -
branches/network/src/lib/sound/sound_engine.cc
r6105 r6116 291 291 292 292 293 AL chardeviceName[] =293 ALubyte deviceName[] = 294 294 295 295 #ifdef __WIN32__
Note: See TracChangeset
for help on using the changeset viewer.