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.10 by pippijn, Sat Jan 6 14:42:28 2007 UTC vs.
Revision 1.11 by root, Wed Jan 10 19:52:43 2007 UTC

112static int 112static int
113compar (const struct bmappair *a, const struct bmappair *b) 113compar (const struct bmappair *a, const struct bmappair *b)
114{ 114{
115 return strcmp (a->name, b->name); 115 return strcmp (a->name, b->name);
116} 116}
117
117static int 118static int
118compar_smooth (const struct smoothing *a, const struct smoothing *b) 119compar_smooth (const struct smoothing *a, const struct smoothing *b)
119{ 120{
120 if (a->id < b->id) 121 if (a->id < b->id)
121 return -1; 122 return -1;
122 if (b->id < a->id) 123 if (b->id < a->id)
123 return 1; 124 return 1;
124 return 0; 125 return 0;
125} 126}
126 127
127
128/* 128/*
129 * Returns the matching color in the coloralias if found, 129 * Returns the matching color in the coloralias if found,
130 * 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
131 * 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
132 */ 132 */
133
134static uint8 133static uint8
135find_color (const char *name) 134find_color (const char *name)
136{ 135{
137 uint8 i; 136 uint8 i;
138 137
144} 143}
145 144
146/* This reads the lib/faces file, getting color and visibility information. 145/* This reads the lib/faces file, getting color and visibility information.
147 * it is called by ReadBmapNames. 146 * it is called by ReadBmapNames.
148 */ 147 */
149
150static void 148static void
151ReadFaceData (void) 149ReadFaceData (void)
152{ 150{
153 char buf[MAX_BUF], *cp; 151 char buf[MAX_BUF], *cp;
154 New_Face *on_face = NULL; 152 New_Face *on_face = NULL;
217 on_face->magicmap |= FACE_FLOOR; 215 on_face->magicmap |= FACE_FLOOR;
218 } 216 }
219 else 217 else
220 LOG (llevDebug, "Got unknown line in faces file: %s\n", buf); 218 LOG (llevDebug, "Got unknown line in faces file: %s\n", buf);
221 } 219 }
220
222 LOG (llevDebug, "done\n"); 221 LOG (llevDebug, "done\n");
223 fclose (fp); 222 fclose (fp);
224} 223}
225 224
226/* 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
227 * 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
228 * 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
229 * difference.) 228 * difference.)
230 */ 229 */
231
232void 230void
233ReadBmapNames (void) 231ReadBmapNames (void)
234{ 232{
235 char buf[MAX_BUF], *p, *q; 233 char buf[MAX_BUF], *p, *q;
236 FILE *fp; 234 FILE *fp;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines