[PATCH 2/5] d3drm: Implement IDirect3DRMMesh_GetGroupColor.
Christian Costa
titan.costa at gmail.com
Mon Jun 4 12:30:41 CDT 2012
---
dlls/d3drm/meshbuilder.c | 5 +++--
dlls/d3drm/tests/d3drm.c | 4 ++++
2 files changed, 7 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 69aff86..76b8e1f 100644
--- a/dlls/d3drm/tests/d3drm.c
+++ b/dlls/d3drm/tests/d3drm.c
@@ -23,6 +23,7 @@
#include "wine/test.h"
+
static HMODULE d3drm_handle = 0;
static HRESULT (WINAPI * pDirect3DRMCreate)(LPDIRECT3DRM* ppDirect3DRM);
@@ -189,6 +190,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 +369,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-patches
mailing list