Commit 6ee356fc authored by H. Verbeet's avatar H. Verbeet Committed by Alexandre Julliard

wined3d: Get rid of the pBaseVertexIndex parameter to…

wined3d: Get rid of the pBaseVertexIndex parameter to IWineD3DDeviceImpl_GetIndices, use GetBaseVertexIndex instead.
parent 262240ad
...@@ -1460,12 +1460,13 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetIndices(LPDIRECT3DDEVICE8 iface, I ...@@ -1460,12 +1460,13 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetIndices(LPDIRECT3DDEVICE8 iface, I
return D3DERR_INVALIDCALL; return D3DERR_INVALIDCALL;
} }
rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData, pBaseVertexIndex); IWineD3DDevice_GetBaseVertexIndex(This->WineD3DDevice, pBaseVertexIndex);
if (D3D_OK == rc && NULL != retIndexData) { rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData);
if (SUCCEEDED(rc) && retIndexData) {
IWineD3DIndexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData); IWineD3DIndexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData);
IWineD3DIndexBuffer_Release(retIndexData); IWineD3DIndexBuffer_Release(retIndexData);
} else { } else {
if(rc != D3D_OK) FIXME("Call to GetIndices failed\n"); if (FAILED(rc)) FIXME("Call to GetIndices failed\n");
*ppIndexData = NULL; *ppIndexData = NULL;
} }
return rc; return rc;
......
...@@ -918,7 +918,6 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetIndices(LPDIRECT3DDEVICE9 iface, ...@@ -918,7 +918,6 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetIndices(LPDIRECT3DDEVICE9 iface,
IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface; IDirect3DDevice9Impl *This = (IDirect3DDevice9Impl *)iface;
IWineD3DIndexBuffer *retIndexData = NULL; IWineD3DIndexBuffer *retIndexData = NULL;
HRESULT rc = D3D_OK; HRESULT rc = D3D_OK;
UINT tmp;
TRACE("(%p) Relay\n", This); TRACE("(%p) Relay\n", This);
...@@ -926,12 +925,12 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetIndices(LPDIRECT3DDEVICE9 iface, ...@@ -926,12 +925,12 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetIndices(LPDIRECT3DDEVICE9 iface,
return D3DERR_INVALIDCALL; return D3DERR_INVALIDCALL;
} }
rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData, &tmp); rc = IWineD3DDevice_GetIndices(This->WineD3DDevice, &retIndexData);
if (rc == D3D_OK && NULL != retIndexData) { if (SUCCEEDED(rc) && retIndexData) {
IWineD3DIndexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData); IWineD3DIndexBuffer_GetParent(retIndexData, (IUnknown **)ppIndexData);
IWineD3DIndexBuffer_Release(retIndexData); IWineD3DIndexBuffer_Release(retIndexData);
}else{ } else {
if(rc != D3D_OK) FIXME("Call to GetIndices failed\n"); if (FAILED(rc)) FIXME("Call to GetIndices failed\n");
*ppIndexData = NULL; *ppIndexData = NULL;
} }
return rc; return rc;
......
...@@ -2774,7 +2774,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetIndices(IWineD3DDevice *iface, IWine ...@@ -2774,7 +2774,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetIndices(IWineD3DDevice *iface, IWine
return WINED3D_OK; 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; IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
*ppIndexData = This->stateBlock->pIndexData; *ppIndexData = This->stateBlock->pIndexData;
...@@ -2782,12 +2782,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetIndices(IWineD3DDevice *iface, IWine ...@@ -2782,12 +2782,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetIndices(IWineD3DDevice *iface, IWine
/* up ref count on ppindexdata */ /* up ref count on ppindexdata */
if (*ppIndexData) { if (*ppIndexData) {
IWineD3DIndexBuffer_AddRef(*ppIndexData); IWineD3DIndexBuffer_AddRef(*ppIndexData);
*pBaseVertexIndex = This->stateBlock->baseVertexIndex; TRACE("(%p) index data set to %p\n", This, ppIndexData);
TRACE("(%p) index data set to %p + %u\n", This, ppIndexData, This->stateBlock->baseVertexIndex);
}else{ }else{
TRACE("(%p) No index data set\n", This); TRACE("(%p) No index data set\n", This);
} }
TRACE("Returning %p %d\n", *ppIndexData, *pBaseVertexIndex); TRACE("Returning %p\n", *ppIndexData);
return WINED3D_OK; return WINED3D_OK;
} }
......
...@@ -404,7 +404,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase) ...@@ -404,7 +404,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
STDMETHOD_(void, SetGammaRamp)(THIS_ UINT iSwapChain, DWORD Flags, CONST WINED3DGAMMARAMP* pRamp) PURE; STDMETHOD_(void, SetGammaRamp)(THIS_ UINT iSwapChain, DWORD Flags, CONST WINED3DGAMMARAMP* pRamp) PURE;
STDMETHOD_(void, GetGammaRamp)(THIS_ UINT iSwapChain, WINED3DGAMMARAMP* pRamp) PURE; STDMETHOD_(void, GetGammaRamp)(THIS_ UINT iSwapChain, WINED3DGAMMARAMP* pRamp) PURE;
STDMETHOD(SetIndices)(THIS_ struct IWineD3DIndexBuffer * pIndexData) 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(SetBaseVertexIndex)(THIS_ UINT baseIndex);
STDMETHOD(GetBaseVertexIndex)(THIS_ UINT *baseIndex); STDMETHOD(GetBaseVertexIndex)(THIS_ UINT *baseIndex);
STDMETHOD(SetLight)(THIS_ DWORD Index,CONST WINED3DLIGHT * pLight) PURE; STDMETHOD(SetLight)(THIS_ DWORD Index,CONST WINED3DLIGHT * pLight) PURE;
...@@ -541,7 +541,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase) ...@@ -541,7 +541,7 @@ DECLARE_INTERFACE_(IWineD3DDevice,IWineD3DBase)
#define IWineD3DDevice_SetGammaRamp(p,a,b,c) (p)->lpVtbl->SetGammaRamp(p,a,b,c) #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_GetGammaRamp(p,a,b) (p)->lpVtbl->GetGammaRamp(p,a,b)
#define IWineD3DDevice_SetIndices(p,a) (p)->lpVtbl->SetIndices(p,a) #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_SetBaseVertexIndex(p, a) (p)->lpVtbl->SetBaseVertexIndex(p, a)
#define IWineD3DDevice_GetBaseVertexIndex(p,a) (p)->lpVtbl->GetBaseVertexIndex(p,a) #define IWineD3DDevice_GetBaseVertexIndex(p,a) (p)->lpVtbl->GetBaseVertexIndex(p,a)
#define IWineD3DDevice_SetLight(p,a,b) (p)->lpVtbl->SetLight(p,a,b) #define IWineD3DDevice_SetLight(p,a,b) (p)->lpVtbl->SetLight(p,a,b)
......
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