Christian Costa : d3drm: Implement IDirect3DRMMesh_GetGroupColor.

Alexandre Julliard julliard at winehq.org
Tue Jun 5 14:46:54 CDT 2012


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

Author: Christian Costa <titan.costa at gmail.com>
Date:   Mon Jun  4 19:30:41 2012 +0200

d3drm: Implement IDirect3DRMMesh_GetGroupColor.

---

 dlls/d3drm/meshbuilder.c |    5 +++--
 dlls/d3drm/tests/d3drm.c |    3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c
index c14dee0..c46b1a0 100644
--- a/dlls/d3drm/meshbuilder.c
+++ b/dlls/d3drm/meshbuilder.c
@@ -43,6 +43,7 @@ typedef struct {
     unsigned vertex_per_face;
     DWORD face_data_size;
     unsigned* face_data;
+    D3DCOLOR color;
     IDirect3DRMMaterial2* material;
     IDirect3DRMTexture3* texture;
 } mesh_group;
@@ -2750,9 +2751,9 @@ static D3DCOLOR WINAPI IDirect3DRMMeshImpl_GetGroupColor(IDirect3DRMMesh* iface,
 {
     IDirect3DRMMeshImpl *This = impl_from_IDirect3DRMMesh(iface);
 
-    FIXME("(%p)->(%u): stub\n", This, id);
+    TRACE("(%p)->(%u)\n", This, id);
 
-    return 0;
+    return This->groups[id].color;
 }
 
 static D3DRMMAPPING WINAPI IDirect3DRMMeshImpl_GetGroupMapping(IDirect3DRMMesh* iface, D3DRMGROUPINDEX id)
diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c
index 0cc9c83..54a356a 100644
--- a/dlls/d3drm/tests/d3drm.c
+++ b/dlls/d3drm/tests/d3drm.c
@@ -189,6 +189,7 @@ static void test_MeshBuilder(void)
     DWORD f[8];
     char name[10];
     DWORD size;
+    D3DCOLOR color;
 
     hr = pDirect3DRMCreate(&pD3DRM);
     ok(hr == D3DRM_OK, "Cannot get IDirect3DRM interface (hr = %x)\n", hr);
@@ -367,6 +368,8 @@ static void test_MeshBuilder(void)
         ok(nb_faces == 1, "Wrong number of faces %u (must be 1)\n", nb_faces);
         todo_wine ok(nb_face_vertices == 3, "Wrong number of vertices per face %u (must be 3)\n", nb_face_vertices);
         todo_wine ok(data_size == 3, "Wrong number of face data bytes %u (must be 3)\n", data_size);
+        color = IDirect3DRMMesh_GetGroupColor(mesh, 0);
+        todo_wine ok(color == 0xff00ff00, "Wrong color returned %#x instead of %#x\n", color, 0xff00ff00);
         hr = IDirect3DRMMesh_GetGroupTexture(mesh, 0, &texture);
         ok(hr == D3DRM_OK, "GetCroupTexture failed returning hr = %x\n", hr);
         ok(texture == NULL, "No texture should be present\n");




More information about the wine-cvs mailing list