--- ray/src/rt/colortab.c 1989/10/03 11:10:10 1.3 +++ ray/src/rt/colortab.c 1989/10/03 14:06:58 1.4 @@ -30,11 +30,9 @@ static char SCCSid[] = "$SunId$ LBL"; #define MAXDST2 5 /* maximum frame buffer depth */ #define FBDEPTH 8 - /* color map resolution */ -#define MAPSIZ 256 /* map a color */ -#define map_col(c,p) clrmap[ colval(c,p)<1. ? \ - (int)(colval(c,p)*MAPSIZ) : MAPSIZ-1 ] +#define map_col(c,p) clrmap[p][ colval(c,p)<1. ? \ + (int)(colval(c,p)*256.) : 255 ] /* color partition tree */ #define CNODE short #define set_branch(p,c) ((c)<<2|(p)) @@ -50,26 +48,21 @@ struct tabent { short ent[3]; /* current table value */ } clrtab[1< 1< 1<