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.12 by pippijn, Mon Jan 15 21:06:18 2007 UTC vs.
Revision 1.13 by root, Fri Jan 19 17:50:10 2007 UTC

1/* 1/*
2 * CrossFire, A Multiplayer game for X-windows 2 * CrossFire, A Multiplayer game
3 * 3 *
4 * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team 4 * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team
5 * Copyright (C) 2002 Mark Wedel & Crossfire Development Team 5 * Copyright (C) 2002 Mark Wedel & Crossfire Development Team
6 * Copyright (C) 1992 Frank Tore Johansen 6 * Copyright (C) 1992 Frank Tore Johansen
7 * 7 *
24 24
25 25
26#include <global.h> 26#include <global.h>
27#include <stdio.h> 27#include <stdio.h>
28 28
29New_Face *new_faces; 29facetile *new_faces;
30 30
31/* bmappair and xbm are used when looking for the image id numbers 31/* bmappair and xbm are used when looking for the image id numbers
32 * of a face by name. xbm is sorted alphabetically so that bsearch 32 * of a face by name. xbm is sorted alphabetically so that bsearch
33 * can be used to quickly find the entry for a name. the number is 33 * can be used to quickly find the entry for a name. the number is
34 * then an index into the new_faces array. 34 * then an index into the new_faces array.
51static struct bmappair *xbm = NULL; 51static struct bmappair *xbm = NULL;
52 52
53/* Following can just as easily be pointers, but 53/* Following can just as easily be pointers, but
54 * it is easier to keep them like this. 54 * it is easier to keep them like this.
55 */ 55 */
56New_Face *blank_face, *dark_faces[3], *empty_face, *smooth_face; 56facetile *blank_face, *dark_faces[3], *empty_face, *smooth_face;
57 57
58 58
59/* nroffiles is the actual number of bitmaps defined. 59/* nroffiles is the actual number of bitmaps defined.
60 * nrofpixmaps is the number of bitmaps loaded. With 60 * nrofpixmaps is the number of bitmaps loaded. With
61 * the automatic generation of the bmaps file, this is now equal 61 * the automatic generation of the bmaps file, this is now equal
147 */ 147 */
148static void 148static void
149ReadFaceData (void) 149ReadFaceData (void)
150{ 150{
151 char buf[MAX_BUF], *cp; 151 char buf[MAX_BUF], *cp;
152 New_Face *on_face = NULL; 152 facetile *on_face = NULL;
153 FILE *fp; 153 FILE *fp;
154 154
155 sprintf (buf, "%s/faces", settings.datadir); 155 sprintf (buf, "%s/faces", settings.datadir);
156 LOG (llevDebug, "Reading faces from %s...\n", buf); 156 LOG (llevDebug, "Reading faces from %s...\n", buf);
157 if ((fp = fopen (buf, "r")) == NULL) 157 if ((fp = fopen (buf, "r")) == NULL)
295 } 295 }
296 fclose (fp); 296 fclose (fp);
297 297
298 LOG (llevDebug, "done (got %d/%d/%d)\n", nrofpixmaps, nrofbmaps, nroffiles); 298 LOG (llevDebug, "done (got %d/%d/%d)\n", nrofpixmaps, nrofbmaps, nroffiles);
299 299
300 new_faces = new New_Face[nrofpixmaps]; 300 new_faces = new facetile[nrofpixmaps];
301 301
302 for (i = 0; i < nrofpixmaps; i++) 302 for (i = 0; i < nrofpixmaps; i++)
303 { 303 {
304 new_faces[i].name = ""; 304 new_faces[i].name = "";
305 new_faces[i].number = i; 305 new_faces[i].number = i;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines