10 |
|
* 9/19/88 |
11 |
|
*/ |
12 |
|
|
13 |
+ |
#include "standard.h" |
14 |
|
#include "ciq.h" |
15 |
|
|
16 |
|
|
32 |
|
|
33 |
|
draw_grey(ocm); |
34 |
|
|
35 |
< |
bcopy(color,cm,sizeof color); |
35 |
> |
bcopy((char *)color,(char *)cm,sizeof color); |
36 |
|
} |
37 |
|
|
38 |
|
/*----------------------------------------------------------------------*/ |
42 |
|
{ |
43 |
|
register rgbpixel *linin; |
44 |
|
register pixel *linout; |
45 |
+ |
rgbpixel intmp; |
46 |
+ |
int outtmp; |
47 |
|
int y; |
48 |
|
register int x; |
49 |
|
|
53 |
|
for (y = 0; y < ymax; y++) { |
54 |
|
picreadline3(y, linin); |
55 |
|
for (x = 0; x < xmax; x++) { |
56 |
< |
linin[x].r = ocm[0][linin[x].r]; |
57 |
< |
linin[x].g = ocm[1][linin[x].g]; |
58 |
< |
linin[x].b = ocm[2][linin[x].b]; |
59 |
< |
linout[x] = rgb_bright(&linin[x]); |
60 |
< |
linout[x] = (linout[x]*n+n/2)/256; |
56 |
> |
intmp.r = ocm[0][linin[x].r]; |
57 |
> |
intmp.g = ocm[1][linin[x].g]; |
58 |
> |
intmp.b = ocm[2][linin[x].b]; |
59 |
> |
outtmp = rgb_bright(&intmp); |
60 |
> |
linout[x] = (outtmp*n+n/2)/256; |
61 |
|
} |
62 |
|
picwriteline(y, linout); |
63 |
|
} |