ddraw: Merge the ddraw thunks into ddraw.c.
Note how both ddraw 1 and ddraw 7 used the same IDirectDrawImpl_XXX naming convention.
This commit is contained in:
parent
2e97746340
commit
6fb9ee0ee7
|
@ -9,7 +9,6 @@ IMPORTS = dxguid uuid ole32 user32 gdi32 advapi32 kernel32 ntdll
|
|||
C_SRCS = \
|
||||
clipper.c \
|
||||
ddraw.c \
|
||||
ddraw_thunks.c \
|
||||
device.c \
|
||||
direct3d.c \
|
||||
executebuffer.c \
|
||||
|
|
1540
dlls/ddraw/ddraw.c
1540
dlls/ddraw/ddraw.c
File diff suppressed because it is too large
Load Diff
|
@ -188,10 +188,9 @@ typedef struct EnumSurfacesCBS
|
|||
/* Utility functions */
|
||||
void DDRAW_Convert_DDSCAPS_1_To_2(const DDSCAPS *pIn, DDSCAPS2 *pOut) DECLSPEC_HIDDEN;
|
||||
void DDRAW_Convert_DDDEVICEIDENTIFIER_2_To_1(const DDDEVICEIDENTIFIER2 *pIn, DDDEVICEIDENTIFIER *pOut) DECLSPEC_HIDDEN;
|
||||
void IDirectDrawImpl_Destroy(IDirectDrawImpl *This) DECLSPEC_HIDDEN;
|
||||
HRESULT WINAPI IDirectDrawImpl_RecreateSurfacesCallback(IDirectDrawSurface7 *surf,
|
||||
HRESULT WINAPI ddraw_recreate_surfaces_cb(IDirectDrawSurface7 *surf,
|
||||
DDSURFACEDESC2 *desc, void *Context) DECLSPEC_HIDDEN;
|
||||
IWineD3DVertexDeclaration *IDirectDrawImpl_FindDecl(IDirectDrawImpl *This, DWORD fvf) DECLSPEC_HIDDEN;
|
||||
IWineD3DVertexDeclaration *ddraw_find_decl(IDirectDrawImpl *This, DWORD fvf) DECLSPEC_HIDDEN;
|
||||
|
||||
static inline IDirectDrawImpl *ddraw_from_d3d1(IDirect3D *iface)
|
||||
{
|
||||
|
@ -213,26 +212,6 @@ static inline IDirectDrawImpl *ddraw_from_d3d7(IDirect3D7 *iface)
|
|||
return (IDirectDrawImpl *)((char*)iface - FIELD_OFFSET(IDirectDrawImpl, IDirect3D7_vtbl));
|
||||
}
|
||||
|
||||
static inline IDirectDrawImpl *ddraw_from_ddraw1(IDirectDraw *iface)
|
||||
{
|
||||
return (IDirectDrawImpl *)((char*)iface - FIELD_OFFSET(IDirectDrawImpl, IDirectDraw_vtbl));
|
||||
}
|
||||
|
||||
static inline IDirectDrawImpl *ddraw_from_ddraw2(IDirectDraw2 *iface)
|
||||
{
|
||||
return (IDirectDrawImpl *)((char*)iface - FIELD_OFFSET(IDirectDrawImpl, IDirectDraw2_vtbl));
|
||||
}
|
||||
|
||||
static inline IDirectDrawImpl *ddraw_from_ddraw3(IDirectDraw3 *iface)
|
||||
{
|
||||
return (IDirectDrawImpl *)((char*)iface - FIELD_OFFSET(IDirectDrawImpl, IDirectDraw3_vtbl));
|
||||
}
|
||||
|
||||
static inline IDirectDrawImpl *ddraw_from_ddraw4(IDirectDraw4 *iface)
|
||||
{
|
||||
return (IDirectDrawImpl *)((char*)iface - FIELD_OFFSET(IDirectDrawImpl, IDirectDraw4_vtbl));
|
||||
}
|
||||
|
||||
/* The default surface type */
|
||||
extern WINED3DSURFTYPE DefaultSurfaceType DECLSPEC_HIDDEN;
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3553,8 +3553,7 @@ IDirect3DDeviceImpl_7_DrawPrimitive(IDirect3DDevice7 *iface,
|
|||
|
||||
/* Set the FVF */
|
||||
EnterCriticalSection(&ddraw_cs);
|
||||
hr = IWineD3DDevice_SetVertexDeclaration(This->wineD3DDevice,
|
||||
IDirectDrawImpl_FindDecl(This->ddraw, VertexType));
|
||||
hr = IWineD3DDevice_SetVertexDeclaration(This->wineD3DDevice, ddraw_find_decl(This->ddraw, VertexType));
|
||||
if(hr != D3D_OK)
|
||||
{
|
||||
LeaveCriticalSection(&ddraw_cs);
|
||||
|
@ -3676,8 +3675,7 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitive(IDirect3DDevice7 *iface,
|
|||
|
||||
/* Set the D3DDevice's FVF */
|
||||
EnterCriticalSection(&ddraw_cs);
|
||||
hr = IWineD3DDevice_SetVertexDeclaration(This->wineD3DDevice,
|
||||
IDirectDrawImpl_FindDecl(This->ddraw, VertexType));
|
||||
hr = IWineD3DDevice_SetVertexDeclaration(This->wineD3DDevice, ddraw_find_decl(This->ddraw, VertexType));
|
||||
if(FAILED(hr))
|
||||
{
|
||||
ERR(" (%p) Setting the FVF failed, hr = %x!\n", This, hr);
|
||||
|
|
|
@ -1036,9 +1036,8 @@ IDirect3DImpl_7_CreateVertexBuffer(IDirect3D7 *iface,
|
|||
return hr;
|
||||
}
|
||||
|
||||
object->wineD3DVertexDeclaration = IDirectDrawImpl_FindDecl(This,
|
||||
Desc->dwFVF);
|
||||
if(!object->wineD3DVertexDeclaration)
|
||||
object->wineD3DVertexDeclaration = ddraw_find_decl(This, Desc->dwFVF);
|
||||
if (!object->wineD3DVertexDeclaration)
|
||||
{
|
||||
ERR("Cannot find the vertex declaration for fvf %08x\n", Desc->dwFVF);
|
||||
IWineD3DBuffer_Release(object->wineD3DVertexBuffer);
|
||||
|
|
|
@ -1750,9 +1750,7 @@ IDirectDrawSurfaceImpl_Restore(IDirectDrawSurface7 *iface)
|
|||
{
|
||||
/* Call the recreation callback. Make sure to AddRef first */
|
||||
IDirectDrawSurface_AddRef(iface);
|
||||
IDirectDrawImpl_RecreateSurfacesCallback(iface,
|
||||
&This->surface_desc,
|
||||
NULL /* Not needed */);
|
||||
ddraw_recreate_surfaces_cb(iface, &This->surface_desc, NULL /* Not needed */);
|
||||
}
|
||||
hr = IWineD3DSurface_Restore(This->WineD3DSurface);
|
||||
LeaveCriticalSection(&ddraw_cs);
|
||||
|
|
Loading…
Reference in New Issue