From ab8619e92063729e16835e46e5c15e5b4e20ef4b Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Mon, 4 Jun 2012 19:30:41 +0200 Subject: [PATCH] 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 c14dee048da..c46b1a090b9 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 0cc9c835697..54a356aa92a 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"); -- 2.11.4.GIT