1 /* $Id: segment.c,v 1.3 2003-10-10 09:36:35 btb Exp $ */
5 * Segment Loading Stuff
18 static char rcsid[] = "$Id: segment.c,v 1.3 2003-10-10 09:36:35 btb Exp $";
23 * reads a segment2 structure from a CFILE
25 void segment2_read(segment2 *s2, CFILE *fp)
27 s2->special = cfile_read_byte(fp);
28 s2->matcen_num = cfile_read_byte(fp);
29 s2->value = cfile_read_byte(fp);
30 s2->s2_flags = cfile_read_byte(fp);
31 s2->static_light = cfile_read_fix(fp);
35 * reads a delta_light structure from a CFILE
37 void delta_light_read(delta_light *dl, CFILE *fp)
39 dl->segnum = cfile_read_short(fp);
40 dl->sidenum = cfile_read_byte(fp);
41 dl->dummy = cfile_read_byte(fp);
42 dl->vert_light[0] = cfile_read_byte(fp);
43 dl->vert_light[1] = cfile_read_byte(fp);
44 dl->vert_light[2] = cfile_read_byte(fp);
45 dl->vert_light[3] = cfile_read_byte(fp);
50 * reads a dl_index structure from a CFILE
52 void dl_index_read(dl_index *di, CFILE *fp)
54 di->segnum = cfile_read_short(fp);
55 di->sidenum = cfile_read_byte(fp);
56 di->count = cfile_read_byte(fp);
57 di->index = cfile_read_short(fp);