ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/client.h
(Generate patch)

Comparing deliantra/server/include/client.h (file contents):
Revision 1.62 by root, Mon Jul 23 21:02:50 2007 UTC vs.
Revision 1.63 by root, Tue Jul 24 04:55:34 2007 UTC

83enum { 83enum {
84 PF_PLAYER = 0x01, // must have valid player / will by synchronised 84 PF_PLAYER = 0x01, // must have valid player / will by synchronised
85 PF_PLAYING = 0x02, // must be in playing state 85 PF_PLAYING = 0x02, // must be in playing state
86 PF_COMMAND0 = 0x04, // command starts at offset 0 86 PF_COMMAND0 = 0x04, // command starts at offset 0
87 PF_COMMAND6 = 0x08, // command starts at offset 6 87 PF_COMMAND6 = 0x08, // command starts at offset 6
88};
89
90// face type.s bit 0 means "has meta info prepended"
91enum {
92 FT_FACE = 0 * 2 + 0, // faces (images)
93 FT_MUSIC = 1 * 2 + 1, // background music
94 FT_SOUND = 2 * 2 + 1, // effects
95 FT_RSRC = 3 * 2 + 0, // generic data files
96 FT_NUM,
88}; 97};
89 98
90struct packet_type 99struct packet_type
91{ 100{
92 const char *name; 101 const char *name;
219 228
220 // large structures at the end please 229 // large structures at the end please
221 struct Map lastmap; 230 struct Map lastmap;
222 std::bitset<MAXANIMNUM> anims_sent; 231 std::bitset<MAXANIMNUM> anims_sent;
223 std::bitset<MAX_FACES> faces_sent; 232 std::bitset<MAX_FACES> faces_sent;
233 std::bitset<FT_NUM> fx_want;
224 234
225 // if we get an incomplete packet, this is used to hold the data. 235 // if we get an incomplete packet, this is used to hold the data.
226 // we add 2 byte for the header, one for the trailing 0 byte 236 // we add 2 byte for the header, one for the trailing 0 byte
227 uint8 inbuf[MAXSOCKBUF + 2 + 1]; 237 uint8 inbuf[MAXSOCKBUF + 2 + 1];
228 238
261 void send_packet_printf (const char *format, ...); 271 void send_packet_printf (const char *format, ...);
262 void send_packet (packet &sl); 272 void send_packet (packet &sl);
263 273
264 void send_drawinfo (const char *msg, int flags = NDI_BLACK); 274 void send_drawinfo (const char *msg, int flags = NDI_BLACK);
265 275
266 MTH bool must_send_face (faceidx facenum)
267 {
268 if (faces_sent[facenum])
269 return false;
270
271 faces_sent[facenum] = true;
272 return true;
273 }
274
275 MTH void send_face (faceidx facenum); 276 MTH void send_face (faceidx facenum, int pri = 0);
276 MTH void send_image (faceidx facenum); 277 MTH void send_image (faceidx facenum);
277 MTH void send_faces (object *ob); 278 MTH void send_faces (object *ob);
278 MTH void send_animation (short anim_num); 279 MTH void send_animation (short anim_num);
279 void send_msg (int color, const char *type, const char *msg); 280 void send_msg (int color, const char *type, const char *msg);
280 281

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines