--- ray/src/rt/colortab.c 1990/02/09 09:14:52 1.12 +++ ray/src/rt/colortab.c 1990/03/29 12:43:07 1.14 @@ -91,6 +91,7 @@ get_pixel(col, set_pixel) /* get pixel for color */ COLOR col; int (*set_pixel)(); { + extern char errmsg[]; int r, g, b; int cv[3]; register CNODE *tp; @@ -159,6 +160,16 @@ BYTE *rmap, *gmap, *bmap; bcopy((char *)rmap, (char *)clrmap[RED], 256); bcopy((char *)gmap, (char *)clrmap[GRN], 256); bcopy((char *)bmap, (char *)clrmap[BLU], 256); +} + + +map_color(rgb, col) /* map a color to a byte triplet */ +BYTE rgb[3]; +COLOR col; +{ + rgb[RED] = map_col(col,RED); + rgb[GRN] = map_col(col,GRN); + rgb[BLU] = map_col(col,BLU); }