48 |
|
static struct tabent { |
49 |
|
long sum[3]; /* sum of colors using this entry */ |
50 |
|
int n; /* number of colors */ |
51 |
< |
BYTE ent[3]; /* current table value */ |
51 |
> |
uby8 ent[3]; /* current table value */ |
52 |
|
} *clrtab = NULL; |
53 |
|
/* color cube partition */ |
54 |
|
static CNODE *ctree = NULL; |
55 |
|
/* our color correction map */ |
56 |
< |
static BYTE clrmap[3][256]; |
56 |
> |
static uby8 clrmap[3][256]; |
57 |
|
/* histogram of colors used */ |
58 |
|
static unsigned short histo[NRED][NGRN][NBLU]; |
59 |
|
/* initial color cube boundary */ |
163 |
|
|
164 |
|
void |
165 |
|
set_cmap(rmap, gmap, bmap) /* set custom color correction map */ |
166 |
< |
BYTE *rmap, *gmap, *bmap; |
166 |
> |
uby8 *rmap, *gmap, *bmap; |
167 |
|
{ |
168 |
|
memcpy((void *)clrmap[RED], (void *)rmap, 256); |
169 |
|
memcpy((void *)clrmap[GRN], (void *)gmap, 256); |
173 |
|
|
174 |
|
void |
175 |
|
map_color(rgb, col) /* map a color to a byte triplet */ |
176 |
< |
BYTE rgb[3]; |
176 |
> |
uby8 rgb[3]; |
177 |
|
COLOR col; |
178 |
|
{ |
179 |
|
rgb[RED] = map_col(col,RED); |