Commit 0f440817 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

d3drm: IDirect3DRMTexture3 Get/SetShades.

parent 90b2a8e1
......@@ -67,6 +67,7 @@ struct d3drm_texture
LONG decal_x;
LONG decal_y;
DWORD max_colors;
DWORD max_shades;
};
struct d3drm_frame
......
......@@ -2707,7 +2707,7 @@ static void test_Texture(void)
IDirect3DRMTexture3 *texture3;
IDirectDrawSurface *surface;
LONG decalx, decaly;
DWORD colors;
DWORD colors, shades;
D3DRMIMAGE initimg =
{
......@@ -2897,6 +2897,24 @@ static void test_Texture(void)
hr = IDirect3DRMTexture_SetColors(texture1, 8);
ok(hr == S_OK, "got %#lx.\n", hr);
shades = IDirect3DRMTexture_GetShades(texture1);
ok(shades == 16, "got %ld.\n", shades);
hr = IDirect3DRMTexture_SetShades(texture1, 8);
ok(hr == S_OK, "got %#lx.\n", hr);
shades = IDirect3DRMTexture_GetShades(texture1);
ok(shades == 8, "got %ld.\n", shades);
hr = IDirect3DRMTexture_SetShades(texture1, 11);
ok(hr == S_OK, "got %#lx.\n", hr);
shades = IDirect3DRMTexture_GetShades(texture1);
ok(shades == 11, "got %ld.\n", shades);
hr = IDirect3DRMTexture_SetShades(texture1, 8);
ok(hr == S_OK, "got %#lx.\n", hr);
d3drm_img = IDirect3DRMTexture_GetImage(texture1);
ok(!!d3drm_img, "Failed to get image.\n");
ok(d3drm_img == &initimg, "Expected image returned == %p, got %p.\n", &initimg, d3drm_img);
......
......@@ -1183,9 +1183,12 @@ static HRESULT WINAPI d3drm_texture3_SetColors(IDirect3DRMTexture3 *iface, DWORD
static HRESULT WINAPI d3drm_texture3_SetShades(IDirect3DRMTexture3 *iface, DWORD max_shades)
{
FIXME("iface %p, max_shades %lu stub!\n", iface, max_shades);
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture3(iface);
TRACE("iface %p, max_shades %lu\n", iface, max_shades);
return E_NOTIMPL;
texture->max_shades = max_shades;
return S_OK;
}
static HRESULT WINAPI d3drm_texture3_SetDecalSize(IDirect3DRMTexture3 *iface, D3DVALUE width, D3DVALUE height)
......@@ -1258,9 +1261,9 @@ static D3DRMIMAGE * WINAPI d3drm_texture3_GetImage(IDirect3DRMTexture3 *iface)
static DWORD WINAPI d3drm_texture3_GetShades(IDirect3DRMTexture3 *iface)
{
FIXME("iface %p stub!\n", iface);
return 0;
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture3(iface);
TRACE("iface %p\n", iface);
return texture->max_shades;
}
static DWORD WINAPI d3drm_texture3_GetColors(IDirect3DRMTexture3 *iface)
......@@ -1437,6 +1440,7 @@ HRESULT d3drm_texture_create(struct d3drm_texture **texture, IDirect3DRM *d3drm)
object->IDirect3DRMTexture3_iface.lpVtbl = &d3drm_texture3_vtbl;
object->d3drm = d3drm;
object->max_colors = 8;
object->max_shades = 16;
d3drm_object_init(&object->obj, classname);
......
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