=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: d3drm: Implement IDirect3DRMMeshBuilder3_GetNormals.

Alexandre Julliard julliard at winehq.org
Mon May 13 15:02:45 CDT 2013


Module: wine
Branch: master
Commit: 60aaed781c0c7dc5ce39aaf846bc1c3bb7d5e8a0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=60aaed781c0c7dc5ce39aaf846bc1c3bb7d5e8a0

Author: André Hentschel <nerv at dawncrow.de>
Date:   Sun May 12 23:54:04 2013 +0200

d3drm: Implement IDirect3DRMMeshBuilder3_GetNormals.

---

 dlls/d3drm/meshbuilder.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c
index 549a5dd..eecf629 100644
--- a/dlls/d3drm/meshbuilder.c
+++ b/dlls/d3drm/meshbuilder.c
@@ -2379,13 +2379,19 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_SetNormals(IDirect3DRMMeshBuil
 }
 
 static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_GetNormals(IDirect3DRMMeshBuilder3 *iface,
-        DWORD IndexFirst, DWORD *count, D3DVECTOR *vector)
+        DWORD IndexFirst, DWORD *ncount, D3DVECTOR *normals)
 {
     IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder3(iface);
+    DWORD count = This->nb_normals - IndexFirst;
 
-    FIXME("(%p)->(%u,%p,%p): stub\n", This, IndexFirst, count, vector);
+    TRACE("(%p)->(%u,%p,%p)\n", This, IndexFirst, ncount, normals);
 
-    return E_NOTIMPL;
+    if (ncount)
+        *ncount = count;
+    if (normals && This->nb_normals)
+        memcpy(normals, This->pNormals + IndexFirst, count * sizeof(D3DVECTOR));
+
+    return D3DRM_OK;
 }
 
 static int WINAPI IDirect3DRMMeshBuilder3Impl_GetNormalCount(IDirect3DRMMeshBuilder3* iface)




More information about the wine-cvs mailing list