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.19 by root, Thu Feb 15 18:09:34 2007 UTC vs.
Revision 1.20 by root, Fri Feb 16 22:26:02 2007 UTC

33 * things like all the structures as globals. 33 * things like all the structures as globals.
34 */ 34 */
35 35
36#include <global.h> 36#include <global.h>
37#include <sproto.h> 37#include <sproto.h>
38
39#include "crc.h"
38 40
39#define MAX_FACE_SETS 20 /**< Maximum number of image sets the program will handle */ 41#define MAX_FACE_SETS 20 /**< Maximum number of image sets the program will handle */
40 42
41/** Information about one image */ 43/** Information about one image */
42typedef struct FaceInfo 44typedef struct FaceInfo
299 { 301 {
300 LOG (llevError, "read_client_images: Did not read desired amount of data, wanted %d, got %d\n%s", len, i, buf); 302 LOG (llevError, "read_client_images: Did not read desired amount of data, wanted %d, got %d\n%s", len, i, buf);
301 abort (); 303 abort ();
302 } 304 }
303 305
304 facesets[fileno].faces[num].checksum = 0; 306 crc32 chksum;
307
305 for (i = 0; i < len; i++) 308 for (i = 0; i < len; i++)
306 { 309 chksum (facesets[fileno].faces[num].data[i]);
307 rotate_right (facesets[fileno].faces[num].checksum); 310
308 facesets[fileno].faces[num].checksum += facesets[fileno].faces[num].data[i];
309 facesets[fileno].faces[num].checksum &= 0xffffffff; 311 facesets[fileno].faces[num].checksum = chksum;
310 }
311 } 312 }
312 313
313 close_and_delete (infile, compressed); 314 close_and_delete (infile, compressed);
314 } /* For fileno < MAX_FACE_SETS */ 315 } /* For fileno < MAX_FACE_SETS */
315} 316}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines