ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/image.C
(Generate patch)

Comparing deliantra/server/socket/image.C (file contents):
Revision 1.72 by root, Sun Nov 11 04:29:11 2012 UTC vs.
Revision 1.74 by root, Sun Nov 11 18:21:21 2012 UTC

20 * <http://www.gnu.org/licenses/>. 20 * <http://www.gnu.org/licenses/>.
21 * 21 *
22 * The authors can be reached via e-mail to <support@deliantra.net> 22 * The authors can be reached via e-mail to <support@deliantra.net>
23 */ 23 */
24 24
25/** \file 25/*
26 * Image related communication 26 * Image related communication
27 *
28 * \date 2003-12-02
29 * 27 *
30 * This file deals with the image related communication to the 28 * This file deals with the image related communication to the
31 * client. I've located all the functions in this file - this 29 * client. I've located all the functions in this file - this
32 * localizes it more, and means that we don't need to declare 30 * localizes it more, and means that we don't need to declare
33 * things like all the structures as globals. 31 * things like all the structures as globals.
51 49
52 sscanf (buf, "%d %d", &idx, &pri); 50 sscanf (buf, "%d %d", &idx, &pri);
53 51
54 //TODO: somehow fetch default priority from send_fx here 52 //TODO: somehow fetch default priority from send_fx here
55 53
56 const facedata *d = face_data (idx, ns->faceset); 54 const faceinfo *f = face_info (idx);
57 55
58 if (!d) 56 if (!f)
59 return; // doh 57 return; // doh
58
59 int set = ns->tileset;
60
61 if (!f->face [set].chksum_len)
62 set = 0;
60 63
61 /* cfperl_ix calls cf::face::ix which loads the data */ 64 /* cfperl_ix calls cf::face::ix which loads the data */
62 /* and then calls cf::client::send_ix to actually queue the ix */ 65 /* and then calls cf::client::send_ix to actually queue the ix */
63 cfperl_ix (ns, idx, pri, d->size, d->fofs); 66 cfperl_ix (ns, set, idx, pri);
64} 67}
65 68
66void 69void
67client::ix_send (faceidx idx, sint16 pri, SV *data_sv) 70client::ix_send (faceidx idx, sint16 pri, SV *data_sv)
68{ 71{
165 168
166 fx << ber32 (0) 169 fx << ber32 (0)
167 << uint8 (1) << uint8 (type); 170 << uint8 (1) << uint8 (type);
168 } 171 }
169 172
170 const facedata *d = f->data (faceset); 173 const facedata *d = f->data (tileset);
171 174
172 fx << ber32 (facenum) 175 fx << ber32 (facenum)
173 << data8 (d->chksum, d->chksum_len); 176 << data8 (d->chksum, d->chksum_len);
174 177
175 if (smoothing) 178 if (smoothing)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines