about summary refs log tree commit diff homepage
path: root/torus.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--torus.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/torus.h b/torus.h
index 3538213..c058a4d 100644
--- a/torus.h
+++ b/torus.h
@@ -88,12 +88,28 @@ static const struct {
 };
 static const size_t SPAWNS_LEN = sizeof(SPAWNS) / sizeof(SPAWNS[0]);
 
+enum {
+	MAP_ROWS = 11,
+	MAP_COLS = 11,
+};
+
+struct Map {
+	struct MapTile {
+		time_t createTime;
+		time_t modifyTime;
+		time_t accessTime;
+		uint32_t modifyCount;
+		uint32_t accessCount;
+	} tiles[MAP_ROWS][MAP_COLS];
+};
+
 struct ServerMessage {
 	enum PACKED {
 		SERVER_TILE,
 		SERVER_MOVE,
 		SERVER_PUT,
 		SERVER_CURSOR,
+		SERVER_MAP,
 	} type;
 	union {
 		struct {
@@ -122,6 +138,7 @@ struct ClientMessage {
 		CLIENT_MOVE,
 		CLIENT_PUT,
 		CLIENT_SPAWN,
+		CLIENT_MAP,
 	} type;
 	union {
 		struct {