Finished the region serial code

This commit is contained in:
Kayne Ruse
2014-03-31 21:40:50 +11:00
parent 60000cb0cf
commit 4410ab892f
3 changed files with 87 additions and 56 deletions
+7
View File
@@ -24,6 +24,13 @@
#include "network_packet.hpp"
/* Sending regions are the largest type of packet
* content: width * height * depth * sizoeof(type)
* map format: sizeof(int) * 5
* metadata: sizeof(metadata)
*/
#define PACKET_BUFFER_SIZE REGION_WIDTH * REGION_HEIGHT * REGION_DEPTH * sizeof(Region::type_t) + sizeof(int) * 5 + sizeof(NetworkPacket::Metadata)
void serialize(NetworkPacket* const, void*);
void deserialize(NetworkPacket* const, void*);