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.9 by pippijn, Tue Jan 2 23:39:21 2007 UTC vs.
Revision 1.11 by root, Wed Jan 10 19:52:43 2007 UTC

1/* 1/*
2 CrossFire, A Multiplayer game for X-windows 2 CrossFire, A Multiplayer game for X-windows
3 3
4 Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team
4 Copyright (C) 2002 Mark Wedel & Crossfire Development Team 5 Copyright (C) 2002 Mark Wedel & Crossfire Development Team
5 Copyright (C) 1992 Frank Tore Johansen 6 Copyright (C) 1992 Frank Tore Johansen
6 7
7 This program is free software; you can redistribute it and/or modify 8 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
111static int 112static int
112compar (const struct bmappair *a, const struct bmappair *b) 113compar (const struct bmappair *a, const struct bmappair *b)
113{ 114{
114 return strcmp (a->name, b->name); 115 return strcmp (a->name, b->name);
115} 116}
117
116static int 118static int
117compar_smooth (const struct smoothing *a, const struct smoothing *b) 119compar_smooth (const struct smoothing *a, const struct smoothing *b)
118{ 120{
119 if (a->id < b->id) 121 if (a->id < b->id)
120 return -1; 122 return -1;
121 if (b->id < a->id) 123 if (b->id < a->id)
122 return 1; 124 return 1;
123 return 0; 125 return 0;
124} 126}
125 127
126
127/* 128/*
128 * Returns the matching color in the coloralias if found, 129 * Returns the matching color in the coloralias if found,
129 * 0 otherwise. Note that 0 will actually be black, so there is no 130 * 0 otherwise. Note that 0 will actually be black, so there is no
130 * way the calling function can tell if an error occurred or not 131 * way the calling function can tell if an error occurred or not
131 */ 132 */
132
133static uint8 133static uint8
134find_color (const char *name) 134find_color (const char *name)
135{ 135{
136 uint8 i; 136 uint8 i;
137 137
143} 143}
144 144
145/* This reads the lib/faces file, getting color and visibility information. 145/* This reads the lib/faces file, getting color and visibility information.
146 * it is called by ReadBmapNames. 146 * it is called by ReadBmapNames.
147 */ 147 */
148
149static void 148static void
150ReadFaceData (void) 149ReadFaceData (void)
151{ 150{
152 char buf[MAX_BUF], *cp; 151 char buf[MAX_BUF], *cp;
153 New_Face *on_face = NULL; 152 New_Face *on_face = NULL;
216 on_face->magicmap |= FACE_FLOOR; 215 on_face->magicmap |= FACE_FLOOR;
217 } 216 }
218 else 217 else
219 LOG (llevDebug, "Got unknown line in faces file: %s\n", buf); 218 LOG (llevDebug, "Got unknown line in faces file: %s\n", buf);
220 } 219 }
220
221 LOG (llevDebug, "done\n"); 221 LOG (llevDebug, "done\n");
222 fclose (fp); 222 fclose (fp);
223} 223}
224 224
225/* This reads the bmaps file to get all the bitmap names and 225/* This reads the bmaps file to get all the bitmap names and
226 * stuff. It only needs to be done once, because it is player 226 * stuff. It only needs to be done once, because it is player
227 * independent (ie, what display the person is on will not make a 227 * independent (ie, what display the person is on will not make a
228 * difference.) 228 * difference.)
229 */ 229 */
230
231void 230void
232ReadBmapNames (void) 231ReadBmapNames (void)
233{ 232{
234 char buf[MAX_BUF], *p, *q; 233 char buf[MAX_BUF], *p, *q;
235 FILE *fp; 234 FILE *fp;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines