1 | /* |
1 | /* |
2 | * static char *rcsid_newclient_h = |
2 | * static char *rcsid_newclient_h = |
3 | * "$Id: newclient.h,v 1.3 2006/05/01 12:26:57 root Exp $"; |
3 | * "$Id: newclient.h,v 1.4 2006/08/18 02:06:57 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
238 | |
238 | |
239 | #define SOUND_NORMAL 0 |
239 | #define SOUND_NORMAL 0 |
240 | #define SOUND_SPELL 1 |
240 | #define SOUND_SPELL 1 |
241 | |
241 | |
242 | /* Contains the base information we use to make up a packet we want to send. */ |
242 | /* Contains the base information we use to make up a packet we want to send. */ |
243 | typedef struct SockList { |
243 | struct SockList { |
244 | int len; |
244 | int len; |
245 | unsigned char *buf; |
245 | unsigned char *buf; |
246 | } SockList; |
246 | }; |
247 | |
247 | |
|
|
248 | inline void SockList_AddChar (SockList *sl, char c) |
|
|
249 | { |
|
|
250 | sl->buf[sl->len++]=c; |
|
|
251 | } |
|
|
252 | |
|
|
253 | inline void SockList_AddShort (SockList *sl, unsigned short data) |
|
|
254 | { |
|
|
255 | sl->buf[sl->len++] = data >> 8; |
|
|
256 | sl->buf[sl->len++] = data; |
|
|
257 | } |
|
|
258 | |
248 | typedef struct CS_Stats { |
259 | struct CS_Stats { |
249 | int ibytes; /* ibytes, obytes are bytes in, out */ |
260 | int ibytes; /* ibytes, obytes are bytes in, out */ |
250 | int obytes; |
261 | int obytes; |
251 | short max_conn; /* Maximum connections received */ |
262 | short max_conn; /* Maximum connections received */ |
252 | time_t time_start; /* When we started logging this */ |
263 | time_t time_start; /* When we started logging this */ |
253 | } CS_Stats; |
264 | }; |
254 | |
|
|
255 | |
265 | |
256 | extern CS_Stats cst_tot, cst_lst; |
266 | extern CS_Stats cst_tot, cst_lst; |
257 | |
267 | |
258 | #endif |
268 | #endif |