--- deliantra/server/common/image.C 2007/01/19 17:50:10 1.13 +++ deliantra/server/common/image.C 2007/02/15 15:43:36 1.16 @@ -46,16 +46,10 @@ unsigned int number; }; -void free (bmappair *); // guard to catch free when delete should be used - static struct bmappair *xbm = NULL; -/* Following can just as easily be pointers, but - * it is easier to keep them like this. - */ facetile *blank_face, *dark_faces[3], *empty_face, *smooth_face; - /* nroffiles is the actual number of bitmaps defined. * nrofpixmaps is the number of bitmaps loaded. With * the automatic generation of the bmaps file, this is now equal @@ -72,14 +66,12 @@ /** * id is the face to smooth, smooth is the 16x2 face used to smooth id. */ -struct smoothing:zero_initialised +struct smoothing : zero_initialised { uint16 id; uint16 smooth; }; -void free (smoothing *); // guard to catch free when delete should be used - /** * Contains all defined smoothing entries. smooth is an array of nrofsmooth * entries. It is sorted by smooth[].id. @@ -274,16 +266,16 @@ * data, it does the job as it lets the client know if * the file has the same data or not. */ - ROTATE_RIGHT (bmaps_checksum); + rotate_right (bmaps_checksum); bmaps_checksum += value & 0xff; bmaps_checksum &= 0xffffffff; - ROTATE_RIGHT (bmaps_checksum); + rotate_right (bmaps_checksum); bmaps_checksum += (value >> 8) & 0xff; bmaps_checksum &= 0xffffffff; for (l = 0; l < strlen (q); l++) { - ROTATE_RIGHT (bmaps_checksum); + rotate_right (bmaps_checksum); bmaps_checksum += q[l]; bmaps_checksum &= 0xffffffff; } @@ -306,10 +298,9 @@ new_faces[i].visibility = 0; new_faces[i].magicmap = 255; } + for (i = 0; i < nroffiles; i++) - { - new_faces[xbm[i].number].name = xbm[i].name; - } + new_faces[xbm[i].number].name = xbm[i].name; // non-pod datatype, likely not allowed qsort (xbm, nroffiles, sizeof (struct bmappair), (int (*)(const void *, const void *)) compar);