Module: wine Branch: master Commit: 24817de04eba73bd31c4c0b6969b045333c64653 URL: http://source.winehq.org/git/wine.git/?a=commit;h=24817de04eba73bd31c4c0b696...
Author: Christian Costa titan.costa@gmail.com Date: Tue May 22 08:57:37 2012 +0200
d3drm: Implement IDirect3DRMMesh_GetVertices.
---
dlls/d3drm/meshbuilder.c | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c index 357e285..9b5e2cc 100644 --- a/dlls/d3drm/meshbuilder.c +++ b/dlls/d3drm/meshbuilder.c @@ -2550,13 +2550,24 @@ static HRESULT WINAPI IDirect3DRMMeshImpl_GetGroup(IDirect3DRMMesh* iface, }
static HRESULT WINAPI IDirect3DRMMeshImpl_GetVertices(IDirect3DRMMesh* iface, - D3DRMGROUPINDEX id, DWORD index, DWORD count, D3DRMVERTEX *returnPtr) + D3DRMGROUPINDEX id, DWORD index, DWORD count, D3DRMVERTEX *return_ptr) { IDirect3DRMMeshImpl *This = impl_from_IDirect3DRMMesh(iface);
- FIXME("(%p)->(%u,%u,%u,%p): stub\n", This, id, index, count, returnPtr); + TRACE("(%p)->(%u,%u,%u,%p)\n", This, id, index, count, return_ptr);
- return E_NOTIMPL; + if (id >= This->nb_groups) + return D3DRMERR_BADVALUE; + + if ((index + count - 1) >= This->groups[id].nb_vertices) + return D3DRMERR_BADVALUE; + + if (!return_ptr) + return E_POINTER; + + memcpy(return_ptr, This->groups[id].vertices + index, count * sizeof(D3DRMVERTEX)); + + return D3DRM_OK; }
static D3DCOLOR WINAPI IDirect3DRMMeshImpl_GetGroupColor(IDirect3DRMMesh* iface, D3DRMGROUPINDEX id)