Brought the common/ directory up to date with the region's preprocessors

I really hope the serialization code still works.
This commit is contained in:
Kayne Ruse
2014-04-20 03:55:52 +10:00
parent c5a627004a
commit fba183fa27
6 changed files with 28 additions and 53 deletions
+5 -4
View File
@@ -24,12 +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
/* TODO: Keep the PACKET_BUFFER_SIZE up to date
* 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) * 2
* metadata: sizeof(metadata)
*/
#define PACKET_BUFFER_SIZE REGION_WIDTH * REGION_HEIGHT * REGION_DEPTH * sizeof(Region::type_t) + sizeof(int) * 5 + sizeof(NetworkPacket::Metadata)
#define PACKET_BUFFER_SIZE REGION_WIDTH * REGION_HEIGHT * REGION_DEPTH * sizeof(Region::type_t) + sizeof(int) * 2 + sizeof(NetworkPacket::Metadata)
void serialize(NetworkPacket* const, void*);
void deserialize(NetworkPacket* const, void*);