convert line ends
[canaan.git] / prj / tech / libsrc / g2 / f16pm.c
blobeb2388d486ac3ce25780e60d4b967ceec5d7f6f2
1 // $Header: x:/prj/tech/libsrc/g2/RCS/f16pm.c 1.2 1998/04/03 16:39:07 KEVIN Exp $
3 #include <dev2d.h>
4 #include <lgassert.h>
6 extern void gen_upmap_setup(grs_bitmap *bm);
7 extern void gen_lit_upmap_setup(grs_bitmap *bm);
9 void flat16_upmap_setup(grs_bitmap *bm)
11 uint ft = gr_get_fill_type();
13 AssertMsg(bm->type<BMT_TYPES,"flat8_ulmap_setup(): invalid bitmap type!");
14 if ((bm->type == BMT_FLAT16)&&
15 ((bm->flags&BMF_TRANS)==0)&&
16 (ft == FILL_NORM)) {
18 extern void g2ptmap_setup_unlit16(grs_bitmap *bm);
20 g2ptmap_setup_unlit16(bm);
22 else
23 gen_upmap_setup(bm);
26 void flat16_lit_upmap_setup(grs_bitmap *bm)
28 uint ft = gr_get_fill_type();
30 AssertMsg(bm->type<BMT_TYPES,"flat8_ulmap_setup(): invalid bitmap type!");
31 if ((bm->type == BMT_FLAT8)&&
32 ((bm->flags&BMF_TRANS)==0)&&
33 (ft == FILL_NORM)&&
34 (grd_ltab816_list!=NULL))
36 extern void g2ptmap_setup_lit16(grs_bitmap *bm);
38 grd_ltab816 = grd_ltab816_list[bm->align];
39 AssertMsg(grd_ltab816!=NULL, "flat16_lit_upmap_setup(): Null 8 to 16 lighting table!");
40 g2ptmap_setup_lit16(bm);
42 else
43 gen_lit_upmap_setup(bm);