Commit 08cfdc11 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

d3drm: Implement IDirect3DRMMeshBuilderX_SetColor and IDirect3DRMMeshBuilderX_SetColorRGB.

parent 2e3c0d86
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#include "d3drm.h" #include "d3drm.h"
#include "dxfile.h" #include "dxfile.h"
#define D3DCOLOR_ARGB(a,r,g,b) ((D3DCOLOR)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))
HRESULT Direct3DRM_create(IUnknown** ppObj) DECLSPEC_HIDDEN; HRESULT Direct3DRM_create(IUnknown** ppObj) DECLSPEC_HIDDEN;
HRESULT Direct3DRMDevice_create(REFIID riid, IUnknown** ppObj) DECLSPEC_HIDDEN; HRESULT Direct3DRMDevice_create(REFIID riid, IUnknown** ppObj) DECLSPEC_HIDDEN;
HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown* parent_frame, IUnknown** ret_iface) DECLSPEC_HIDDEN; HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown* parent_frame, IUnknown** ret_iface) DECLSPEC_HIDDEN;
......
...@@ -29,8 +29,6 @@ ...@@ -29,8 +29,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3drm); WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
#define D3DCOLOR_ARGB(a,r,g,b) ((D3DCOLOR)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff)))
typedef struct { typedef struct {
IDirect3DRMLight IDirect3DRMLight_iface; IDirect3DRMLight IDirect3DRMLight_iface;
LONG ref; LONG ref;
......
...@@ -74,6 +74,7 @@ typedef struct { ...@@ -74,6 +74,7 @@ typedef struct {
LPVOID pFaceData; LPVOID pFaceData;
DWORD nb_coords2d; DWORD nb_coords2d;
Coords2d* pCoords2d; Coords2d* pCoords2d;
D3DCOLOR color;
IDirect3DRMMaterial2* material; IDirect3DRMMaterial2* material;
} IDirect3DRMMeshBuilderImpl; } IDirect3DRMMeshBuilderImpl;
...@@ -615,9 +616,9 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_SetColorRGB(IDirect3DRMMeshBui ...@@ -615,9 +616,9 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_SetColorRGB(IDirect3DRMMeshBui
{ {
IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder2(iface); IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder2(iface);
FIXME("(%p)->(%f,%f,%f): stub\n", This, red, green, blue); TRACE("(%p)->(%f,%f,%f)\n", This, red, green, blue);
return E_NOTIMPL; return IDirect3DRMMeshBuilder3_SetColorRGB(&This->IDirect3DRMMeshBuilder3_iface, red, green, blue);
} }
static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_SetColor(IDirect3DRMMeshBuilder2* iface, static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_SetColor(IDirect3DRMMeshBuilder2* iface,
...@@ -625,9 +626,9 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_SetColor(IDirect3DRMMeshBuilde ...@@ -625,9 +626,9 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_SetColor(IDirect3DRMMeshBuilde
{ {
IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder2(iface); IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder2(iface);
FIXME("(%p)->(%x): stub\n", This, color); TRACE("(%p)->(%x)\n", This, color);
return E_NOTIMPL; return IDirect3DRMMeshBuilder3_SetColor(&This->IDirect3DRMMeshBuilder3_iface, color);
} }
static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_SetTexture(IDirect3DRMMeshBuilder2* iface, static HRESULT WINAPI IDirect3DRMMeshBuilder2Impl_SetTexture(IDirect3DRMMeshBuilder2* iface,
...@@ -1702,9 +1703,13 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_SetColorRGB(IDirect3DRMMeshBui ...@@ -1702,9 +1703,13 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_SetColorRGB(IDirect3DRMMeshBui
{ {
IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder3(iface); IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder3(iface);
FIXME("(%p)->(%f,%f,%f): stub\n", This, red, green, blue); TRACE("(%p)->(%f,%f,%f)\n", This, red, green, blue);
return E_NOTIMPL; This->color = D3DCOLOR_ARGB(0xff, (BYTE)(red * 255.0f),
(BYTE)(green * 255.0f),
(BYTE)(blue * 255.0f));
return D3DRM_OK;
} }
static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_SetColor(IDirect3DRMMeshBuilder3* iface, static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_SetColor(IDirect3DRMMeshBuilder3* iface,
...@@ -1712,9 +1717,11 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_SetColor(IDirect3DRMMeshBuilde ...@@ -1712,9 +1717,11 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_SetColor(IDirect3DRMMeshBuilde
{ {
IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder3(iface); IDirect3DRMMeshBuilderImpl *This = impl_from_IDirect3DRMMeshBuilder3(iface);
FIXME("(%p)->(%x): stub\n", This, color); TRACE("(%p)->(%x)\n", This, color);
return E_NOTIMPL; This->color = color;
return D3DRM_OK;
} }
static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_SetTexture(IDirect3DRMMeshBuilder3* iface, static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_SetTexture(IDirect3DRMMeshBuilder3* iface,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment