1 #ifndef PROTOCOL_H_INCLUDED
2 #define PROTOCOL_H_INCLUDED
4 #include <stdint.h>
5 #include <stdbool.h>
6 #include <string.h>
8 #define DEFAULT_PORT 29386
9 #define PROTOCOL_VERSION 1
10 #define PROTOCOL_F8FRAC (1 << 7)
12 #define PACKED __attribute__((__packed__))
83 ClInfo info;
84 ClKill kill;
85 ClDoes does;
90 SvInfo info;
91 SvKill kill;
92 SvSplr splr;
93 SvSbul sbul;
98 ClMessage cl;
99 SvMessage sv;
116 }
117 }
121 }
124 ClInfo m = {
127 };
130 }
135 };
136 }
142 };
143 }
146 SvInfo m = {
151 };
154 }
157 SvKill m = {
159 };
162 }
164 static inline ProtocolMessage sv_splr(int clid, bool live, float x, float y, float r, float vx, float vy, float vr) {
175 };
176 }
178 static inline ProtocolMessage sv_sbul(int id, int owner, bool live, float x, float y, float vx, float vy, int tick) {
189 };
190 }
192 #undef PACKED