Mercurial > hg > dmlib
annotate dmblitfunc.h @ 232:79dac918c81e
Modularize line clipping etc. a lot, and export all line drawing and
blitting functions.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 08 Oct 2012 09:01:05 +0300 |
parents | afa28947e400 |
children | eba3b87f3f84 |
rev | line source |
---|---|
0 | 1 /* |
2 * DMLib | |
3 * -- Sprite / surface blitting functions | |
4 * Programmed and designed by Matti 'ccr' Hamalainen | |
5 * (C) Copyright 2011-2012 Tecnic Software productions (TNSP) | |
6 */ | |
7 | |
8 // ======================================================================= | |
9 // DMD_NONE | |
10 // ======================================================================= | |
11 | |
85 | 12 #define DM_BLITFUNC_NAME dmScaledBlitSurface8to8 |
13 #define DM_BLITFUNC_SRC_BYTES 1 | |
14 #define DM_BLITFUNC_DST_BYTES 1 | |
15 #define DM_BLITFUNC_SRC_TYPE Uint8 | |
16 #define DM_BLITFUNC_DST_TYPE Uint8 | |
0 | 17 |
85 | 18 #define DM_BLITFUNC_INNER *dp++ = sp[FP_GETH(xv)]; |
0 | 19 |
20 #include "dmscaledblit.h" | |
21 | |
22 // ----------------------------------------------------------------------- | |
23 | |
85 | 24 #define DM_BLITFUNC_NAME dmScaledBlitSurface8to32 |
25 #define DM_BLITFUNC_SRC_BYTES 1 | |
26 #define DM_BLITFUNC_DST_BYTES 4 | |
27 #define DM_BLITFUNC_SRC_TYPE Uint8 | |
28 #define DM_BLITFUNC_DST_TYPE Uint32 | |
0 | 29 |
85 | 30 #define DM_BLITFUNC_VARS const Uint32 *pal; |
31 #define DM_BLITFUNC_INIT \ | |
0 | 32 if (src->format->palette == NULL || src->format->palette->ncolors < 256) return -2; \ |
33 pal = (Uint32 *) src->format->palette->colors; | |
34 | |
85 | 35 #define DM_BLITFUNC_INNER *dp++ = pal[sp[FP_GETH(xv)]]; |
0 | 36 |
37 #include "dmscaledblit.h" | |
38 | |
39 // ----------------------------------------------------------------------- | |
40 | |
85 | 41 #define DM_BLITFUNC_NAME dmScaledBlitSurface32to32 |
42 #define DM_BLITFUNC_SRC_BYTES 4 | |
43 #define DM_BLITFUNC_DST_BYTES 4 | |
44 #define DM_BLITFUNC_SRC_TYPE Uint32 | |
45 #define DM_BLITFUNC_DST_TYPE Uint32 | |
46 #define DM_BLITFUNC_INIT | |
47 #define DM_BLITFUNC_INNER *dp++ = sp[FP_GETH(xv)]; | |
0 | 48 |
49 #include "dmscaledblit.h" | |
50 | |
51 | |
52 // ======================================================================= | |
53 // DMD_TRANSPARENT | |
54 // ======================================================================= | |
55 | |
85 | 56 #define DM_BLITFUNC_NAME dmScaledBlitSurface8to8Transparent |
57 #define DM_BLITFUNC_SRC_BYTES 1 | |
58 #define DM_BLITFUNC_DST_BYTES 1 | |
59 #define DM_BLITFUNC_SRC_TYPE Uint8 | |
60 #define DM_BLITFUNC_DST_TYPE Uint8 | |
0 | 61 |
85 | 62 #define DM_BLITFUNC_INNER \ |
0 | 63 *dp = sp[FP_GETH(xv)] ? sp[FP_GETH(xv)] : *dp; dp++; |
64 | |
65 #include "dmscaledblit.h" | |
66 | |
67 // ----------------------------------------------------------------------- | |
68 | |
85 | 69 #define DM_BLITFUNC_NAME dmScaledBlitSurface8to32Transparent |
70 #define DM_BLITFUNC_SRC_BYTES 1 | |
71 #define DM_BLITFUNC_DST_BYTES 4 | |
72 #define DM_BLITFUNC_SRC_TYPE Uint8 | |
73 #define DM_BLITFUNC_DST_TYPE DMRGBA32 | |
74 #define DM_BLITFUNC_VARS const DMRGBA32 *pal; | |
75 #define DM_BLITFUNC_INIT \ | |
0 | 76 if (src->format->palette == NULL || src->format->palette->ncolors < 256) return -2; \ |
77 pal = (DMRGBA32 *) src->format->palette->colors; | |
78 | |
85 | 79 #define DM_BLITFUNC_INNER \ |
0 | 80 const DMRGBA32 q = pal[sp[FP_GETH(xv)]]; \ |
81 dp->r += ((q.r - dp->r) * q.a) >> 8; \ | |
82 dp->g += ((q.g - dp->g) * q.a) >> 8; \ | |
83 dp->b += ((q.b - dp->b) * q.a) >> 8; \ | |
84 dp->a = q.a; \ | |
85 dp++; | |
86 | |
87 #include "dmscaledblit.h" | |
88 | |
89 | |
90 // ----------------------------------------------------------------------- | |
91 | |
85 | 92 #define DM_BLITFUNC_NAME dmScaledBlitSurface32to32Transparent |
93 #define DM_BLITFUNC_SRC_BYTES 4 | |
94 #define DM_BLITFUNC_DST_BYTES 4 | |
0 | 95 |
96 #ifdef DM_USE_SIMD | |
85 | 97 #define DM_BLITFUNC_VARS \ |
21 | 98 const Uint32 qpdmask = 0xff000000; \ |
12
35b0c83af3ca
MMX-version of scaled 32-bit RGBA alpha blending blit works now.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
99 const Uint64 qpdrm = 0xff00ff00ff00ffULL; |
0 | 100 |
85 | 101 #define DM_BLITFUNC_SRC_TYPE Uint32 |
102 #define DM_BLITFUNC_DST_TYPE Uint32 | |
128
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
103 #define DM_BLITFUNC_INNER \ |
0 | 104 asm( \ |
105 "movd %2, %%mm1\n" \ | |
12
35b0c83af3ca
MMX-version of scaled 32-bit RGBA alpha blending blit works now.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
106 \ |
35b0c83af3ca
MMX-version of scaled 32-bit RGBA alpha blending blit works now.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
107 "movd %3, %%mm2\n" \ |
13
07bace8425d9
Optimize the scaled RGBA alpha blit MMX version further.
Matti Hamalainen <ccr@tnsp.org>
parents:
12
diff
changeset
|
108 "movq %%mm1, %%mm5\n" \ |
07bace8425d9
Optimize the scaled RGBA alpha blit MMX version further.
Matti Hamalainen <ccr@tnsp.org>
parents:
12
diff
changeset
|
109 "pand %%mm2, %%mm5\n" \ |
07bace8425d9
Optimize the scaled RGBA alpha blit MMX version further.
Matti Hamalainen <ccr@tnsp.org>
parents:
12
diff
changeset
|
110 "psrlw $8, %%mm5\n" \ |
07bace8425d9
Optimize the scaled RGBA alpha blit MMX version further.
Matti Hamalainen <ccr@tnsp.org>
parents:
12
diff
changeset
|
111 "punpcklwd %%mm5, %%mm5\n" \ |
07bace8425d9
Optimize the scaled RGBA alpha blit MMX version further.
Matti Hamalainen <ccr@tnsp.org>
parents:
12
diff
changeset
|
112 "punpckhwd %%mm5, %%mm5\n" \ |
0 | 113 \ |
13
07bace8425d9
Optimize the scaled RGBA alpha blit MMX version further.
Matti Hamalainen <ccr@tnsp.org>
parents:
12
diff
changeset
|
114 "pxor %%mm2, %%mm2\n" \ |
0 | 115 "movd %1, %%mm3\n" \ |
116 "punpcklbw %%mm2, %%mm1\n" \ | |
13
07bace8425d9
Optimize the scaled RGBA alpha blit MMX version further.
Matti Hamalainen <ccr@tnsp.org>
parents:
12
diff
changeset
|
117 "punpcklbw %%mm2, %%mm3\n" \ |
12
35b0c83af3ca
MMX-version of scaled 32-bit RGBA alpha blending blit works now.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
118 \ |
0 | 119 "psubw %%mm3, %%mm1\n" \ |
12
35b0c83af3ca
MMX-version of scaled 32-bit RGBA alpha blending blit works now.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
120 "pmullw %%mm5, %%mm1\n" \ |
35b0c83af3ca
MMX-version of scaled 32-bit RGBA alpha blending blit works now.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
121 "psraw $8, %%mm1\n" \ |
35b0c83af3ca
MMX-version of scaled 32-bit RGBA alpha blending blit works now.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
122 "paddw %%mm3, %%mm1\n" \ |
13
07bace8425d9
Optimize the scaled RGBA alpha blit MMX version further.
Matti Hamalainen <ccr@tnsp.org>
parents:
12
diff
changeset
|
123 "pand %4, %%mm1\n" \ |
0 | 124 "packuswb %%mm2, %%mm1\n" \ |
125 "movd %%mm1, %0\n" \ | |
126 : "=m" (*dp) \ | |
12
35b0c83af3ca
MMX-version of scaled 32-bit RGBA alpha blending blit works now.
Matti Hamalainen <ccr@tnsp.org>
parents:
10
diff
changeset
|
127 : "m" (*dp), "m" (sp[FP_GETH(xv)]), "m" (qpdmask), "m" (qpdrm) \ |
17
a60fe802636a
Add register clobbers to SIMD inline asm.
Matti Hamalainen <ccr@tnsp.org>
parents:
14
diff
changeset
|
128 : "memory", "%mm1", "%mm2", "%mm3", "%mm4", "%mm5" ); dp++; |
0 | 129 |
85 | 130 #define DM_BLITFUNC_FINISH asm("emms\n"); |
13
07bace8425d9
Optimize the scaled RGBA alpha blit MMX version further.
Matti Hamalainen <ccr@tnsp.org>
parents:
12
diff
changeset
|
131 |
0 | 132 #else |
21 | 133 |
85 | 134 #define DM_BLITFUNC_SRC_TYPE DMRGBA32 |
135 #define DM_BLITFUNC_DST_TYPE DMRGBA32 | |
136 #define DM_BLITFUNC_INNER \ | |
0 | 137 const DMRGBA32 q = sp[FP_GETH(xv)]; \ |
138 dp->r += ((q.r - dp->r) * q.a) >> 8; \ | |
139 dp->g += ((q.g - dp->g) * q.a) >> 8; \ | |
140 dp->b += ((q.b - dp->b) * q.a) >> 8; \ | |
141 dp->a = q.a; \ | |
142 dp++; | |
143 #endif | |
144 | |
145 #include "dmscaledblit.h" | |
146 | |
147 // ----------------------------------------------------------------------- | |
148 | |
85 | 149 #define DM_BLITFUNC_NAME dmScaledBlitSurface32to32TransparentX |
150 #define DM_BLITFUNC_SRC_BYTES 4 | |
151 #define DM_BLITFUNC_DST_BYTES 4 | |
152 #define DM_BLITFUNC_SRC_TYPE DMRGBA32 | |
153 #define DM_BLITFUNC_DST_TYPE DMRGBA32 | |
154 #define DM_BLITFUNC_INIT | |
0 | 155 |
85 | 156 #define DM_BLITFUNC_INNER \ |
0 | 157 const DMRGBA32 q = sp[FP_GETH(xv)]; \ |
14
a40c266a71a2
Bitshift less in dmScaledBlitSurface32to32TransparentX()
Matti Hamalainen <ccr@tnsp.org>
parents:
13
diff
changeset
|
158 dp->r = (q.r * q.a + dp->r * dp->a) >> 8; \ |
a40c266a71a2
Bitshift less in dmScaledBlitSurface32to32TransparentX()
Matti Hamalainen <ccr@tnsp.org>
parents:
13
diff
changeset
|
159 dp->g = (q.g * q.a + dp->g * dp->a) >> 8; \ |
a40c266a71a2
Bitshift less in dmScaledBlitSurface32to32TransparentX()
Matti Hamalainen <ccr@tnsp.org>
parents:
13
diff
changeset
|
160 dp->b = (q.b * q.a + dp->b * dp->a) >> 8; \ |
0 | 161 dp->a = q.a ? q.a : dp->a; \ |
162 dp++; | |
163 | |
164 #include "dmscaledblit.h" | |
165 | |
166 | |
18
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
167 // ----------------------------------------------------------------------- |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
168 |
85 | 169 #define DM_BLITFUNC_NAME dmScaledBlitSurface32to32TransparentGA |
170 #define DM_BLITFUNC_SRC_BYTES 4 | |
171 #define DM_BLITFUNC_DST_BYTES 4 | |
172 #define DM_BLITFUNC_ARGS , Uint32 alpha | |
18
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
173 |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
174 #ifdef DM_USE_SIMD |
85 | 175 #define DM_BLITFUNC_VARS \ |
128
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
176 const Uint32 qpdmask = 0xff000000; \ |
18
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
177 const Uint64 qpdrm = 0xff00ff00ff00ffULL; |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
178 |
85 | 179 #define DM_BLITFUNC_SRC_TYPE Uint32 |
180 #define DM_BLITFUNC_DST_TYPE Uint32 | |
181 #define DM_BLITFUNC_INNER_INIT \ | |
18
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
182 asm( \ |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
183 "movd %0, %%mm4\n" \ |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
184 "punpcklwd %%mm4, %%mm4\n" \ |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
185 "punpckldq %%mm4, %%mm4\n" \ |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
186 : \ |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
187 : "m" (alpha) \ |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
188 : "%mm4" ); |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
189 |
128
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
190 #define DM_BLITFUNC_INNER \ |
18
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
191 asm( \ |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
192 "movd %2, %%mm1\n" \ |
128
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
193 \ |
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
194 "movd %3, %%mm2\n" \ |
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
195 "movq %%mm1, %%mm5\n" \ |
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
196 "pand %%mm2, %%mm5\n" \ |
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
197 "psrlw $8, %%mm5\n" \ |
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
198 "punpcklwd %%mm5, %%mm5\n" \ |
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
199 "punpckhwd %%mm5, %%mm5\n" \ |
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
200 \ |
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
201 "pmullw %%mm4, %%mm5\n" \ |
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
202 "psrlw $8, %%mm5\n" \ |
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
203 \ |
18
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
204 "pxor %%mm2, %%mm2\n" \ |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
205 "movd %1, %%mm3\n" \ |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
206 "punpcklbw %%mm2, %%mm1\n" \ |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
207 "punpcklbw %%mm2, %%mm3\n" \ |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
208 \ |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
209 "psubw %%mm3, %%mm1\n" \ |
128
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
210 "pmullw %%mm5, %%mm1\n" \ |
18
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
211 "psraw $8, %%mm1\n" \ |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
212 "paddw %%mm3, %%mm1\n" \ |
128
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
213 "pand %4, %%mm1\n" \ |
18
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
214 "packuswb %%mm2, %%mm1\n" \ |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
215 "movd %%mm1, %0\n" \ |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
216 : "=m" (*dp) \ |
128
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
217 : "m" (*dp), "m" (sp[FP_GETH(xv)]), "m" (qpdmask), "m" (qpdrm) \ |
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
218 : "memory", "%mm1", "%mm2", "%mm3", "%mm4", "%mm5" ); dp++; |
18
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
219 |
85 | 220 #define DM_BLITFUNC_FINISH asm("emms\n"); |
18
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
221 |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
222 #else |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
223 |
85 | 224 #define DM_BLITFUNC_SRC_TYPE DMRGBA32 |
225 #define DM_BLITFUNC_DST_TYPE DMRGBA32 | |
226 #define DM_BLITFUNC_INNER \ | |
18
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
227 const DMRGBA32 q = sp[FP_GETH(xv)]; \ |
128
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
228 const int a = (alpha * q.a) >> 8; \ |
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
229 dp->r += ((q.r - dp->r) * a) >> 8; \ |
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
230 dp->g += ((q.g - dp->g) * a) >> 8; \ |
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
231 dp->b += ((q.b - dp->b) * a) >> 8; \ |
afa28947e400
Improve transparent GA alpha scaled blitting function.
Matti Hamalainen <ccr@tnsp.org>
parents:
95
diff
changeset
|
232 dp->a = a; |
18
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
233 dp++; |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
234 #endif |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
235 |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
236 #include "dmscaledblit.h" |
022eee2e7de6
Add dmScaledBlitSurface32to32TransparentGA().
Matti Hamalainen <ccr@tnsp.org>
parents:
17
diff
changeset
|
237 |
0 | 238 // ======================================================================= |
239 // DMD_SATURATE | |
240 // ======================================================================= | |
241 | |
85 | 242 #define DM_BLITFUNC_NAME dmScaledBlitSurface8to8Saturate |
243 #define DM_BLITFUNC_SRC_BYTES 1 | |
244 #define DM_BLITFUNC_DST_BYTES 1 | |
245 #define DM_BLITFUNC_SRC_TYPE Uint8 | |
246 #define DM_BLITFUNC_DST_TYPE Uint8 | |
247 #define DM_BLITFUNC_INNER \ | |
92 | 248 const int q = sp[FP_GETH(xv)] + *dp; \ |
81
ba1987562a73
Fix 8to8 saturated scaled blit function.
Matti Hamalainen <ccr@tnsp.org>
parents:
21
diff
changeset
|
249 *(dp++) = q < 256 ? q : 255; |
ba1987562a73
Fix 8to8 saturated scaled blit function.
Matti Hamalainen <ccr@tnsp.org>
parents:
21
diff
changeset
|
250 |
0 | 251 #include "dmscaledblit.h" |
252 | |
253 // ----------------------------------------------------------------------- | |
254 | |
85 | 255 #define DM_BLITFUNC_NAME dmScaledBlitSurface8to32Saturate |
256 #define DM_BLITFUNC_SRC_BYTES 1 | |
257 #define DM_BLITFUNC_DST_BYTES 4 | |
258 #define DM_BLITFUNC_SRC_TYPE Uint8 | |
259 #define DM_BLITFUNC_DST_TYPE DMRGBA32 | |
260 #define DM_BLITFUNC_VARS const DMRGBA32 *pal; | |
261 #define DM_BLITFUNC_INIT \ | |
0 | 262 if (src->format->palette == NULL || src->format->palette->ncolors < 256) return -2; \ |
263 pal = (DMRGBA32 *) src->format->palette->colors; | |
264 | |
265 #ifdef DM_USE_SIMD | |
85 | 266 #define DM_BLITFUNC_INNER \ |
0 | 267 asm("movd %2, %%mm1\n" \ |
268 "movd %1, %%mm2\n" \ | |
269 "paddusb %%mm2, %%mm1\n" \ | |
270 "movd %%mm1, %0\n" \ | |
271 : "=m" (*dp) \ | |
272 : "m" (*dp), "m" (pal[sp[FP_GETH(xv)]]) \ | |
17
a60fe802636a
Add register clobbers to SIMD inline asm.
Matti Hamalainen <ccr@tnsp.org>
parents:
14
diff
changeset
|
273 : "memory", "%mm1", "%mm2" ); dp++; |
0 | 274 |
85 | 275 #define DM_BLITFUNC_FINISH asm("emms\n"); |
0 | 276 #else |
85 | 277 #define DM_BLITFUNC_INNER \ |
0 | 278 const DMRGBA32 q = pal[sp[FP_GETH(xv)]]; \ |
279 const int qr = dp->r + q.r, qg = dp->g + q.g, qb = dp->b + q.b; \ | |
280 dp->r = qr < 256 ? qr : 255; \ | |
281 dp->g = qg < 256 ? qg : 255; \ | |
282 dp->b = qb < 256 ? qb : 255; \ | |
283 dp->a = q.a; \ | |
284 dp++; | |
285 #endif | |
286 | |
287 #include "dmscaledblit.h" | |
288 | |
289 // ----------------------------------------------------------------------- | |
290 | |
85 | 291 #define DM_BLITFUNC_NAME dmScaledBlitSurface32to32Saturate |
292 #define DM_BLITFUNC_SRC_BYTES 4 | |
293 #define DM_BLITFUNC_DST_BYTES 4 | |
294 #define DM_BLITFUNC_INIT | |
0 | 295 |
296 #ifdef DM_USE_SIMD | |
85 | 297 #define DM_BLITFUNC_SRC_TYPE Uint32 |
298 #define DM_BLITFUNC_DST_TYPE Uint32 | |
299 #define DM_BLITFUNC_INNER \ | |
0 | 300 asm("movd %2, %%mm1\n" \ |
301 "movd %1, %%mm2\n" \ | |
302 "paddusb %%mm2, %%mm1\n" \ | |
303 "movd %%mm1, %0\n" \ | |
304 : "=m" (*dp) \ | |
305 : "m" (*dp), "m" (sp[FP_GETH(xv)]) \ | |
17
a60fe802636a
Add register clobbers to SIMD inline asm.
Matti Hamalainen <ccr@tnsp.org>
parents:
14
diff
changeset
|
306 : "memory", "%mm1", "%mm2" ); dp++; |
0 | 307 |
85 | 308 #define DM_BLITFUNC_FINISH asm("emms\n"); |
0 | 309 #else |
85 | 310 #define DM_BLITFUNC_SRC_TYPE DMRGBA32 |
311 #define DM_BLITFUNC_DST_TYPE DMRGBA32 | |
312 #define DM_BLITFUNC_INNER \ | |
0 | 313 const DMRGBA32 q = sp[FP_GETH(xv)]; \ |
314 const int qr = dp->r + q.r, qg = dp->g + q.g, qb = dp->b + q.b; \ | |
315 dp->r = qr < 256 ? qr : 255; \ | |
316 dp->g = qg < 256 ? qg : 255; \ | |
317 dp->b = qb < 256 ? qb : 255; \ | |
318 dp->a = q.a; \ | |
319 dp++; | |
320 #endif | |
321 | |
322 #include "dmscaledblit.h" | |
323 | |
324 | |
95
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
325 |
0 | 326 // ======================================================================= |
327 // ======================================================================= | |
95
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
328 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
329 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
330 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
331 // ======================================================================= |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
332 // DMD_NONE |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
333 // ======================================================================= |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
334 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
335 #define DM_BLITFUNC_NAME dmUnscaledBlitSurface8to8 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
336 #define DM_BLITFUNC_SRC_BYTES 1 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
337 #define DM_BLITFUNC_DST_BYTES 1 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
338 #define DM_BLITFUNC_SRC_TYPE Uint8 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
339 #define DM_BLITFUNC_DST_TYPE Uint8 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
340 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
341 #define DM_BLITFUNC_INNER *dp++ = sp[xv]; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
342 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
343 #include "dmunscaledblit.h" |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
344 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
345 // ----------------------------------------------------------------------- |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
346 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
347 #define DM_BLITFUNC_NAME dmUnscaledBlitSurface8to32 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
348 #define DM_BLITFUNC_SRC_BYTES 1 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
349 #define DM_BLITFUNC_DST_BYTES 4 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
350 #define DM_BLITFUNC_SRC_TYPE Uint8 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
351 #define DM_BLITFUNC_DST_TYPE Uint32 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
352 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
353 #define DM_BLITFUNC_VARS const Uint32 *pal; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
354 #define DM_BLITFUNC_INIT \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
355 if (src->format->palette == NULL || src->format->palette->ncolors < 256) return -2; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
356 pal = (Uint32 *) src->format->palette->colors; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
357 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
358 #define DM_BLITFUNC_INNER *dp++ = pal[sp[xv]]; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
359 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
360 #include "dmunscaledblit.h" |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
361 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
362 // ----------------------------------------------------------------------- |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
363 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
364 #define DM_BLITFUNC_NAME dmUnscaledBlitSurface32to32 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
365 #define DM_BLITFUNC_SRC_BYTES 4 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
366 #define DM_BLITFUNC_DST_BYTES 4 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
367 #define DM_BLITFUNC_SRC_TYPE Uint32 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
368 #define DM_BLITFUNC_DST_TYPE Uint32 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
369 #define DM_BLITFUNC_INIT |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
370 #define DM_BLITFUNC_INNER *dp++ = sp[xv]; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
371 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
372 #include "dmunscaledblit.h" |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
373 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
374 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
375 // ======================================================================= |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
376 // DMD_TRANSPARENT |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
377 // ======================================================================= |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
378 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
379 #define DM_BLITFUNC_NAME dmUnscaledBlitSurface8to8Transparent |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
380 #define DM_BLITFUNC_SRC_BYTES 1 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
381 #define DM_BLITFUNC_DST_BYTES 1 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
382 #define DM_BLITFUNC_SRC_TYPE Uint8 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
383 #define DM_BLITFUNC_DST_TYPE Uint8 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
384 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
385 #define DM_BLITFUNC_INNER \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
386 *dp = sp[xv] ? sp[xv] : *dp; dp++; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
387 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
388 #include "dmunscaledblit.h" |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
389 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
390 // ----------------------------------------------------------------------- |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
391 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
392 #define DM_BLITFUNC_NAME dmUnscaledBlitSurface8to32Transparent |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
393 #define DM_BLITFUNC_SRC_BYTES 1 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
394 #define DM_BLITFUNC_DST_BYTES 4 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
395 #define DM_BLITFUNC_SRC_TYPE Uint8 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
396 #define DM_BLITFUNC_DST_TYPE DMRGBA32 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
397 #define DM_BLITFUNC_VARS const DMRGBA32 *pal; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
398 #define DM_BLITFUNC_INIT \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
399 if (src->format->palette == NULL || src->format->palette->ncolors < 256) return -2; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
400 pal = (DMRGBA32 *) src->format->palette->colors; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
401 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
402 #define DM_BLITFUNC_INNER \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
403 const DMRGBA32 q = pal[sp[xv]]; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
404 dp->r += ((q.r - dp->r) * q.a) >> 8; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
405 dp->g += ((q.g - dp->g) * q.a) >> 8; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
406 dp->b += ((q.b - dp->b) * q.a) >> 8; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
407 dp->a = q.a; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
408 dp++; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
409 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
410 #include "dmunscaledblit.h" |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
411 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
412 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
413 // ----------------------------------------------------------------------- |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
414 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
415 #define DM_BLITFUNC_NAME dmUnscaledBlitSurface32to32Transparent |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
416 #define DM_BLITFUNC_SRC_BYTES 4 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
417 #define DM_BLITFUNC_DST_BYTES 4 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
418 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
419 #ifdef DM_USE_SIMD |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
420 #define DM_BLITFUNC_VARS \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
421 const Uint32 qpdmask = 0xff000000; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
422 const Uint64 qpdrm = 0xff00ff00ff00ffULL; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
423 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
424 #define DM_BLITFUNC_SRC_TYPE Uint32 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
425 #define DM_BLITFUNC_DST_TYPE Uint32 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
426 #define DM_BLITFUNC_INNER \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
427 asm( \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
428 "movd %2, %%mm1\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
429 \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
430 "movd %3, %%mm2\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
431 "movq %%mm1, %%mm5\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
432 "pand %%mm2, %%mm5\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
433 "psrlw $8, %%mm5\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
434 "punpcklwd %%mm5, %%mm5\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
435 "punpckhwd %%mm5, %%mm5\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
436 \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
437 "pxor %%mm2, %%mm2\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
438 "movd %1, %%mm3\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
439 "punpcklbw %%mm2, %%mm1\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
440 "punpcklbw %%mm2, %%mm3\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
441 \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
442 "psubw %%mm3, %%mm1\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
443 "pmullw %%mm5, %%mm1\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
444 "psraw $8, %%mm1\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
445 "paddw %%mm3, %%mm1\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
446 "pand %4, %%mm1\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
447 "packuswb %%mm2, %%mm1\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
448 "movd %%mm1, %0\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
449 : "=m" (*dp) \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
450 : "m" (*dp), "m" (sp[xv]), "m" (qpdmask), "m" (qpdrm) \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
451 : "memory", "%mm1", "%mm2", "%mm3", "%mm4", "%mm5" ); dp++; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
452 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
453 #define DM_BLITFUNC_FINISH asm("emms\n"); |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
454 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
455 #else |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
456 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
457 #define DM_BLITFUNC_SRC_TYPE DMRGBA32 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
458 #define DM_BLITFUNC_DST_TYPE DMRGBA32 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
459 #define DM_BLITFUNC_INNER \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
460 const DMRGBA32 q = sp[xv]; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
461 dp->r += ((q.r - dp->r) * q.a) >> 8; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
462 dp->g += ((q.g - dp->g) * q.a) >> 8; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
463 dp->b += ((q.b - dp->b) * q.a) >> 8; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
464 dp->a = q.a; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
465 dp++; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
466 #endif |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
467 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
468 #include "dmunscaledblit.h" |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
469 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
470 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
471 // ======================================================================= |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
472 // DMD_SATURATE |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
473 // ======================================================================= |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
474 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
475 #define DM_BLITFUNC_NAME dmUnscaledBlitSurface8to8Saturate |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
476 #define DM_BLITFUNC_SRC_BYTES 1 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
477 #define DM_BLITFUNC_DST_BYTES 1 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
478 #define DM_BLITFUNC_SRC_TYPE Uint8 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
479 #define DM_BLITFUNC_DST_TYPE Uint8 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
480 #define DM_BLITFUNC_INNER \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
481 const int q = sp[xv] + *dp; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
482 *(dp++) = q < 256 ? q : 255; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
483 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
484 #include "dmunscaledblit.h" |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
485 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
486 // ----------------------------------------------------------------------- |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
487 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
488 #define DM_BLITFUNC_NAME dmUnscaledBlitSurface8to32Saturate |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
489 #define DM_BLITFUNC_SRC_BYTES 1 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
490 #define DM_BLITFUNC_DST_BYTES 4 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
491 #define DM_BLITFUNC_SRC_TYPE Uint8 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
492 #define DM_BLITFUNC_DST_TYPE DMRGBA32 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
493 #define DM_BLITFUNC_VARS const DMRGBA32 *pal; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
494 #define DM_BLITFUNC_INIT \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
495 if (src->format->palette == NULL || src->format->palette->ncolors < 256) return -2; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
496 pal = (DMRGBA32 *) src->format->palette->colors; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
497 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
498 #ifdef DM_USE_SIMD |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
499 #define DM_BLITFUNC_INNER \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
500 asm("movd %2, %%mm1\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
501 "movd %1, %%mm2\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
502 "paddusb %%mm2, %%mm1\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
503 "movd %%mm1, %0\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
504 : "=m" (*dp) \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
505 : "m" (*dp), "m" (pal[sp[xv]]) \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
506 : "memory", "%mm1", "%mm2" ); dp++; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
507 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
508 #define DM_BLITFUNC_FINISH asm("emms\n"); |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
509 #else |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
510 #define DM_BLITFUNC_INNER \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
511 const DMRGBA32 q = pal[sp[xv]]; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
512 const int qr = dp->r + q.r, qg = dp->g + q.g, qb = dp->b + q.b; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
513 dp->r = qr < 256 ? qr : 255; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
514 dp->g = qg < 256 ? qg : 255; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
515 dp->b = qb < 256 ? qb : 255; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
516 dp->a = q.a; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
517 dp++; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
518 #endif |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
519 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
520 #include "dmunscaledblit.h" |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
521 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
522 // ----------------------------------------------------------------------- |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
523 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
524 #define DM_BLITFUNC_NAME dmUnscaledBlitSurface32to32Saturate |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
525 #define DM_BLITFUNC_SRC_BYTES 4 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
526 #define DM_BLITFUNC_DST_BYTES 4 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
527 #define DM_BLITFUNC_INIT |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
528 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
529 #ifdef DM_USE_SIMD |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
530 #define DM_BLITFUNC_SRC_TYPE Uint32 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
531 #define DM_BLITFUNC_DST_TYPE Uint32 |
232
79dac918c81e
Modularize line clipping etc. a lot, and export all line drawing and
Matti Hamalainen <ccr@tnsp.org>
parents:
128
diff
changeset
|
532 #define DM_BLITFUNC_INNER \ |
95
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
533 asm("movd %2, %%mm1\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
534 "movd %1, %%mm2\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
535 "paddusb %%mm2, %%mm1\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
536 "movd %%mm1, %0\n" \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
537 : "=m" (*dp) \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
538 : "m" (*dp), "m" (sp[xv]) \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
539 : "memory", "%mm1", "%mm2" ); dp++; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
540 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
541 #define DM_BLITFUNC_FINISH asm("emms\n"); |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
542 #else |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
543 #define DM_BLITFUNC_SRC_TYPE DMRGBA32 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
544 #define DM_BLITFUNC_DST_TYPE DMRGBA32 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
545 #define DM_BLITFUNC_INNER \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
546 const DMRGBA32 q = sp[xv]; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
547 const int qr = dp->r + q.r, qg = dp->g + q.g, qb = dp->b + q.b; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
548 dp->r = qr < 256 ? qr : 255; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
549 dp->g = qg < 256 ? qg : 255; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
550 dp->b = qb < 256 ? qb : 255; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
551 dp->a = q.a; \ |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
552 dp++; |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
553 #endif |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
554 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
555 #include "dmunscaledblit.h" |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
556 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
557 |
0430f484641b
Add unscaled blitting functions.
Matti Hamalainen <ccr@tnsp.org>
parents:
92
diff
changeset
|
558 // ======================================================================= |