ddraw: Rename the main vtables to lpVtbl.

This commit is contained in:
Henri Verbeet 2009-01-22 12:24:01 +01:00 committed by Alexandre Julliard
parent 4126e8bfa5
commit 9b5f3ed8f3
6 changed files with 31 additions and 31 deletions

View File

@ -111,7 +111,7 @@ IDirectDrawImpl_QueryInterface(IDirectDraw7 *iface,
if ( IsEqualGUID( &IID_IUnknown, refiid ) ||
IsEqualGUID( &IID_IDirectDraw7, refiid ) )
{
*obj = &This->IDirectDraw7_vtbl;
*obj = This;
TRACE("(%p) Returning IDirectDraw7 interface at %p\n", This, *obj);
}
else if ( IsEqualGUID( &IID_IDirectDraw4, refiid ) )
@ -1720,7 +1720,7 @@ IDirectDrawImpl_RecreateSurfacesCallback(IDirectDrawSurface7 *surf,
* new surface
*/
parImpl = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*parImpl));
parImpl->IParent_vtbl = &IParent_Vtbl;
parImpl->lpVtbl = &IParent_Vtbl;
parImpl->ref = 1;
Parent = (IUnknown *) parImpl;
@ -1985,7 +1985,7 @@ IDirectDrawImpl_CreateNewSurface(IDirectDrawImpl *This,
ERR("(%p) Error allocating memory for a surface\n", This);
return DDERR_OUTOFVIDEOMEMORY;
}
(*ppSurf)->IDirectDrawSurface7_vtbl = &IDirectDrawSurface7_Vtbl;
(*ppSurf)->lpVtbl = &IDirectDrawSurface7_Vtbl;
(*ppSurf)->IDirectDrawSurface3_vtbl = &IDirectDrawSurface3_Vtbl;
(*ppSurf)->IDirectDrawGammaControl_vtbl = &IDirectDrawGammaControl_Vtbl;
(*ppSurf)->IDirect3DTexture2_vtbl = &IDirect3DTexture2_Vtbl;
@ -2024,7 +2024,7 @@ IDirectDrawImpl_CreateNewSurface(IDirectDrawImpl *This,
return DDERR_OUTOFMEMORY;
}
parImpl->ref = 1;
parImpl->IParent_vtbl = &IParent_Vtbl;
parImpl->lpVtbl = &IParent_Vtbl;
Parent = (IUnknown *)parImpl;
TRACE("Using IParent interface %p as parent\n", parImpl);
}
@ -3128,7 +3128,7 @@ DirectDrawCreateClipper(DWORD Flags,
return E_OUTOFMEMORY;
}
object->IDirectDrawClipper_vtbl = &IDirectDrawClipper_Vtbl;
object->lpVtbl = &IDirectDrawClipper_Vtbl;
object->ref = 1;
object->wineD3DClipper = pWineDirect3DCreateClipper((IUnknown *) object);
if(!object->wineD3DClipper)
@ -3213,7 +3213,7 @@ IDirectDrawImpl_CreatePalette(IDirectDraw7 *iface,
return E_OUTOFMEMORY;
}
object->IDirectDrawPalette_vtbl = &IDirectDrawPalette_Vtbl;
object->lpVtbl = &IDirectDrawPalette_Vtbl;
object->ref = 1;
object->ddraw_owner = This;
@ -3592,7 +3592,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSwapChain(IWineD3DDevicePar
return DDERR_OUTOFVIDEOMEMORY;
}
object->IParent_vtbl = &IParent_Vtbl;
object->lpVtbl = &IParent_Vtbl;
object->ref = 1;
hr = IWineD3DDevice_CreateSwapChain(This->wineD3DDevice, present_parameters,

View File

@ -98,7 +98,7 @@ struct FvfToDecl
struct IDirectDrawImpl
{
/* IUnknown fields */
const IDirectDraw7Vtbl *IDirectDraw7_vtbl;
const IDirectDraw7Vtbl *lpVtbl;
const IDirectDraw4Vtbl *IDirectDraw4_vtbl;
const IDirectDraw3Vtbl *IDirectDraw3_vtbl;
const IDirectDraw2Vtbl *IDirectDraw2_vtbl;
@ -257,7 +257,7 @@ extern WINED3DSURFTYPE DefaultSurfaceType;
struct IDirectDrawSurfaceImpl
{
/* IUnknown fields */
const IDirectDrawSurface7Vtbl *IDirectDrawSurface7_vtbl;
const IDirectDrawSurface7Vtbl *lpVtbl;
const IDirectDrawSurface3Vtbl *IDirectDrawSurface3_vtbl;
const IDirectDrawGammaControlVtbl *IDirectDrawGammaControl_vtbl;
const IDirect3DTexture2Vtbl *IDirect3DTexture2_vtbl;
@ -345,7 +345,7 @@ static inline IDirectDrawSurfaceImpl *surface_from_surface3(IDirectDrawSurface3
struct IParentImpl
{
/* IUnknown fields */
const IParentVtbl *IParent_vtbl;
const IParentVtbl *lpVtbl;
LONG ref;
/* IParentImpl fields */
@ -376,7 +376,7 @@ struct HandleEntry
struct IDirect3DDeviceImpl
{
/* IUnknown */
const IDirect3DDevice7Vtbl *IDirect3DDevice7_vtbl;
const IDirect3DDevice7Vtbl *lpVtbl;
const IDirect3DDevice3Vtbl *IDirect3DDevice3_vtbl;
const IDirect3DDevice2Vtbl *IDirect3DDevice2_vtbl;
const IDirect3DDeviceVtbl *IDirect3DDevice_vtbl;
@ -478,7 +478,7 @@ struct EnumZBufferFormatsData
struct IDirectDrawClipperImpl
{
/* IUnknown fields */
const IDirectDrawClipperVtbl *IDirectDrawClipper_vtbl;
const IDirectDrawClipperVtbl *lpVtbl;
LONG ref;
IWineD3DClipper *wineD3DClipper;
@ -495,7 +495,7 @@ typeof(WineDirect3DCreateClipper) *pWineDirect3DCreateClipper;
struct IDirectDrawPaletteImpl
{
/* IUnknown fields */
const IDirectDrawPaletteVtbl *IDirectDrawPalette_vtbl;
const IDirectDrawPaletteVtbl *lpVtbl;
LONG ref;
/* WineD3D uplink */
@ -512,7 +512,7 @@ extern const IDirectDrawPaletteVtbl IDirectDrawPalette_Vtbl;
******************************************************************************/
typedef struct
{
const IClassFactoryVtbl *IClassFactory_vtbl;
const IClassFactoryVtbl *lpVtbl;
LONG ref;
HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, REFIID iid, LPVOID *ppObj);
@ -531,7 +531,7 @@ struct object_creation_info
******************************************************************************/
struct IDirect3DLightImpl
{
const IDirect3DLightVtbl *IDirect3DLight_vtbl;
const IDirect3DLightVtbl *lpVtbl;
LONG ref;
/* IDirect3DLight fields */
@ -567,7 +567,7 @@ void light_desactivate(IDirect3DLightImpl* This);
******************************************************************************/
struct IDirect3DMaterialImpl
{
const IDirect3DMaterial3Vtbl *IDirect3DMaterial3_vtbl;
const IDirect3DMaterial3Vtbl *lpVtbl;
const IDirect3DMaterial2Vtbl *IDirect3DMaterial2_vtbl;
const IDirect3DMaterialVtbl *IDirect3DMaterial_vtbl;
LONG ref;
@ -595,7 +595,7 @@ void material_activate(IDirect3DMaterialImpl* This);
*****************************************************************************/
struct IDirect3DViewportImpl
{
const IDirect3DViewport3Vtbl *IDirect3DViewport3_vtbl;
const IDirect3DViewport3Vtbl *lpVtbl;
LONG ref;
/* IDirect3DViewport fields */
@ -640,7 +640,7 @@ void viewport_activate(IDirect3DViewportImpl* This, BOOL ignore_lights);
struct IDirect3DExecuteBufferImpl
{
/* IUnknown */
const IDirect3DExecuteBufferVtbl *IDirect3DExecuteBuffer_vtbl;
const IDirect3DExecuteBufferVtbl *lpVtbl;
LONG ref;
/* IDirect3DExecuteBuffer fields */
@ -676,7 +676,7 @@ IDirect3DExecuteBufferImpl_Execute(IDirect3DExecuteBufferImpl *This,
struct IDirect3DVertexBufferImpl
{
/*** IUnknown Methods ***/
const IDirect3DVertexBuffer7Vtbl *IDirect3DVertexBuffer7_vtbl;
const IDirect3DVertexBuffer7Vtbl *lpVtbl;
const IDirect3DVertexBufferVtbl *IDirect3DVertexBuffer_vtbl;
LONG ref;

View File

@ -737,7 +737,7 @@ IDirect3DDeviceImpl_1_CreateExecuteBuffer(IDirect3DDevice *iface,
return DDERR_OUTOFMEMORY;
}
object->IDirect3DExecuteBuffer_vtbl = &IDirect3DExecuteBuffer_Vtbl;
object->lpVtbl = &IDirect3DExecuteBuffer_Vtbl;
object->ref = 1;
object->d3ddev = This;

View File

@ -430,7 +430,7 @@ IDirect3DImpl_3_CreateLight(IDirect3D3 *iface,
if (object == NULL)
return DDERR_OUTOFMEMORY;
object->IDirect3DLight_vtbl = &IDirect3DLight_Vtbl;
object->lpVtbl = &IDirect3DLight_Vtbl;
object->ref = 1;
object->ddraw = This;
object->next = NULL;
@ -506,7 +506,7 @@ IDirect3DImpl_3_CreateMaterial(IDirect3D3 *iface,
if (object == NULL)
return DDERR_OUTOFMEMORY;
object->IDirect3DMaterial3_vtbl = &IDirect3DMaterial3_Vtbl;
object->lpVtbl = &IDirect3DMaterial3_Vtbl;
object->IDirect3DMaterial2_vtbl = &IDirect3DMaterial2_Vtbl;
object->IDirect3DMaterial_vtbl = &IDirect3DMaterial_Vtbl;
object->ref = 1;
@ -595,7 +595,7 @@ IDirect3DImpl_3_CreateViewport(IDirect3D3 *iface,
if (object == NULL)
return DDERR_OUTOFMEMORY;
object->IDirect3DViewport3_vtbl = &IDirect3DViewport3_Vtbl;
object->lpVtbl = &IDirect3DViewport3_Vtbl;
object->ref = 1;
object->ddraw = This;
object->activate = viewport_activate;
@ -784,9 +784,9 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 *iface,
}
if (This->cooperative_level & DDSCL_FPUPRESERVE)
object->IDirect3DDevice7_vtbl = &IDirect3DDevice7_FPUPreserve_Vtbl;
object->lpVtbl = &IDirect3DDevice7_FPUPreserve_Vtbl;
else
object->IDirect3DDevice7_vtbl = &IDirect3DDevice7_FPUSetup_Vtbl;
object->lpVtbl = &IDirect3DDevice7_FPUSetup_Vtbl;
object->IDirect3DDevice3_vtbl = &IDirect3DDevice3_Vtbl;
object->IDirect3DDevice2_vtbl = &IDirect3DDevice2_Vtbl;
@ -815,7 +815,7 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 *iface,
LeaveCriticalSection(&ddraw_cs);
return DDERR_OUTOFMEMORY;
}
IndexBufferParent->IParent_vtbl = &IParent_Vtbl;
IndexBufferParent->lpVtbl = &IParent_Vtbl;
IndexBufferParent->ref = 1;
/* Create an Index Buffer. WineD3D needs one for Drawing indexed primitives
@ -1017,7 +1017,7 @@ IDirect3DImpl_7_CreateVertexBuffer(IDirect3D7 *iface,
}
object->ref = 1;
object->IDirect3DVertexBuffer7_vtbl = &IDirect3DVertexBuffer7_Vtbl;
object->lpVtbl = &IDirect3DVertexBuffer7_Vtbl;
object->IDirect3DVertexBuffer_vtbl = &IDirect3DVertexBuffer1_Vtbl;
object->Caps = Desc->dwCaps;

View File

@ -171,11 +171,11 @@ DDRAW_Create(const GUID *guid,
* IDirectDraw and IDirect3D are the same object,
* QueryInterface is used to get other interfaces.
*/
This->lpVtbl = &IDirectDraw7_Vtbl;
This->IDirectDraw_vtbl = &IDirectDraw1_Vtbl;
This->IDirectDraw2_vtbl = &IDirectDraw2_Vtbl;
This->IDirectDraw3_vtbl = &IDirectDraw3_Vtbl;
This->IDirectDraw4_vtbl = &IDirectDraw4_Vtbl;
This->IDirectDraw7_vtbl = &IDirectDraw7_Vtbl;
This->IDirect3D_vtbl = &IDirect3D1_Vtbl;
This->IDirect3D2_vtbl = &IDirect3D2_Vtbl;
This->IDirect3D3_vtbl = &IDirect3D3_Vtbl;
@ -699,7 +699,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
factory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*factory));
if (factory == NULL) return E_OUTOFMEMORY;
factory->IClassFactory_vtbl = &IClassFactory_Vtbl;
factory->lpVtbl = &IClassFactory_Vtbl;
factory->ref = 1;
factory->pfnCreateInstance = object_creation[i].pfnCreateInstance;

View File

@ -108,8 +108,8 @@ IDirect3DMaterialImpl_QueryInterface(IDirect3DMaterial3 *iface,
return S_OK;
}
if ( IsEqualGUID( &IID_IDirect3DMaterial3, riid ) ) {
IDirect3DMaterial_AddRef((IDirect3DMaterial2 *)&This->IDirect3DMaterial3_vtbl);
*obp = &This->IDirect3DMaterial3_vtbl;
IDirect3DMaterial3_AddRef((IDirect3DMaterial3 *)This);
*obp = This;
TRACE(" Creating IDirect3DMaterial3 interface %p\n", *obp);
return S_OK;
}