blob: 0aa2b6d4f1284bac07fded94527dbb5a519c3f90 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
GBLENDER_VARS(blender,color);
int h = blit->height;
const unsigned char* src_line = blit->src_line;
unsigned char* dst_line = blit->dst_line;
/* make compiler happy */
(r)=(r);
(g)=(g);
(b)=(b);
do
{
const unsigned char* src = src_line + (blit->src_x);
unsigned char* dst = dst_line + blit->dst_x*GDST_INCR;
int w = blit->width;
do
{
int a = GBLENDER_SHADE_INDEX(src[0]);
if ( a == 0 )
{
/* nothing */
}
else if ( a == GBLENDER_SHADE_COUNT )
{
GDST_COPY(dst);
}
else
{
GBlenderPixel back;
GDST_READ(dst,back);
GBLENDER_LOOKUP( blender, back );
#ifdef GBLENDER_STORE_BYTES
GDST_STOREB(dst,_gcells,a);
#else
GDST_STOREP(dst,_gcells,a);
#endif
}
src += 1;
dst += GDST_INCR;
}
while (--w > 0);
src_line += blit->src_pitch;
dst_line += blit->dst_pitch;
}
while (--h > 0);
GBLENDER_CLOSE(blender);
|