wined3d: Get rid of the pBaseVertexIndex parameter to IWineD3DDeviceImpl_GetIndices, use GetBaseVertexIndex instead.

This commit is contained in:
H. Verbeet 2007-06-06 18:40:09 +02:00 committed by Alexandre Julliard
parent 262240adce
commit 6ee356fca0
4 changed files with 13 additions and 14 deletions

View File

@ -1460,12 +1460,13 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetIndices(LPDIRECT3DDEVICE8 iface, I
return D3DERR_INVALIDCALL;
}
rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData, pBaseVertexIndex);
if (D3D_OK == rc && NULL != retIndexData) {
IWineD3DDevice_GetBaseVertexIndex(This->WineD3DDevice, pBaseVertexIndex);
rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData);
if (SUCCEEDED(rc) && retIndexData) {
IWineD3DIndexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData);
IWineD3DIndexBuffer_Release(retIndexData);
} else {
if(rc != D3D_OK) FIXME("Call to GetIndices failed\n");
if (FAILED(rc)) FIXME("Call to GetIndices failed\n");
*ppIndexData = NULL;
}
return rc;

View File

@ -918,7 +918,6 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetIndices(LPDIRECT3DDEVICE9 iface,
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
IWineD3DIndexBuffer *retIndexData = NULL;
HRESULT rc = D3D_OK;
UINT tmp;
TRACE("(%p) Relay\n", This);
@ -926,12 +925,12 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetIndices(LPDIRECT3DDEVICE9 iface,
return D3DERR_INVALIDCALL;
}
rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData, &tmp);
if (rc == D3D_OK && NULL != retIndexData) {
rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData);
if (SUCCEEDED(rc) && retIndexData) {
IWineD3DIndexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData);
IWineD3DIndexBuffer_Release(retIndexData);
}else{
if(rc != D3D_OK) FIXME("Call to GetIndices failed\n");
} else {
if (FAILED(rc)) FIXME("Call to GetIndices failed\n");
*ppIndexData = NULL;
}
return rc;

View File

@ -2774,7 +2774,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetIndices(IWineD3DDevice *iface, IWine
return WINED3D_OK;
}
static HRESULT WINAPI IWineD3DDeviceImpl_GetIndices(IWineD3DDevice *iface, IWineD3DIndexBuffer** ppIndexData, UINT* pBaseVertexIndex) {
static HRESULT WINAPI IWineD3DDeviceImpl_GetIndices(IWineD3DDevice *iface, IWineD3DIndexBuffer** ppIndexData) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
*ppIndexData = This->stateBlock->pIndexData;
@ -2782,12 +2782,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetIndices(IWineD3DDevice *iface, IWine
/* up ref count on ppindexdata */
if (*ppIndexData) {
IWineD3DIndexBuffer_AddRef(*ppIndexData);
*pBaseVertexIndex = This->stateBlock->baseVertexIndex;
TRACE("(%p) index data set to %p + %u\n", This, ppIndexData, This->stateBlock->baseVertexIndex);
TRACE("(%p) index data set to %p\n", This, ppIndexData);
}else{
TRACE("(%p) No index data set\n", This);
}
TRACE("Returning %p %d\n", *ppIndexData, *pBaseVertexIndex);
TRACE("Returning %p\n", *ppIndexData);
return WINED3D_OK;
}

View File

@ -404,7 +404,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
STDMETHOD_(void, SetGammaRamp)(THIS_ UINT iSwapChain, DWORD Flags, CONST WINED3DGAMMARAMP* pRamp) PURE;
STDMETHOD_(void, GetGammaRamp)(THIS_ UINT iSwapChain, WINED3DGAMMARAMP* pRamp) PURE;
STDMETHOD(SetIndices)(THIS_ struct IWineD3DIndexBuffer * pIndexData) PURE;
STDMETHOD(GetIndices)(THIS_ struct IWineD3DIndexBuffer ** ppIndexData,UINT * pBaseVertexIndex) PURE;
STDMETHOD(GetIndices)(THIS_ struct IWineD3DIndexBuffer ** ppIndexData) PURE;
STDMETHOD(SetBaseVertexIndex)(THIS_ UINT baseIndex);
STDMETHOD(GetBaseVertexIndex)(THIS_ UINT *baseIndex);
STDMETHOD(SetLight)(THIS_ DWORD Index,CONST WINED3DLIGHT * pLight) PURE;
@ -541,7 +541,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
#define IWineD3DDevice_SetGammaRamp(p,a,b,c) (p)->lpVtbl->SetGammaRamp(p,a,b,c)
#define IWineD3DDevice_GetGammaRamp(p,a,b) (p)->lpVtbl->GetGammaRamp(p,a,b)
#define IWineD3DDevice_SetIndices(p,a) (p)->lpVtbl->SetIndices(p,a)
#define IWineD3DDevice_GetIndices(p,a,b) (p)->lpVtbl->GetIndices(p,a,b)
#define IWineD3DDevice_GetIndices(p,a) (p)->lpVtbl->GetIndices(p,a)
#define IWineD3DDevice_SetBaseVertexIndex(p, a) (p)->lpVtbl->SetBaseVertexIndex(p, a)
#define IWineD3DDevice_GetBaseVertexIndex(p,a) (p)->lpVtbl->GetBaseVertexIndex(p,a)
#define IWineD3DDevice_SetLight(p,a,b) (p)->lpVtbl->SetLight(p,a,b)