Changeset 624 for code/branches/FICN/src/network/PacketDecoder.cc
- Timestamp:
- Dec 18, 2007, 7:05:51 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/network/PacketDecoder.cc
r620 r624 89 89 90 90 91 std::cout << "got ack id: " << a->id << std::endl; 91 92 processAck( a, clientId ); //debug info 92 93 … … 146 147 //memcpy( (void*)&(currentState->id), (const void*)(data+sizeof( int )), sizeof( int ) ); 147 148 currentState->id = (int)*(data+sizeof(int)); 149 std::cout << "id: " << currentState->id << std::endl; 148 150 //copy the size of the GameStateCompressed compressed data into the new GameStateCompressed struct, located at 3th 149 151 //position of the data stream, data+2*sizeof( int ) 150 152 // memcpy( (void*)&(currentState->compsize), (const void*)(data+2*sizeof( int )), sizeof( int) ); 151 153 currentState->compsize = (int)*(data+2*sizeof(int)); 154 std::cout << "compsize: " << currentState->compsize << std::endl; 152 155 //size of uncompressed data 153 156 // memcpy( (void*)&(currentState->normsize), (const void*)(data+3*sizeof( int )), sizeof( int ) ); 154 157 currentState->normsize = (int)*(data+3*sizeof(int)); 158 std::cout << "normsize. " << currentState->normsize << std::endl; 155 159 //since the packetgenerator was changed, due to a new parameter, change this function too 156 160 // memcpy( (void*)&(currentState->diffed), (const void*)(data+4*sizeof(int)), sizeof(bool)); 157 161 currentState->diffed = (bool)*(data+4*sizeof(int)); 162 std::cout << "diffed: " << currentState->diffed << std::endl; 158 163 //since data is not allocated, because it's just a pointer, allocate it with size of gamestatedatastream 159 164 currentState->data = (unsigned char*)(malloc( currentState->compsize ));
Note: See TracChangeset
for help on using the changeset viewer.