32{
34 const Uint32 modulateR = info->
r;
35 const Uint32 modulateG = info->
g;
36 const Uint32 modulateB = info->
b;
37 const Uint32 modulateA = info->
a;
39 Uint32 srcR, srcG, srcB, srcA;
41 Uint32 dstR, dstG, dstB, dstA;
42 int srcy, srcx;
43 int posy, posx;
44 int incy, incx;
49 Uint32 rgbmask = ~src_fmt->Amask;
51
52 srcy = 0;
53 posy = 0;
56
57 while (info->
dst_h--) {
61 srcx = -1;
62 posx = 0x10000L;
63 while (posy >= 0x10000L) {
64 ++srcy;
65 posy -= 0x10000L;
66 }
68 if (posx >= 0x10000L) {
69 while (posx >= 0x10000L) {
70 ++srcx;
71 posx -= 0x10000L;
72 }
74 (info->
src + (srcy * info->
src_pitch) + (srcx * srcbpp));
75 }
78 srcB, srcA);
79 } else {
81 srcB);
82 srcA = 0xFF;
83 }
85
86 if (srcbpp == 3) {
87 srcpixel = (srcR << src_fmt->
Rshift) |
89 }
90 if ((srcpixel & rgbmask) == ckey) {
91 posx += incx;
93 continue;
94 }
95 }
98 dstB, dstA);
99 } else {
101 dstB);
102 dstA = 0xFF;
103 }
104
106 srcR = (srcR * modulateR) / 255;
107 srcG = (srcG * modulateG) / 255;
108 srcB = (srcB * modulateB) / 255;
109 }
111 srcA = (srcA * modulateA) / 255;
112 }
114
115 if (srcA < 255) {
116 srcR = (srcR * srcA) / 255;
117 srcG = (srcG * srcA) / 255;
118 srcB = (srcB * srcA) / 255;
119 }
120 }
122 case 0:
123 dstR = srcR;
124 dstG = srcG;
125 dstB = srcB;
126 dstA = srcA;
127 break;
129 dstR = srcR + ((255 - srcA) * dstR) / 255;
130 dstG = srcG + ((255 - srcA) * dstG) / 255;
131 dstB = srcB + ((255 - srcA) * dstB) / 255;
132 dstA = srcA + ((255 - srcA) * dstA) / 255;
133 break;
135 dstR = srcR + dstR;
136 if (dstR > 255)
137 dstR = 255;
138 dstG = srcG + dstG;
139 if (dstG > 255)
140 dstG = 255;
141 dstB = srcB + dstB;
142 if (dstB > 255)
143 dstB = 255;
144 break;
146 dstR = (srcR * dstR) / 255;
147 dstG = (srcG * dstG) / 255;
148 dstB = (srcB * dstB) / 255;
149 break;
150 }
151 if (dst_fmt->
Amask) {
153 } else {
155 }
156 posx += incx;
158 }
159 posy += incy;
161 }
162}
#define ASSEMBLE_RGBA(buf, bpp, fmt, r, g, b, a)
#define DISEMBLE_RGB(buf, bpp, fmt, Pixel, r, g, b)
#define DISEMBLE_RGBA(buf, bpp, fmt, Pixel, r, g, b, a)
#define ASSEMBLE_RGB(buf, bpp, fmt, r, g, b)
#define SDL_COPY_MODULATE_COLOR
#define SDL_COPY_COLORKEY
#define SDL_COPY_MODULATE_ALPHA
SDL_PixelFormat * src_fmt
SDL_PixelFormat * dst_fmt