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.82 by root, Tue Dec 23 22:03:06 2008 UTC vs.
Revision 1.86 by root, Wed Sep 2 16:54:20 2009 UTC

174 living ACC (RO, last_stats); /* Last stats as sent to client */ 174 living ACC (RO, last_stats); /* Last stats as sent to client */
175 float ACC (RW, last_speed); /* Last speed as sent to client */ 175 float ACC (RW, last_speed); /* Last speed as sent to client */
176 sint16 ACC (RW, last_resist[NROFATTACKS]);/* last resist values sent to client */ 176 sint16 ACC (RW, last_resist[NROFATTACKS]);/* last resist values sent to client */
177 sint64 ACC (RW, last_skill_exp[NUM_SKILLS]);/* shadow register. if != exp. obj update client */ 177 sint64 ACC (RW, last_skill_exp[NUM_SKILLS]);/* shadow register. if != exp. obj update client */
178 178
179 bool ACC (RW, force_face0); // client workaround for buggy checksum calculation in gcfclient
180 bool ACC (RW, force_bad_checksum); // client workaround for buggy checksum calculation in gcfclient
181 bool ACC (RW, force_image_newmap); // client workaround for client not redrawing map on image upload
182 bool ACC (RW, enable_bg_scrub); // client workaround, gcfclient becomes unusable if you send it images
183
184 bool ACC (RW, afk); /* player is afk */ 179 bool ACC (RW, afk); /* player is afk */
185 bool ACC (RW, facecache); /* If true, client is caching images */
186 bool ACC (RW, sent_scroll); 180 bool ACC (RW, sent_scroll);
187 bool ACC (RW, sound); /* does the client want sound */ 181 bool ACC (RW, sound); /* does the client want sound */
188 bool ACC (RW, newmapcmd); /* Send newmap command when entering new map SMACFIGGEN */ 182 bool ACC (RW, newmapcmd); /* Send newmap command when entering new map SMACFIGGEN */
189 bool ACC (RW, plugincmd); // extend the protocol through a plug-in */ 183 bool ACC (RW, plugincmd); // extend the protocol through a plug-in */
190 bool ACC (RW, mapinfocmd); // return map info and send map change info 184 bool ACC (RW, mapinfocmd); // return map info and send map change info
191 uint8_t ACC (RW, extcmd); // call into extensions/plugins 185 uint8_t ACC (RW, extcmd); // call into extensions/plugins
192 bool ACC (RW, extmap); // extend map comamnd with extra data
193 bool ACC (RW, buggy_mapscroll); // client crashes on large mapscrolls
194 bool ACC (RW, darkness); /* True if client wants darkness information */
195 bool ACC (RW, image2); /* Client wants image2/face2 commands */
196 uint8_t ACC (RW, fxix); // client implements fx and ix (face|image extended) commands
197 bool ACC (RW, update_look); /* If true, we need to send the look window */ 186 bool ACC (RW, update_look); /* If true, we need to send the look window */
198 bool ACC (RW, has_readable_type); /* If true client accept additional text information */ 187 bool ACC (RW, has_readable_type); /* If true client accept additional text information */
199 /* used to arrange text in books, scrolls, or scripted dialogs */ 188 /* used to arrange text in books, scrolls, or scripted dialogs */
200 bool ACC (RW, monitor_spells); /* Client wishes to be informed when their spell list changes */ 189 bool ACC (RW, monitor_spells); /* Client wishes to be informed when their spell list changes */
201 bool ACC (RW, ext_mapinfos); /* If true client accepts additional info on maps */
202 /* Below are flags for extedend infos to pass to client
203 * with S->C mapextended command */
204 bool ACC (RW, EMI_smooth); /* Send smooth in extendmapinfos */
205 bool ACC (RW, smoothing); // trt-style smoothing 190 bool ACC (RW, smoothing); // deliantra-style smoothing
206 bool ACC (RW, can_msg); // trt-style text messages
207 191
208 bool ACC (RW, force_newmap); // force a newmap before next map update 192 bool ACC (RW, force_newmap); // force a newmap before next map update
209 uint32 ACC (RW, supported_readables); /* each bit is a readable supported by client */ 193 uint32 ACC (RW, supported_readables); /* each bit is a readable supported by client */
210 uint32 ACC (RW, cs_version), ACC (RW, sc_version); /* versions of the client */ 194 uint32 ACC (RW, cs_version), ACC (RW, sc_version); /* versions of the client */
211 uint16 ACC (RW, look_position); /* start of drawing of look window */ 195 uint16 ACC (RW, look_position); /* start of drawing of look window */
220 shstr ACC (RW, version); // CF+ client name/version 204 shstr ACC (RW, version); // CF+ client name/version
221 uint8 ACC (RW, faceset); // CF+ selected faceset 205 uint8 ACC (RW, faceset); // CF+ selected faceset
222 206
223 tstamp ACC (RW, last_send); // last data send on socket. 207 tstamp ACC (RW, last_send); // last data send on socket.
224 208
209 float ACC (RW, socket_timeout); /* after how many seconds of no ack do we declare dead */
225 int ACC (RW, rate_avail); // current rate balance 210 int ACC (RW, rate_avail); // current rate balance
226 int ACC (RW, max_rate); // max. # of bytes to send per tick 211 int ACC (RW, max_rate); // max. # of bytes to send per tick
227 faceidx ACC (RW, scrub_idx); // which face to send next 212 faceidx ACC (RW, scrub_idx); // which face to send next
228 int ACC (RW, bg_scrub); // how many ticks till the next background face send 213 int ACC (RW, bg_scrub); // how many ticks till the next background face send
229 214
309 void send_packet (packet &sl); 294 void send_packet (packet &sl);
310 295
311 void send_drawinfo (const char *msg, int flags = NDI_BLACK); 296 void send_drawinfo (const char *msg, int flags = NDI_BLACK);
312 297
313 MTH void send_face (faceidx facenum, int pri = 0); 298 MTH void send_face (faceidx facenum, int pri = 0);
314 MTH void send_image (faceidx facenum);
315 MTH void send_faces (object *ob); 299 MTH void send_faces (object *ob);
316 MTH void send_animation (short anim_num); 300 MTH void send_animation (short anim_num);
317 void send_msg (int color, const char *type, const char *msg); 301 void send_msg (int color, const char *type, const char *msg);
318 302
319 MTH void play_sound (faceidx sound, int dx = 0, int dy = 0); 303 MTH void play_sound (faceidx sound, int dx = 0, int dy = 0);
368#define CLIENT_SUPPORT_READABLES(__sockPtr,__type)\ 352#define CLIENT_SUPPORT_READABLES(__sockPtr,__type)\
369 ( ((__type)>0) &&\ 353 ( ((__type)>0) &&\
370 ((__sockPtr)->has_readable_type) && \ 354 ((__sockPtr)->has_readable_type) && \
371 ((__sockPtr)->supported_readables & (1<<(__type))) ) 355 ((__sockPtr)->supported_readables & (1<<(__type))) )
372 356
373/* Constants in the form EMI_ is for extended map infos.
374 * Even if the client select the additionnal infos it wants
375 * on the map, there may exist cases where this whole info
376 * is not given in one buch but in separate bunches. This
377 * is done performance reasons (imagine some info related to
378 * a visible object and another info related to a 4 square
379 * width and height area). At the begin of an extended info packet
380 * is a bit field. A bit is activated for each extended info
381 * present in the data
382 */
383
384/* Meanings:
385 * EMI_NOREDRAW Take extended infos into account but don't redraw,
386 * some additionnal datas will follow in a new packet
387 * EMI_SMOOTH Datas about smoothing
388 */
389#define EMI_NOREDRAW 0x01
390#define EMI_SMOOTH 0x02
391
392/* this last one says the bitfield continue un next byte
393 * There may be several on contiguous bytes. So there is 7
394 * actual bits used per byte, and the number of bytes
395 * is not fixed in protocol
396 */
397#define EMI_HASMOREBITS 0x80
398
399#define FACE_TYPES 1 357#define FACE_TYPES 1
400#define PNG_FACE_INDEX 0 358#define PNG_FACE_INDEX 0
401 359
402#define VERSION_CS 1023 /* version >= 1023 understand setup cmd */ 360#define VERSION_CS 1023 /* version >= 1023 understand setup cmd */
403#define VERSION_SC 1026 361#define VERSION_SC 1026

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines