Changelog: - more thunking in the D3DVertexBuffer COM object - added 'support' for GetInfo -- Lionel Ulmer - http://www.bbrox.org/
--- /home/ulmer/Wine/wine_base//dlls/ddraw/d3ddevice/main.c 2002-12-29 08:48:46.000000000 +0100 +++ /home/ulmer/Wine/wine_work//dlls/ddraw/d3ddevice/main.c 2002-12-31 18:35:22.000000000 +0100 @@ -684,7 +684,18 @@ { ICOM_THIS_FROM(IDirect3DDeviceImpl, IDirect3DDevice7, iface); FIXME("(%p/%p)->(%08lx,%p,%08lx): stub!\n", This, iface, dwDevInfoID, pDevInfoStruct, dwSize); - return DD_OK; + + if (TRACE_ON(ddraw)) { + TRACE(" info requested : "); + switch (dwDevInfoID) { + case D3DDEVINFOID_TEXTUREMANAGER: DPRINTF("D3DDEVINFOID_TEXTUREMANAGER\n"); break; + case D3DDEVINFOID_D3DTEXTUREMANAGER: DPRINTF("D3DDEVINFOID_D3DTEXTUREMANAGER\n"); break; + case D3DDEVINFOID_TEXTURING: DPRINTF("D3DDEVINFOID_TEXTURING\n"); break; + default: ERR(" invalid flag !!!\n"); return DDERR_INVALIDPARAMS; + } + } + + return S_FALSE; /* According to MSDN, this is valid for a non-debug driver */ } HRESULT WINAPI --- /home/ulmer/Wine/wine_base//dlls/ddraw/d3dvertexbuffer.c 2002-12-29 09:28:51.000000000 +0100 +++ /home/ulmer/Wine/wine_work//dlls/ddraw/d3dvertexbuffer.c 2002-12-31 18:54:49.000000000 +0100 @@ -117,14 +117,14 @@ } HRESULT WINAPI -Main_IDirect3DVertexBufferImpl_7_ProcessVertices(LPDIRECT3DVERTEXBUFFER7 iface, - DWORD dwVertexOp, - DWORD dwDestIndex, - DWORD dwCount, - LPDIRECT3DVERTEXBUFFER7 lpSrcBuffer, - DWORD dwSrcIndex, - LPDIRECT3DDEVICE7 lpD3DDevice, - DWORD dwFlags) +Main_IDirect3DVertexBufferImpl_7_1T_ProcessVertices(LPDIRECT3DVERTEXBUFFER7 iface, + DWORD dwVertexOp, + DWORD dwDestIndex, + DWORD dwCount, + LPDIRECT3DVERTEXBUFFER7 lpSrcBuffer, + DWORD dwSrcIndex, + LPDIRECT3DDEVICE7 lpD3DDevice, + DWORD dwFlags) { ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface); FIXME("(%p/%p)->(%08lx,%08lx,%08lx,%p,%08lx,%p,%08lx): stub!\n", This, iface, dwVertexOp, dwDestIndex, dwCount, lpSrcBuffer, dwSrcIndex, lpD3DDevice, dwFlags); @@ -149,9 +149,9 @@ } HRESULT WINAPI -Main_IDirect3DVertexBufferImpl_7_Optimize(LPDIRECT3DVERTEXBUFFER7 iface, - LPDIRECT3DDEVICE7 lpD3DDevice, - DWORD dwFlags) +Main_IDirect3DVertexBufferImpl_7_1T_Optimize(LPDIRECT3DVERTEXBUFFER7 iface, + LPDIRECT3DDEVICE7 lpD3DDevice, + DWORD dwFlags) { ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer7, iface); FIXME("(%p/%p)->(%p,%08lx): stub!\n", This, iface, lpD3DDevice, dwFlags); @@ -177,28 +177,36 @@ } HRESULT WINAPI -Main_IDirect3DVertexBufferImpl_1_ProcessVertices(LPDIRECT3DVERTEXBUFFER iface, - DWORD dwVertexOp, - DWORD dwDestIndex, - DWORD dwCount, - LPDIRECT3DVERTEXBUFFER lpSrcBuffer, - DWORD dwSrcIndex, - LPDIRECT3DDEVICE3 lpD3DDevice, - DWORD dwFlags) -{ - ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, iface); - FIXME("(%p/%p)->(%08lx,%08lx,%08lx,%p,%08lx,%p,%08lx): stub!\n", This, iface, dwVertexOp, dwDestIndex, dwCount, lpSrcBuffer, dwSrcIndex, lpD3DDevice, dwFlags); - return DD_OK; +Thunk_IDirect3DVertexBufferImpl_1_ProcessVertices(LPDIRECT3DVERTEXBUFFER iface, + DWORD dwVertexOp, + DWORD dwDestIndex, + DWORD dwCount, + LPDIRECT3DVERTEXBUFFER lpSrcBuffer, + DWORD dwSrcIndex, + LPDIRECT3DDEVICE3 lpD3DDevice, + DWORD dwFlags) +{ + TRACE("(%p)->(%08lx,%08lx,%08lx,%p,%08lx,%p,%08lx) thunking to IDirect3DVertexBuffer7 interface.\n", iface, + dwVertexOp, dwDestIndex, dwCount, lpSrcBuffer, dwSrcIndex, lpD3DDevice, dwFlags); + return IDirect3DVertexBuffer7_ProcessVertices(COM_INTERFACE_CAST(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, IDirect3DVertexBuffer7, iface), + dwVertexOp, + dwDestIndex, + dwCount, + COM_INTERFACE_CAST(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, IDirect3DVertexBuffer7, lpSrcBuffer), + dwSrcIndex, + COM_INTERFACE_CAST(IDirect3DDeviceImpl, IDirect3DDevice3, IDirect3DDevice7, lpD3DDevice), + dwFlags); } HRESULT WINAPI -Main_IDirect3DVertexBufferImpl_1_Optimize(LPDIRECT3DVERTEXBUFFER iface, - LPDIRECT3DDEVICE3 lpD3DDevice, - DWORD dwFlags) -{ - ICOM_THIS_FROM(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, iface); - FIXME("(%p/%p)->(%p,%08lx): stub!\n", This, iface, lpD3DDevice, dwFlags); - return DD_OK; +Thunk_IDirect3DVertexBufferImpl_1_Optimize(LPDIRECT3DVERTEXBUFFER iface, + LPDIRECT3DDEVICE3 lpD3DDevice, + DWORD dwFlags) +{ + TRACE("(%p)->(%p,%08lx) thunking to IDirect3DVertexBuffer7 interface.\n", iface, lpD3DDevice, dwFlags); + return IDirect3DVertexBuffer7_Optimize(COM_INTERFACE_CAST(IDirect3DVertexBufferImpl, IDirect3DVertexBuffer, IDirect3DVertexBuffer7, iface), + COM_INTERFACE_CAST(IDirect3DDeviceImpl, IDirect3DDevice3, IDirect3DDevice7, lpD3DDevice), + dwFlags); } HRESULT WINAPI @@ -269,9 +277,9 @@ XCAST(Release) Main_IDirect3DVertexBufferImpl_7_1T_Release, XCAST(Lock) Main_IDirect3DVertexBufferImpl_7_1T_Lock, XCAST(Unlock) Main_IDirect3DVertexBufferImpl_7_1T_Unlock, - XCAST(ProcessVertices) Main_IDirect3DVertexBufferImpl_7_ProcessVertices, + XCAST(ProcessVertices) Main_IDirect3DVertexBufferImpl_7_1T_ProcessVertices, XCAST(GetVertexBufferDesc) Main_IDirect3DVertexBufferImpl_7_1T_GetVertexBufferDesc, - XCAST(Optimize) Main_IDirect3DVertexBufferImpl_7_Optimize, + XCAST(Optimize) Main_IDirect3DVertexBufferImpl_7_1T_Optimize, XCAST(ProcessVerticesStrided) Main_IDirect3DVertexBufferImpl_7_ProcessVerticesStrided }; @@ -294,9 +302,9 @@ XCAST(Release) Thunk_IDirect3DVertexBufferImpl_1_Release, XCAST(Lock) Thunk_IDirect3DVertexBufferImpl_1_Lock, XCAST(Unlock) Thunk_IDirect3DVertexBufferImpl_1_Unlock, - XCAST(ProcessVertices) Main_IDirect3DVertexBufferImpl_1_ProcessVertices, + XCAST(ProcessVertices) Thunk_IDirect3DVertexBufferImpl_1_ProcessVertices, XCAST(GetVertexBufferDesc) Thunk_IDirect3DVertexBufferImpl_1_GetVertexBufferDesc, - XCAST(Optimize) Main_IDirect3DVertexBufferImpl_1_Optimize + XCAST(Optimize) Thunk_IDirect3DVertexBufferImpl_1_Optimize }; #if !defined(__STRICT_ANSI__) && defined(__GNUC__)