Alexander Dorofeyev : wined3d: Implement CONVERT_RGB32_888 conversion.
Alexandre Julliard
julliard at winehq.org
Mon Apr 7 14:46:54 CDT 2008
Module: wine
Branch: master
Commit: 29b38bc886c81aef906594c1c75974eb4aad155b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=29b38bc886c81aef906594c1c75974eb4aad155b
Author: Alexander Dorofeyev <alexd4 at inbox.lv>
Date: Mon Apr 7 00:05:48 2008 +0300
wined3d: Implement CONVERT_RGB32_888 conversion.
---
dlls/wined3d/surface.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index ddd0f32..8190a15 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1799,6 +1799,29 @@ HRESULT d3dfmt_convert_surface(BYTE *src, BYTE *dst, UINT pitch, UINT width, UIN
}
break;
+ case CONVERT_RGB32_888:
+ {
+ /* Converting X8R8G8B8 format to R8G8B8A8 with color-keying. */
+ unsigned int x, y;
+ for (y = 0; y < height; y++)
+ {
+ source = src + pitch * y;
+ dest = dst + outpitch * y;
+ for (x = 0; x < width; x++) {
+ DWORD color = 0xffffff & *(DWORD*)source;
+ DWORD dstcolor = color << 8;
+ if ((color < This->SrcBltCKey.dwColorSpaceLowValue) ||
+ (color > This->SrcBltCKey.dwColorSpaceHighValue)) {
+ dstcolor |= 0xff;
+ }
+ *(DWORD*)dest = dstcolor;
+ source += 4;
+ dest += 4;
+ }
+ }
+ }
+ break;
+
case CONVERT_V8U8:
{
unsigned int x, y;
More information about the wine-cvs
mailing list