… | |
… | |
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 |
186 | bool ACC (RW, extmap); // extend map command 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 */ |
187 | 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 */ |
188 | bool ACC (RW, has_readable_type); /* If true client accept additional text information */ |
199 | /* used to arrange text in books, scrolls, or scripted dialogs */ |
189 | /* 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 */ |
190 | 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 |
191 | bool ACC (RW, smoothing); // deliantra-style smoothing |
206 | bool ACC (RW, can_msg); // trt-style text messages |
192 | bool ACC (RW, can_msg); // deliantra-style text messages |
207 | |
193 | |
208 | bool ACC (RW, force_newmap); // force a newmap before next map update |
194 | 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 */ |
195 | 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 */ |
196 | 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 */ |
197 | uint16 ACC (RW, look_position); /* start of drawing of look window */ |
… | |
… | |
309 | void send_packet (packet &sl); |
295 | void send_packet (packet &sl); |
310 | |
296 | |
311 | void send_drawinfo (const char *msg, int flags = NDI_BLACK); |
297 | void send_drawinfo (const char *msg, int flags = NDI_BLACK); |
312 | |
298 | |
313 | MTH void send_face (faceidx facenum, int pri = 0); |
299 | MTH void send_face (faceidx facenum, int pri = 0); |
314 | MTH void send_image (faceidx facenum); |
|
|
315 | MTH void send_faces (object *ob); |
300 | MTH void send_faces (object *ob); |
316 | MTH void send_animation (short anim_num); |
301 | MTH void send_animation (short anim_num); |
317 | void send_msg (int color, const char *type, const char *msg); |
302 | void send_msg (int color, const char *type, const char *msg); |
318 | |
303 | |
319 | MTH void play_sound (faceidx sound, int dx = 0, int dy = 0); |
304 | MTH void play_sound (faceidx sound, int dx = 0, int dy = 0); |
… | |
… | |
368 | #define CLIENT_SUPPORT_READABLES(__sockPtr,__type)\ |
353 | #define CLIENT_SUPPORT_READABLES(__sockPtr,__type)\ |
369 | ( ((__type)>0) &&\ |
354 | ( ((__type)>0) &&\ |
370 | ((__sockPtr)->has_readable_type) && \ |
355 | ((__sockPtr)->has_readable_type) && \ |
371 | ((__sockPtr)->supported_readables & (1<<(__type))) ) |
356 | ((__sockPtr)->supported_readables & (1<<(__type))) ) |
372 | |
357 | |
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 |
358 | #define FACE_TYPES 1 |
400 | #define PNG_FACE_INDEX 0 |
359 | #define PNG_FACE_INDEX 0 |
401 | |
360 | |
402 | #define VERSION_CS 1023 /* version >= 1023 understand setup cmd */ |
361 | #define VERSION_CS 1023 /* version >= 1023 understand setup cmd */ |
403 | #define VERSION_SC 1026 |
362 | #define VERSION_SC 1026 |