Commit fefb5a94 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Get rid of IDirect3DMaterialImpl.

parent a0264eb1
......@@ -4186,7 +4186,7 @@ static HRESULT WINAPI d3d3_CreateMaterial(IDirect3D3 *iface, IDirect3DMaterial3
IUnknown *outer_unknown)
{
struct ddraw *ddraw = impl_from_IDirect3D3(iface);
IDirect3DMaterialImpl *object;
struct d3d_material *object;
TRACE("iface %p, material %p, outer_unknown %p.\n", iface, material, outer_unknown);
......@@ -4209,7 +4209,7 @@ static HRESULT WINAPI d3d2_CreateMaterial(IDirect3D2 *iface, IDirect3DMaterial2
IUnknown *outer_unknown)
{
struct ddraw *ddraw = impl_from_IDirect3D2(iface);
IDirect3DMaterialImpl *object;
struct d3d_material *object;
TRACE("iface %p, material %p, outer_unknown %p.\n", iface, material, outer_unknown);
......@@ -4230,7 +4230,7 @@ static HRESULT WINAPI d3d1_CreateMaterial(IDirect3D *iface, IDirect3DMaterial **
IUnknown *outer_unknown)
{
struct ddraw *ddraw = impl_from_IDirect3D(iface);
IDirect3DMaterialImpl *object;
struct d3d_material *object;
TRACE("iface %p, material %p, outer_unknown %p.\n", iface, material, outer_unknown);
......
......@@ -42,7 +42,6 @@ extern const struct wined3d_parent_ops ddraw_null_wined3d_parent_ops DECLSPEC_HI
/* Typdef the interfaces */
typedef struct IDirect3DDeviceImpl IDirect3DDeviceImpl;
typedef struct IDirect3DMaterialImpl IDirect3DMaterialImpl;
typedef struct IDirect3DExecuteBufferImpl IDirect3DExecuteBufferImpl;
typedef struct IDirect3DVertexBufferImpl IDirect3DVertexBufferImpl;
......@@ -428,7 +427,7 @@ struct d3d_light *unsafe_impl_from_IDirect3DLight(IDirect3DLight *iface) DECLSPE
/******************************************************************************
* IDirect3DMaterial implementation structure - Wraps to D3D7
******************************************************************************/
struct IDirect3DMaterialImpl
struct d3d_material
{
IDirect3DMaterial3 IDirect3DMaterial3_iface;
IDirect3DMaterial2 IDirect3DMaterial2_iface;
......@@ -444,8 +443,8 @@ struct IDirect3DMaterialImpl
};
/* Helper functions */
void material_activate(IDirect3DMaterialImpl* This) DECLSPEC_HIDDEN;
IDirect3DMaterialImpl *d3d_material_create(struct ddraw *ddraw) DECLSPEC_HIDDEN;
void material_activate(struct d3d_material *material) DECLSPEC_HIDDEN;
struct d3d_material *d3d_material_create(struct ddraw *ddraw) DECLSPEC_HIDDEN;
/*****************************************************************************
* IDirect3DViewport - Wraps to D3D7
......@@ -474,9 +473,7 @@ struct d3d_viewport
struct list entry;
struct list light_list;
/* Background material */
IDirect3DMaterialImpl *background;
struct d3d_material *background;
};
struct d3d_viewport *unsafe_impl_from_IDirect3DViewport3(IDirect3DViewport3 *iface) DECLSPEC_HIDDEN;
......
......@@ -330,7 +330,7 @@ IDirect3DDeviceImpl_7_Release(IDirect3DDevice7 *iface)
case DDRAW_HANDLE_MATERIAL:
{
IDirect3DMaterialImpl *m = entry->object;
struct d3d_material *m = entry->object;
FIXME("Material handle %#x (%p) not unset properly.\n", i + 1, m);
m->Handle = 0;
break;
......@@ -3034,7 +3034,7 @@ IDirect3DDeviceImpl_3_SetLightState(IDirect3DDevice3 *iface,
wined3d_mutex_lock();
if (LightStateType == D3DLIGHTSTATE_MATERIAL /* 1 */)
{
IDirect3DMaterialImpl *m = ddraw_get_object(&This->handle_table, Value - 1, DDRAW_HANDLE_MATERIAL);
struct d3d_material *m = ddraw_get_object(&This->handle_table, Value - 1, DDRAW_HANDLE_MATERIAL);
if (!m)
{
WARN("Invalid material handle.\n");
......
......@@ -237,7 +237,7 @@ HRESULT d3d_execute_buffer_execute(IDirect3DExecuteBufferImpl *This,
ERR("Unexpected Light State Type %d\n", ci->u1.dlstLightStateType);
else if (ci->u1.dlstLightStateType == D3DLIGHTSTATE_MATERIAL /* 1 */)
{
IDirect3DMaterialImpl *m;
struct d3d_material *m;
m = ddraw_get_object(&lpDevice->handle_table, ci->u2.dwArg[0] - 1, DDRAW_HANDLE_MATERIAL);
if (!m)
......
......@@ -541,7 +541,7 @@ static HRESULT WINAPI d3d_viewport_LightElements(IDirect3DViewport3 *iface,
static HRESULT WINAPI d3d_viewport_SetBackground(IDirect3DViewport3 *iface, D3DMATERIALHANDLE hMat)
{
struct d3d_viewport *viewport = impl_from_IDirect3DViewport3(iface);
IDirect3DMaterialImpl *m;
struct d3d_material *m;
TRACE("iface %p, material %#x.\n", iface, hMat);
......
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