ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/colortab.c
(Generate patch)

Comparing ray/src/rt/colortab.c (file contents):
Revision 1.11 by greg, Fri Jan 19 00:00:37 1990 UTC vs.
Revision 1.14 by greg, Thu Mar 29 12:43:07 1990 UTC

# Line 91 | Line 91 | get_pixel(col, set_pixel)      /* get pixel for color */
91   COLOR   col;
92   int     (*set_pixel)();
93   {
94 +        extern char     errmsg[];
95          int     r, g, b;
96          int     cv[3];
97          register CNODE  *tp;
# Line 129 | Line 130 | int    (*set_pixel)();
130                  clrtab[h].ent[RED] = r;
131                  clrtab[h].ent[GRN] = g; /* reassign pixel */
132                  clrtab[h].ent[BLU] = b;
133 < #ifdef notdef
134 <                printf("pixel %d = (%d,%d,%d) (%d refs)\n",
133 > #ifdef DEBUG
134 >                sprintf(errmsg, "pixel %d = (%d,%d,%d) (%d refs)\n",
135                                  h, r, g, b, clrtab[h].n);
136 +                eputs(errmsg);
137   #endif
138                  (*set_pixel)(h, r, g, b);
139          }
# Line 158 | Line 160 | BYTE   *rmap, *gmap, *bmap;
160          bcopy((char *)rmap, (char *)clrmap[RED], 256);
161          bcopy((char *)gmap, (char *)clrmap[GRN], 256);
162          bcopy((char *)bmap, (char *)clrmap[BLU], 256);
163 + }
164 +
165 +
166 + map_color(rgb, col)             /* map a color to a byte triplet */
167 + BYTE    rgb[3];
168 + COLOR   col;
169 + {
170 +        rgb[RED] = map_col(col,RED);
171 +        rgb[GRN] = map_col(col,GRN);
172 +        rgb[BLU] = map_col(col,BLU);
173   }
174  
175  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines