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

Comparing deliantra/server/common/image.C (file contents):
Revision 1.2 by root, Tue Aug 29 08:01:35 2006 UTC vs.
Revision 1.3 by root, Wed Aug 30 16:30:36 2006 UTC

1/* 1/*
2 * static char *rcsid_image_c = 2 * static char *rcsid_image_c =
3 * "$Id: image.C,v 1.2 2006/08/29 08:01:35 root Exp $"; 3 * "$Id: image.C,v 1.3 2006/08/30 16:30:36 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
145 FILE *fp; 145 FILE *fp;
146 146
147 sprintf(buf,"%s/faces", settings.datadir); 147 sprintf(buf,"%s/faces", settings.datadir);
148 LOG(llevDebug,"Reading faces from %s...",buf); 148 LOG(llevDebug,"Reading faces from %s...",buf);
149 if ((fp=fopen(buf,"r"))==NULL) { 149 if ((fp=fopen(buf,"r"))==NULL) {
150 LOG(llevError, "Cannot open faces file %s: %s\n", buf, strerror_local(errno)); 150 LOG(llevError, "Cannot open faces file %s: %s\n", buf, strerror(errno));
151 exit(-1); 151 exit(-1);
152 } 152 }
153 while (fgets(buf, MAX_BUF, fp)!=NULL) { 153 while (fgets(buf, MAX_BUF, fp)!=NULL) {
154 if (*buf=='#') continue; 154 if (*buf=='#') continue;
155 if (!strncmp(buf,"end",3)) { 155 if (!strncmp(buf,"end",3)) {
211 211
212 bmaps_checksum=0; 212 bmaps_checksum=0;
213 sprintf (buf,"%s/bmaps", settings.datadir); 213 sprintf (buf,"%s/bmaps", settings.datadir);
214 LOG(llevDebug,"Reading bmaps from %s...",buf); 214 LOG(llevDebug,"Reading bmaps from %s...",buf);
215 if ((fp=fopen(buf,"r"))==NULL) { 215 if ((fp=fopen(buf,"r"))==NULL) {
216 LOG(llevError, "Cannot open bmaps file %s: %s\n", buf, strerror_local(errno)); 216 LOG(llevError, "Cannot open bmaps file %s: %s\n", buf, strerror(errno));
217 exit(-1); 217 exit(-1);
218 } 218 }
219 219
220 /* First count how many bitmaps we have, so we can allocate correctly */ 220 /* First count how many bitmaps we have, so we can allocate correctly */
221 while (fgets (buf, MAX_BUF, fp)!=NULL) 221 while (fgets (buf, MAX_BUF, fp)!=NULL)
347 347
348 bmaps_checksum=0; 348 bmaps_checksum=0;
349 sprintf (buf,"%s/smooth", settings.datadir); 349 sprintf (buf,"%s/smooth", settings.datadir);
350 LOG(llevDebug,"Reading smooth from %s...",buf); 350 LOG(llevDebug,"Reading smooth from %s...",buf);
351 if ((fp=fopen(buf,"r"))==NULL) { 351 if ((fp=fopen(buf,"r"))==NULL) {
352 LOG(llevError, "Cannot open smooth file %s: %s\n", strerror_local(errno)); 352 LOG(llevError, "Cannot open smooth file %s: %s\n", strerror(errno));
353 exit(-1); 353 exit(-1);
354 } 354 }
355 355
356 /* First count how many smooth we have, so we can allocate correctly */ 356 /* First count how many smooth we have, so we can allocate correctly */
357 while (fgets (buf, MAX_BUF, fp)!=NULL) 357 while (fgets (buf, MAX_BUF, fp)!=NULL)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines