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