Added some structures to SerialPacket, and serial.cpp

I've also created the Statistics structure for simplicity.
This commit is contained in:
Kayne Ruse
2014-05-26 00:49:31 +10:00
parent c575ee9ce1
commit 1dd8042d3d
8 changed files with 243 additions and 80 deletions
+4 -4
View File
@@ -28,11 +28,11 @@
* NOTE: REGION_CONTENT is currently the largest type of packet
* map content: REGION_WIDTH * REGION_HEIGHT * REGION_DEPTH * sizoeof(region::type_t)
* map format: sizeof(int) * 3
* metadata: sizeof(metadata)
* metadata: sizeof(SerialPacket::Type)
*/
#define PACKET_BUFFER_SIZE REGION_WIDTH * REGION_HEIGHT * REGION_DEPTH * sizeof(Region::type_t) + sizeof(int) * 3 + sizeof(SerialPacket::Metadata)
#define PACKET_BUFFER_SIZE REGION_WIDTH * REGION_HEIGHT * REGION_DEPTH * sizeof(Region::type_t) + sizeof(int) * 3 + sizeof(SerialPacket::Type)
void serialize(SerialPacket* const, void*);
void deserialize(SerialPacket* const, void*);
void serialize(SerialPacket* const, void* dest);
void deserialize(SerialPacket* const, void* src);
#endif