From 82023866ab4c7483652e9d4605290e39ced3bec3 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Thu, 24 May 2007 20:54:08 +0000 Subject: large change. moved around all source. splitted server and client into separate files --- src/engine/snapshot.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/engine/snapshot.h (limited to 'src/engine/snapshot.h') diff --git a/src/engine/snapshot.h b/src/engine/snapshot.h new file mode 100644 index 00000000..9d803486 --- /dev/null +++ b/src/engine/snapshot.h @@ -0,0 +1,19 @@ + +struct snapshot +{ + int num_items; + int offsets[1]; + + struct item + { + int type_and_id; + char data[1]; + + int type() { return type_and_id>>16; } + int id() { return type_and_id&(0xffff); } + }; + + char *data_start() { return (char *)&offsets[num_items]; } + item *get_item(int index) { return (item *)(data_start() + offsets[index]); }; +}; + -- cgit 1.4.1