1 #ifndef PROTOCOL_H_INCLUDED
2 #define PROTOCOL_H_INCLUDED
4 #include <stdint.h>
5 #include <stdbool.h>
6 #include <string.h>
8 #define PROTOCOL_PORT 29386
9 #define PROTOCOL_VERSION 2
10 #define PROTOCOL_F8FRAC (1 << 7)
12 #define PACKED __attribute__((__packed__))
35 };
50 DoesBits code;
86 ClInfo info;
87 ClKill kill;
88 ClDoes does;
93 SvInfo info;
94 SvKill kill;
95 SvSplr splr;
96 SvSbul sbul;
101 ClMessage cl;
102 SvMessage sv;
119 }
120 }
124 }
127 ClInfo m = {
130 };
133 }
138 };
139 }
145 };
146 }
149 SvInfo m = {
154 };
157 }
160 SvKill m = {
162 };
165 }
167 static inline ProtocolMessage sv_splr(int clid, bool live, float x, float y, float r, float vx, float vy, float vr) {
178 };
179 }
181 static inline ProtocolMessage sv_sbul(int id, int owner, bool live, float x, float y, float vx, float vy, int tick) {
192 };
193 }
195 #undef PACKED