Added support for DDBLT_KEYSRCOVERRIDE/DDBLT_KEYDESTOVERRIDE.

This commit is contained in:
Tony Lambregts 2002-06-28 17:32:25 +00:00 committed by Alexandre Julliard
parent 176f5cf62c
commit fede234ed0

View File

@ -542,19 +542,24 @@ DIB_DirectDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
last_sy = sy; last_sy = sy;
} }
} }
} else if (dwFlags & (DDBLT_KEYSRC | DDBLT_KEYDEST)) { } else if (dwFlags & (DDBLT_KEYSRC | DDBLT_KEYDEST | DDBLT_KEYSRCOVERRIDE | DDBLT_KEYDESTOVERRIDE)) {
DWORD keylow, keyhigh; DWORD keylow, keyhigh;
if (dwFlags & DDBLT_KEYSRC) { if (dwFlags & DDBLT_KEYSRC) {
keylow = sdesc.ddckCKSrcBlt.dwColorSpaceLowValue; keylow = sdesc.ddckCKSrcBlt.dwColorSpaceLowValue;
keyhigh = sdesc.ddckCKSrcBlt.dwColorSpaceHighValue; keyhigh = sdesc.ddckCKSrcBlt.dwColorSpaceHighValue;
} else { } else if (dwFlags & DDBLT_KEYDEST){
/* I'm not sure if this is correct */ /* I'm not sure if this is correct */
FIXME("DDBLT_KEYDEST not fully supported yet.\n"); FIXME("DDBLT_KEYDEST not fully supported yet.\n");
keylow = ddesc.ddckCKDestBlt.dwColorSpaceLowValue; keylow = ddesc.ddckCKDestBlt.dwColorSpaceLowValue;
keyhigh = ddesc.ddckCKDestBlt.dwColorSpaceHighValue; keyhigh = ddesc.ddckCKDestBlt.dwColorSpaceHighValue;
} } else if (dwFlags & DDBLT_KEYSRCOVERRIDE) {
keylow = lpbltfx->ddckSrcColorkey.dwColorSpaceLowValue;
keyhigh = lpbltfx->ddckSrcColorkey.dwColorSpaceHighValue;
} else {
keylow = lpbltfx->ddckDestColorkey.dwColorSpaceLowValue;
keyhigh = lpbltfx->ddckDestColorkey.dwColorSpaceHighValue;
}
for (y = sy = 0; y < dstheight; y++, sy += yinc) { for (y = sy = 0; y < dstheight; y++, sy += yinc) {
sbuf = sbase + (sy >> 16) * sdesc.u1.lPitch; sbuf = sbase + (sy >> 16) * sdesc.u1.lPitch;
@ -580,7 +585,7 @@ DIB_DirectDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
dbuf += ddesc.u1.lPitch; dbuf += ddesc.u1.lPitch;
} }
#undef COPYROW_COLORKEY #undef COPYROW_COLORKEY
dwFlags &= ~(DDBLT_KEYSRC | DDBLT_KEYDEST); dwFlags &= ~(DDBLT_KEYSRC | DDBLT_KEYDEST | DDBLT_KEYSRCOVERRIDE | DDBLT_KEYDESTOVERRIDE);
} }
} }