Commit 725057da authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

d3d: Remove dependency on ddraw.h header.

parent 7364aa49
......@@ -33,7 +33,6 @@
#include "wingdi.h"
#include "wine/debug.h"
#include "d3d8.h"
#include "ddraw.h"
#include "wine/wined3d_interface.h"
/* Device caps */
......
......@@ -661,17 +661,17 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(LPDIRECT3DDEVICE8 iface, ID
/* Quick if complete copy ... */
if (cRects == 0 && pSourceRects == NULL && pDestPoints == NULL) {
IWineD3DSurface_BltFast(Dest->wineD3DSurface, 0, 0, Source->wineD3DSurface, NULL, DDBLTFAST_NOCOLORKEY);
IWineD3DSurface_BltFast(Dest->wineD3DSurface, 0, 0, Source->wineD3DSurface, NULL, WINEDDBLTFAST_NOCOLORKEY);
} else {
unsigned int i;
/* Copy rect by rect */
if (NULL != pSourceRects && NULL != pDestPoints) {
for (i = 0; i < cRects; ++i) {
IWineD3DSurface_BltFast(Dest->wineD3DSurface, pDestPoints[i].x, pDestPoints[i].y, Source->wineD3DSurface, (RECT *) &pSourceRects[i], DDBLTFAST_NOCOLORKEY);
IWineD3DSurface_BltFast(Dest->wineD3DSurface, pDestPoints[i].x, pDestPoints[i].y, Source->wineD3DSurface, (RECT *) &pSourceRects[i], WINEDDBLTFAST_NOCOLORKEY);
}
} else {
for (i = 0; i < cRects; ++i) {
IWineD3DSurface_BltFast(Dest->wineD3DSurface, 0, 0, Source->wineD3DSurface, (RECT *) &pSourceRects[i], DDBLTFAST_NOCOLORKEY);
IWineD3DSurface_BltFast(Dest->wineD3DSurface, 0, 0, Source->wineD3DSurface, (RECT *) &pSourceRects[i], WINEDDBLTFAST_NOCOLORKEY);
}
}
}
......
......@@ -36,7 +36,6 @@
#include "wine/unicode.h"
#include "d3d9.h"
#include "ddraw.h"
#include "wine/wined3d_interface.h"
/* ===========================================================================
......
......@@ -366,7 +366,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTargetData(LPDIRECT3DDEVIC
IDirect3DSurface9Impl *renderTarget = (IDirect3DSurface9Impl *)pRenderTarget;
IDirect3DSurface9Impl *destSurface = (IDirect3DSurface9Impl *)pDestSurface;
TRACE("(%p)->(%p,%p)\n" , This, renderTarget, destSurface);
return IWineD3DSurface_BltFast(destSurface->wineD3DSurface, 0, 0, renderTarget->wineD3DSurface, NULL, DDBLTFAST_NOCOLORKEY);
return IWineD3DSurface_BltFast(destSurface->wineD3DSurface, 0, 0, renderTarget->wineD3DSurface, NULL, WINEDDBLTFAST_NOCOLORKEY);
}
static HRESULT WINAPI IDirect3DDevice9Impl_GetFrontBufferData(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, IDirect3DSurface9* pDestSurface) {
......
......@@ -557,6 +557,7 @@ IDirectDrawImpl_SetDisplayMode(IDirectDraw7 *iface,
{
ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw7, iface);
WINED3DDISPLAYMODE Mode;
HRESULT hr;
TRACE("(%p)->(%d,%d,%d,%d,%x: Relay!\n", This, Width, Height, BPP, RefreshRate, Flags);
if( !Width || !Height )
......@@ -593,10 +594,14 @@ IDirectDrawImpl_SetDisplayMode(IDirectDraw7 *iface,
*/
/* TODO: Lose the primary surface */
return IWineD3DDevice_SetDisplayMode(This->wineD3DDevice,
0, /* First swapchain */
&Mode);
hr = IWineD3DDevice_SetDisplayMode(This->wineD3DDevice,
0, /* First swapchain */
&Mode);
switch(hr)
{
case WINED3DERR_NOTAVAILABLE: return DDERR_INVALIDMODE;
default: return hr;
};
}
/*****************************************************************************
......@@ -1895,25 +1900,25 @@ IDirectDrawImpl_CreateNewSurface(IDirectDrawImpl *This,
{
IWineD3DSurface_SetColorKey((*ppSurf)->WineD3DSurface,
DDCKEY_DESTOVERLAY,
&pDDSD->u3.ddckCKDestOverlay);
(WINEDDCOLORKEY *) &pDDSD->u3.ddckCKDestOverlay);
}
if(pDDSD->dwFlags & DDSD_CKDESTBLT)
{
IWineD3DSurface_SetColorKey((*ppSurf)->WineD3DSurface,
DDCKEY_DESTBLT,
&pDDSD->ddckCKDestBlt);
(WINEDDCOLORKEY *) &pDDSD->ddckCKDestBlt);
}
if(pDDSD->dwFlags & DDSD_CKSRCOVERLAY)
{
IWineD3DSurface_SetColorKey((*ppSurf)->WineD3DSurface,
DDCKEY_SRCOVERLAY,
&pDDSD->ddckCKSrcOverlay);
(WINEDDCOLORKEY *) &pDDSD->ddckCKSrcOverlay);
}
if(pDDSD->dwFlags & DDSD_CKSRCBLT)
{
IWineD3DSurface_SetColorKey((*ppSurf)->WineD3DSurface,
DDCKEY_SRCBLT,
&pDDSD->ddckCKSrcBlt);
(WINEDDCOLORKEY *) &pDDSD->ddckCKSrcBlt);
}
if ( pDDSD->dwFlags & DDSD_LPSURFACE)
{
......
......@@ -693,6 +693,7 @@ IDirectDrawSurfaceImpl_Blt(IDirectDrawSurface7 *iface,
DDBLTFX *DDBltFx)
{
ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
HRESULT hr;
IDirectDrawSurfaceImpl *Src = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, SrcSurface);
TRACE("(%p)->(%p,%p,%p,%x,%p)\n", This, DestRect, Src, SrcRect, Flags, DDBltFx);
......@@ -714,13 +715,23 @@ IDirectDrawSurfaceImpl_Blt(IDirectDrawSurface7 *iface,
return DDERR_INVALIDPARAMS;
}
return IWineD3DSurface_Blt(This->WineD3DSurface,
DestRect,
Src ? Src->WineD3DSurface : NULL,
SrcRect,
Flags,
DDBltFx,
WINED3DTEXF_NONE);
/* TODO: Check if the DDBltFx contains any ddraw surface pointers. If it does, copy the struct,
* and replace the ddraw surfaces with the wined3d surfaces
* So far no blitting operations using surfaces in the bltfx struct are supported anyway.
*/
hr = IWineD3DSurface_Blt(This->WineD3DSurface,
DestRect,
Src ? Src->WineD3DSurface : NULL,
SrcRect,
Flags,
(WINEDDBLTFX *) DDBltFx,
WINED3DTEXF_NONE);
switch(hr)
{
case WINED3DERR_NOTAVAILABLE: return DDERR_UNSUPPORTED;
case WINED3DERR_WRONGTEXTUREFORMAT: return DDERR_INVALIDPIXELFORMAT;
default: return hr;
}
}
/*****************************************************************************
......@@ -1283,9 +1294,15 @@ IDirectDrawSurfaceImpl_GetBltStatus(IDirectDrawSurface7 *iface,
DWORD Flags)
{
ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
HRESULT hr;
TRACE("(%p)->(%x): Relay\n", This, Flags);
return IWineD3DSurface_GetBltStatus(This->WineD3DSurface, Flags);
hr = IWineD3DSurface_GetBltStatus(This->WineD3DSurface, Flags);
switch(hr)
{
case WINED3DERR_INVALIDCALL: return DDERR_INVALIDPARAMS;
default: return hr;
}
}
/*****************************************************************************
......@@ -1358,9 +1375,15 @@ IDirectDrawSurfaceImpl_GetFlipStatus(IDirectDrawSurface7 *iface,
DWORD Flags)
{
ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
HRESULT hr;
TRACE("(%p)->(%x): Relay\n", This, Flags);
return IWineD3DSurface_GetFlipStatus(This->WineD3DSurface, Flags);
hr = IWineD3DSurface_GetFlipStatus(This->WineD3DSurface, Flags);
switch(hr)
{
case WINED3DERR_INVALIDCALL: return DDERR_INVALIDPARAMS;
default: return hr;
}
}
/*****************************************************************************
......@@ -1497,6 +1520,7 @@ static HRESULT WINAPI
IDirectDrawSurfaceImpl_IsLost(IDirectDrawSurface7 *iface)
{
ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
HRESULT hr;
TRACE("(%p)\n", This);
/* We lose the surface if the implementation was changed */
......@@ -1510,7 +1534,15 @@ IDirectDrawSurfaceImpl_IsLost(IDirectDrawSurface7 *iface)
return DDERR_SURFACELOST;
}
return IWineD3DSurface_IsLost(This->WineD3DSurface);
hr = IWineD3DSurface_IsLost(This->WineD3DSurface);
switch(hr)
{
/* D3D8 and 9 loose full devices, thus there's only a DEVICELOST error.
* WineD3D uses the same error for surfaces
*/
case WINED3DERR_DEVICELOST: return DDERR_SURFACELOST;
default: return hr;
}
}
/*****************************************************************************
......@@ -1825,14 +1857,21 @@ IDirectDrawSurfaceImpl_BltFast(IDirectDrawSurface7 *iface,
DWORD trans)
{
ICOM_THIS_FROM(IDirectDrawSurfaceImpl, IDirectDrawSurface7, iface);
HRESULT hr;
IDirectDrawSurfaceImpl *src = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, Source);
TRACE("(%p)->(%d,%d,%p,%p,%d): Relay\n", This, dstx, dsty, Source, rsrc, trans);
return IWineD3DSurface_BltFast(This->WineD3DSurface,
dstx, dsty,
src ? src->WineD3DSurface : NULL,
rsrc,
trans);
hr = IWineD3DSurface_BltFast(This->WineD3DSurface,
dstx, dsty,
src ? src->WineD3DSurface : NULL,
rsrc,
trans);
switch(hr)
{
case WINED3DERR_NOTAVAILABLE: return DDERR_UNSUPPORTED;
case WINED3DERR_WRONGTEXTUREFORMAT: return DDERR_INVALIDPIXELFORMAT;
default: return hr;
}
}
/*****************************************************************************
......@@ -1956,25 +1995,25 @@ IDirectDrawSurfaceImpl_SetSurfaceDesc(IDirectDrawSurface7 *iface,
{
IWineD3DSurface_SetColorKey(This->WineD3DSurface,
DDCKEY_DESTOVERLAY,
&DDSD->u3.ddckCKDestOverlay);
(WINEDDCOLORKEY *) &DDSD->u3.ddckCKDestOverlay);
}
if (DDSD->dwFlags & DDSD_CKDESTBLT)
{
IWineD3DSurface_SetColorKey(This->WineD3DSurface,
DDCKEY_DESTBLT,
&DDSD->ddckCKDestBlt);
(WINEDDCOLORKEY *) &DDSD->ddckCKDestBlt);
}
if (DDSD->dwFlags & DDSD_CKSRCOVERLAY)
{
IWineD3DSurface_SetColorKey(This->WineD3DSurface,
DDCKEY_SRCOVERLAY,
&DDSD->ddckCKSrcOverlay);
(WINEDDCOLORKEY *) &DDSD->ddckCKSrcOverlay);
}
if (DDSD->dwFlags & DDSD_CKSRCBLT)
{
IWineD3DSurface_SetColorKey(This->WineD3DSurface,
DDCKEY_SRCBLT,
&DDSD->ddckCKSrcBlt);
(WINEDDCOLORKEY *) &DDSD->ddckCKSrcBlt);
}
if (DDSD->dwFlags & DDSD_LPSURFACE)
{
......@@ -2115,12 +2154,16 @@ IDirectDrawSurfaceImpl_SetColorKey(IDirectDrawSurface7 *iface,
{
hr = IWineD3DSurface_SetColorKey(surf->WineD3DSurface,
Flags,
CKey);
(WINEDDCOLORKEY *) CKey);
if(FAILED(hr))
{
WARN("IWineD3DSurface::SetColorKey for surface %p failed with hr=%08x\n",
surf->WineD3DSurface, hr);
return hr;
switch(hr)
{
case WINED3DERR_INVALIDCALL: return DDERR_INVALIDPARAMS;
default: return hr;
}
}
}
return DD_OK;
......
......@@ -1916,7 +1916,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDisplayMode(IWineD3DDevice *iface, U
ret = ChangeDisplaySettingsExW(NULL, &devmode, NULL, CDS_FULLSCREEN, NULL) != DISP_CHANGE_SUCCESSFUL;
}
if(ret != DISP_CHANGE_SUCCESSFUL) {
return DDERR_INVALIDMODE;
return WINED3DERR_NOTAVAILABLE;
}
}
......@@ -4972,7 +4972,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DeletePatch(IWineD3DDevice *iface, UINT
static HRESULT WINAPI IWineD3DDeviceImpl_ColorFill(IWineD3DDevice *iface, IWineD3DSurface *pSurface, CONST WINED3DRECT* pRect, WINED3DCOLOR color) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *) pSurface;
DDBLTFX BltFx;
WINEDDBLTFX BltFx;
TRACE("(%p) Colour fill Surface: %p rect: %p color: %d\n", This, pSurface, pRect, color);
if (surface->resource.pool != WINED3DPOOL_DEFAULT && surface->resource.pool != WINED3DPOOL_SYSTEMMEM) {
......@@ -4984,7 +4984,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ColorFill(IWineD3DDevice *iface, IWineD
memset(&BltFx, 0, sizeof(BltFx));
BltFx.dwSize = sizeof(BltFx);
BltFx.u5.dwFillColor = color;
return IWineD3DSurface_Blt(pSurface, (RECT *) pRect, NULL, NULL, DDBLT_COLORFILL, &BltFx, WINED3DTEXF_NONE);
return IWineD3DSurface_Blt(pSurface, (RECT *) pRect, NULL, NULL, WINEDDBLT_COLORFILL, &BltFx, WINED3DTEXF_NONE);
}
/* rendertarget and deptth stencil functions */
......
......@@ -1836,7 +1836,7 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
*
* With Shader Model 3.0 capable cards Instancing 'just works' in Windows.
*/
case MAKEFOURCC('I','N','S','T'):
case WINEMAKEFOURCC('I','N','S','T'):
TRACE("ATI Instancing check hack\n");
if(GL_SUPPORT(ARB_VERTEX_PROGRAM) || GL_SUPPORT(ARB_VERTEX_SHADER)) {
TRACE_(d3d_caps)("[OK]\n");
......
......@@ -29,7 +29,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
#define SIZE_BITS (DDPCAPS_1BIT | DDPCAPS_2BIT | DDPCAPS_4BIT | DDPCAPS_8BIT)
#define SIZE_BITS (WINEDDPCAPS_1BIT | WINEDDPCAPS_2BIT | WINEDDPCAPS_4BIT | WINEDDPCAPS_8BIT)
static HRESULT WINAPI IWineD3DPaletteImpl_QueryInterface(IWineD3DPalette *iface, REFIID refiid, void **obj) {
IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface;
......@@ -73,10 +73,10 @@ static ULONG WINAPI IWineD3DPaletteImpl_Release(IWineD3DPalette *iface) {
/* Not called from the vtable */
DWORD IWineD3DPaletteImpl_Size(DWORD dwFlags) {
switch (dwFlags & SIZE_BITS) {
case DDPCAPS_1BIT: return 2;
case DDPCAPS_2BIT: return 4;
case DDPCAPS_4BIT: return 16;
case DDPCAPS_8BIT: return 256;
case WINEDDPCAPS_1BIT: return 2;
case WINEDDPCAPS_2BIT: return 4;
case WINEDDPCAPS_4BIT: return 16;
case WINEDDPCAPS_8BIT: return 256;
default: assert(0); return 256;
}
}
......@@ -90,7 +90,7 @@ static HRESULT WINAPI IWineD3DPaletteImpl_GetEntries(IWineD3DPalette *iface, DW
if (Start + Count > IWineD3DPaletteImpl_Size(This->Flags))
return WINED3DERR_INVALIDCALL;
if (This->Flags & DDPCAPS_8BITENTRIES)
if (This->Flags & WINEDDPCAPS_8BITENTRIES)
{
unsigned int i;
LPBYTE entry = (LPBYTE)PalEnt;
......@@ -111,7 +111,7 @@ static HRESULT WINAPI IWineD3DPaletteImpl_SetEntries(IWineD3DPalette *iface, DW
TRACE("(%p)->(%08x,%d,%d,%p)\n",This,Flags,Start,Count,PalEnt);
if (This->Flags & DDPCAPS_8BITENTRIES) {
if (This->Flags & WINEDDPCAPS_8BITENTRIES) {
unsigned int i;
const BYTE* entry = (const BYTE*)PalEnt;
......@@ -143,7 +143,7 @@ static HRESULT WINAPI IWineD3DPaletteImpl_SetEntries(IWineD3DPalette *iface, DW
}
/* If the palette is the primary palette, set the entries to the device */
if(This->Flags & DDPCAPS_PRIMARYSURFACE) {
if(This->Flags & WINEDDPCAPS_PRIMARYSURFACE) {
unsigned int i;
IWineD3DDeviceImpl *device = This->wineD3DDevice;
PALETTEENTRY *entry = PalEnt;
......
......@@ -125,7 +125,7 @@ static HRESULT WINAPI IWineD3DQueryImpl_GetData(IWineD3DQuery* iface, void* pDa
WINED3DDEVINFO_VCACHE *data = (WINED3DDEVINFO_VCACHE *)pData;
FIXME("(%p): Unimplemented query WINED3DQUERYTYPE_VCACHE\n", This);
data->Pattern = MAKEFOURCC('C','A','C','H');
data->Pattern = WINEMAKEFOURCC('C','A','C','H');
data->OptMethod = 0; /*0 get longest strips, 1 optimize vertex cache*/
data->CacheSize = 0; /*cache size, only required if OptMethod == 1*/
data->MagicNumber = 0; /*only required if OptMethod == 1 (used internally)*/
......
......@@ -348,7 +348,7 @@ static void state_alpha(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
if(stateblock->textures[0] && stateblock->textureDimensions[0] == GL_TEXTURE_2D) {
surf = (IWineD3DSurfaceImpl *) ((IWineD3DTextureImpl *)stateblock->textures[0])->surfaces[0];
if(surf->CKeyFlags & DDSD_CKSRCBLT) {
if(surf->CKeyFlags & WINEDDSD_CKSRCBLT) {
const PixelFormatDesc *fmt = getFormatDescEntry(surf->resource.format);
/* The surface conversion does not do color keying conversion for surfaces that have an alpha
* channel on their own. Likewise, the alpha test shouldn't be set up for color keying if the
......@@ -1711,7 +1711,7 @@ static void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
stateblock->textures[0] && stateblock->textureDimensions[0] == GL_TEXTURE_2D) {
IWineD3DSurfaceImpl *surf = (IWineD3DSurfaceImpl *) ((IWineD3DTextureImpl *) stateblock->textures[0])->surfaces[0];
if(surf->CKeyFlags & DDSD_CKSRCBLT &&
if(surf->CKeyFlags & WINEDDSD_CKSRCBLT &&
getFormatDescEntry(surf->resource.format)->alphaMask == 0x00000000) {
/* Color keying needs to pass alpha values from the texture through to have the alpha test work properly.
......
......@@ -191,7 +191,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
if (This->presentParms.Windowed) {
MapWindowPoints(NULL, This->win_handle, (LPPOINT)&destRect, 2);
}
IWineD3DSurface_Blt(This->backBuffer[0], &destRect, (IWineD3DSurface *) &cursor, NULL, DDBLT_KEYSRC, NULL, WINED3DTEXF_NONE);
IWineD3DSurface_Blt(This->backBuffer[0], &destRect, (IWineD3DSurface *) &cursor, NULL, WINEDDBLT_KEYSRC, NULL, WINED3DTEXF_NONE);
}
if (pSourceRect || pDestRect) FIXME("Unhandled present options %p/%p\n", pSourceRect, pDestRect);
......
......@@ -38,7 +38,6 @@
#include "wine/unicode.h"
#include "wined3d_private_types.h"
#include "ddraw.h"
#include "wine/wined3d_interface.h"
#include "wine/wined3d_caps.h"
#include "wine/wined3d_gl.h"
......@@ -1056,13 +1055,13 @@ struct IWineD3DSurfaceImpl
HDC hDC;
/* Color keys for DDraw */
DDCOLORKEY DestBltCKey;
DDCOLORKEY DestOverlayCKey;
DDCOLORKEY SrcOverlayCKey;
DDCOLORKEY SrcBltCKey;
WINEDDCOLORKEY DestBltCKey;
WINEDDCOLORKEY DestOverlayCKey;
WINEDDCOLORKEY SrcOverlayCKey;
WINEDDCOLORKEY SrcBltCKey;
DWORD CKeyFlags;
DDCOLORKEY glCKey;
WINEDDCOLORKEY glCKey;
struct list renderbuffers;
renderbuffer_entry_t *current_renderbuffer;
......@@ -1093,7 +1092,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_Restore(IWineD3DSurface *iface);
HRESULT WINAPI IWineD3DSurfaceImpl_SetPixelFormat(IWineD3DSurface *iface, WINED3DFORMAT Format, BYTE *Surface, DWORD Size);
HRESULT WINAPI IWineD3DSurfaceImpl_GetPalette(IWineD3DSurface *iface, IWineD3DPalette **Pal);
HRESULT WINAPI IWineD3DSurfaceImpl_SetPalette(IWineD3DSurface *iface, IWineD3DPalette *Pal);
HRESULT WINAPI IWineD3DSurfaceImpl_SetColorKey(IWineD3DSurface *iface, DWORD Flags, DDCOLORKEY *CKey);
HRESULT WINAPI IWineD3DSurfaceImpl_SetColorKey(IWineD3DSurface *iface, DWORD Flags, WINEDDCOLORKEY *CKey);
HRESULT WINAPI IWineD3DSurfaceImpl_CleanDirtyRect(IWineD3DSurface *iface);
extern HRESULT WINAPI IWineD3DSurfaceImpl_AddDirtyRect(IWineD3DSurface *iface, CONST RECT* pDirtyRect);
HRESULT WINAPI IWineD3DSurfaceImpl_SetContainer(IWineD3DSurface *iface, IWineD3DBase *container);
......@@ -1101,7 +1100,7 @@ void WINAPI IWineD3DSurfaceImpl_SetGlTextureDesc(IWineD3DSurface *iface, UINT te
void WINAPI IWineD3DSurfaceImpl_GetGlDesc(IWineD3DSurface *iface, glDescriptor **glDescription);
const void *WINAPI IWineD3DSurfaceImpl_GetData(IWineD3DSurface *iface);
HRESULT WINAPI IWineD3DSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORMAT format);
HRESULT WINAPI IWineGDISurfaceImpl_Blt(IWineD3DSurface *iface, RECT *DestRect, IWineD3DSurface *SrcSurface, RECT *SrcRect, DWORD Flags, DDBLTFX *DDBltFx, WINED3DTEXTUREFILTERTYPE Filter);
HRESULT WINAPI IWineGDISurfaceImpl_Blt(IWineD3DSurface *iface, RECT *DestRect, IWineD3DSurface *SrcSurface, RECT *SrcRect, DWORD Flags, WINEDDBLTFX *DDBltFx, WINED3DTEXTUREFILTERTYPE Filter);
HRESULT WINAPI IWineGDISurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dstx, DWORD dsty, IWineD3DSurface *Source, RECT *rsrc, DWORD trans);
HRESULT WINAPI IWineD3DSurfaceImpl_SetPalette(IWineD3DSurface *iface, IWineD3DPalette *Pal);
HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHDC);
......
......@@ -28,9 +28,11 @@
# error You must include config.h to use this header
#endif
#if !defined( __WINE_DDRAW_H)
#error You must include ddraw.h to use this header
#endif
#define COM_NO_WINDOWS_H
#include <objbase.h>
/* Stupid DDraw Struct references surfaces */
struct IWineD3DSurface;
#include "wined3d_types.h"
/*****************************************************************
......@@ -71,6 +73,12 @@
#define WINED3DERR_INVALIDCALL MAKE_WINED3DHRESULT(2156)
#define WINED3DERR_DRIVERINVALIDCALL MAKE_WINED3DHRESULT(2157)
#define WINED3DERR_WASSTILLDRAWING MAKE_WINED3DHRESULT(540)
#define WINEDDERR_NOTAOVERLAYSURFACE MAKE_WINED3DHRESULT(580)
#define WINEDDERR_NODC MAKE_WINED3DHRESULT(586)
#define WINEDDERR_DCALREADYCREATED MAKE_WINED3DHRESULT(620)
#define WINEDDERR_NOTFLIPPABLE MAKE_WINED3DHRESULT(582)
#define WINEDDERR_SURFACEBUSY MAKE_WINED3DHRESULT(430)
#define WINEDDERR_INVALIDRECT MAKE_WINED3DHRESULT(150)
#define WINED3DOK_NOAUTOGEN MAKE_WINED3DSTATUS(2159)
/*****************************************************************************
......@@ -89,7 +97,6 @@ struct IWineD3DTexture;
struct IWineD3DCubeTexture;
struct IWineD3DVolumeTexture;
struct IWineD3DStateBlock;
struct IWineD3DSurface;
struct IWineD3DVolume;
struct IWineD3DVertexDeclaration;
struct IWineD3DBaseShader;
......@@ -1093,7 +1100,7 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWineD3DResource)
STDMETHOD(GetDC)(THIS_ HDC *pHdc) PURE;
STDMETHOD(ReleaseDC)(THIS_ HDC hdc) PURE;
STDMETHOD(Flip)(THIS_ IWineD3DSurface *Override, DWORD FLAGS) PURE;
STDMETHOD(Blt)(THIS_ RECT *DestRect, IWineD3DSurface *SrcSurface, RECT *SrcRect, DWORD Flags, DDBLTFX *DDBltFx, WINED3DTEXTUREFILTERTYPE Filter) PURE;
STDMETHOD(Blt)(THIS_ RECT *DestRect, IWineD3DSurface *SrcSurface, RECT *SrcRect, DWORD Flags, WINEDDBLTFX *DDBltFx, WINED3DTEXTUREFILTERTYPE Filter) PURE;
STDMETHOD(GetBltStatus)(THIS_ DWORD Flags) PURE;
STDMETHOD(GetFlipStatus)(THIS_ DWORD Flags) PURE;
STDMETHOD(IsLost)(THIS) PURE;
......@@ -1102,7 +1109,7 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWineD3DResource)
STDMETHOD(GetPalette)(THIS_ struct IWineD3DPalette **Palette) PURE;
STDMETHOD(SetPalette)(THIS_ struct IWineD3DPalette *Palette) PURE;
STDMETHOD(RealizePalette)(THIS) PURE;
STDMETHOD(SetColorKey)(THIS_ DWORD Flags, DDCOLORKEY *CKey) PURE;
STDMETHOD(SetColorKey)(THIS_ DWORD Flags, WINEDDCOLORKEY *CKey) PURE;
STDMETHOD_(DWORD,GetPitch)(THIS) PURE;
STDMETHOD(SetMem)(THIS_ void *mem) PURE;
STDMETHOD(SetOverlayPosition)(THIS_ LONG X, LONG Y) PURE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment