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.53 by root, Sat Jun 9 22:54:03 2007 UTC vs.
Revision 1.58 by root, Sun Jul 1 04:08:14 2007 UTC

115struct client : zero_initialised, attachable 115struct client : zero_initialised, attachable
116{ 116{
117 int ACC (RW, fd); 117 int ACC (RW, fd);
118 unsigned int inbuf_len; // number of bytes valid in inbuf 118 unsigned int inbuf_len; // number of bytes valid in inbuf
119 statsinfo stats; 119 statsinfo stats;
120 int ACC (RO, active); 120 object_vector_index ACC (RO, active);
121 player_ptr ACC (RO, pl); 121 player_ptr ACC (RO, pl);
122 122
123 /* The following is the setup for a ring buffer for storing output 123 /* The following is the setup for a ring buffer for storing output
124 * data that the OS can't handle right away. 124 * data that the OS can't handle right away.
125 */ 125 */
161 bool ACC (RW, extcmd); // call into extensions/plugins 161 bool ACC (RW, extcmd); // call into extensions/plugins
162 bool ACC (RW, extmap); // extend map comamnd with extra data 162 bool ACC (RW, extmap); // extend map comamnd with extra data
163 bool ACC (RW, buggy_mapscroll); // client crashes on large mapscrolls 163 bool ACC (RW, buggy_mapscroll); // client crashes on large mapscrolls
164 bool ACC (RW, darkness); /* True if client wants darkness information */ 164 bool ACC (RW, darkness); /* True if client wants darkness information */
165 bool ACC (RW, image2); /* Client wants image2/face2 commands */ 165 bool ACC (RW, image2); /* Client wants image2/face2 commands */
166 bool ACC (RW, fxix); // client implements fx and ix (face|image extended) commands 166 uint8_t ACC (RW, fxix); // client implements fx and ix (face|image extended) commands
167 bool ACC (RW, update_look); /* If true, we need to send the look window */ 167 bool ACC (RW, update_look); /* If true, we need to send the look window */
168 bool ACC (RW, has_readable_type); /* If true client accept additional text information */ 168 bool ACC (RW, has_readable_type); /* If true client accept additional text information */
169 /* used to arrange text in books, scrolls, or scripted dialogs */ 169 /* used to arrange text in books, scrolls, or scripted dialogs */
170 bool ACC (RW, monitor_spells); /* Client wishes to be informed when their spell list changes */ 170 bool ACC (RW, monitor_spells); /* Client wishes to be informed when their spell list changes */
171 bool ACC (RW, ext_mapinfos); /* If true client accepts additional info on maps */ 171 bool ACC (RW, ext_mapinfos); /* If true client accepts additional info on maps */
197 int ACC (RW, rate_avail); // current rate balance 197 int ACC (RW, rate_avail); // current rate balance
198 int ACC (RW, max_rate); // max. # of bytes to send per tick 198 int ACC (RW, max_rate); // max. # of bytes to send per tick
199 faceidx ACC (RW, scrub_idx); // which face to send next 199 faceidx ACC (RW, scrub_idx); // which face to send next
200 int ACC (RW, bg_scrub); // how many ticks till the next background face send 200 int ACC (RW, bg_scrub); // how many ticks till the next background face send
201 201
202 faceidx partial_face; 202 struct ixsend {
203 uint32 partial_face_ofs; // if != 0, need to send remaining bytes of partial_face 203 int16_t pri; // unused
204 std::vector<faceidx, slice_allocator<faceidx> > askface; // which faces have been requested by the client 204 faceidx idx;
205 uint32_t ofs; // if != 0, need to send remaining bytes of partial_face
206 };
207 std::vector<ixsend, slice_allocator<ixsend> > ixface; // which faces to send to the client using ix
205 208
206 std::vector<faceidx, slice_allocator<faceidx> > fxface; // which faces to send using fx 209 std::vector<faceidx, slice_allocator<faceidx> > fxface; // which faces to send using fx
207 MTH void flush_fx (); // send fx if required 210 MTH void flush_fx (); // send fx if required
208 211
209 void do_destroy (); 212 void do_destroy ();
210 void gather_callbacks (AV *&callbacks, event_type event) const; 213 void gather_callbacks (AV *&callbacks, event_type event) const;
211 214
261 void send_drawinfo (const char *msg, int flags = NDI_BLACK); 264 void send_drawinfo (const char *msg, int flags = NDI_BLACK);
262 MTH void send_face (faceidx facenum); 265 MTH void send_face (faceidx facenum);
263 MTH void send_image (faceidx facenum); 266 MTH void send_image (faceidx facenum);
264 MTH void send_faces (object *ob); 267 MTH void send_faces (object *ob);
265 MTH void send_animation (short anim_num); 268 MTH void send_animation (short anim_num);
266 MTH void send_msg (int color, const char *type, const char *msg); 269 void send_msg (int color, const char *type, const char *msg);
267 270
268 // called when something under the player changes 271 // called when something under the player changes
269 MTH void floorbox_update () { update_look = 1; } 272 MTH void floorbox_update () { update_look = 1; }
270 // called when the player has been moved 273 // called when the player has been moved
271 MTH void floorbox_reset () { look_position = 0; floorbox_update (); } 274 MTH void floorbox_reset () { look_position = 0; floorbox_update (); }
314#define PNG_FACE_INDEX 0 317#define PNG_FACE_INDEX 0
315 318
316#define VERSION_CS 1023 /* version >= 1023 understand setup cmd */ 319#define VERSION_CS 1023 /* version >= 1023 understand setup cmd */
317#define VERSION_SC 1026 320#define VERSION_SC 1026
318//#define VERSION_SC 1027 // requestinfo image_info and image_sums, makes extending faces on the fly impossible 321//#define VERSION_SC 1027 // requestinfo image_info and image_sums, makes extending faces on the fly impossible
319#define VERSION_INFO "Crossfire+ Server" 322#define VERSION_INFO "Crossfire TRT Server"
320 323
321typedef object_vector<client, &client::active> sockvec; 324typedef object_vector<client, &client::active> sockvec;
322 325
323extern sockvec clients; 326extern sockvec clients;
324 327

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines