d3drm: IDirect3DRMTexture3 Get/SetColors.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
913c82e48c
commit
90b2a8e11e
|
@ -66,6 +66,7 @@ struct d3drm_texture
|
||||||
IDirectDrawSurface *surface;
|
IDirectDrawSurface *surface;
|
||||||
LONG decal_x;
|
LONG decal_x;
|
||||||
LONG decal_y;
|
LONG decal_y;
|
||||||
|
DWORD max_colors;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct d3drm_frame
|
struct d3drm_frame
|
||||||
|
|
|
@ -2707,6 +2707,7 @@ static void test_Texture(void)
|
||||||
IDirect3DRMTexture3 *texture3;
|
IDirect3DRMTexture3 *texture3;
|
||||||
IDirectDrawSurface *surface;
|
IDirectDrawSurface *surface;
|
||||||
LONG decalx, decaly;
|
LONG decalx, decaly;
|
||||||
|
DWORD colors;
|
||||||
|
|
||||||
D3DRMIMAGE initimg =
|
D3DRMIMAGE initimg =
|
||||||
{
|
{
|
||||||
|
@ -2884,6 +2885,18 @@ static void test_Texture(void)
|
||||||
hr = IDirect3DRMTexture_SetDecalOrigin(texture1, 0, 0);
|
hr = IDirect3DRMTexture_SetDecalOrigin(texture1, 0, 0);
|
||||||
ok(hr == S_OK, "got %#lx.\n", hr);
|
ok(hr == S_OK, "got %#lx.\n", hr);
|
||||||
|
|
||||||
|
colors = IDirect3DRMTexture_GetColors(texture1);
|
||||||
|
ok(colors == 8, "got %ld.\n", colors);
|
||||||
|
|
||||||
|
hr = IDirect3DRMTexture_SetColors(texture1, 256);
|
||||||
|
ok(hr == S_OK, "got %#lx.\n", hr);
|
||||||
|
|
||||||
|
colors = IDirect3DRMTexture_GetColors(texture1);
|
||||||
|
ok(colors == 256, "got %ld.\n", colors);
|
||||||
|
|
||||||
|
hr = IDirect3DRMTexture_SetColors(texture1, 8);
|
||||||
|
ok(hr == S_OK, "got %#lx.\n", hr);
|
||||||
|
|
||||||
d3drm_img = IDirect3DRMTexture_GetImage(texture1);
|
d3drm_img = IDirect3DRMTexture_GetImage(texture1);
|
||||||
ok(!!d3drm_img, "Failed to get image.\n");
|
ok(!!d3drm_img, "Failed to get image.\n");
|
||||||
ok(d3drm_img == &initimg, "Expected image returned == %p, got %p.\n", &initimg, d3drm_img);
|
ok(d3drm_img == &initimg, "Expected image returned == %p, got %p.\n", &initimg, d3drm_img);
|
||||||
|
|
|
@ -1173,9 +1173,12 @@ static HRESULT WINAPI d3drm_texture3_Changed(IDirect3DRMTexture3 *iface,
|
||||||
|
|
||||||
static HRESULT WINAPI d3drm_texture3_SetColors(IDirect3DRMTexture3 *iface, DWORD max_colors)
|
static HRESULT WINAPI d3drm_texture3_SetColors(IDirect3DRMTexture3 *iface, DWORD max_colors)
|
||||||
{
|
{
|
||||||
FIXME("iface %p, max_colors %lu stub!\n", iface, max_colors);
|
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture3(iface);
|
||||||
|
TRACE("iface %p, max_colors %lu\n", iface, max_colors);
|
||||||
|
|
||||||
return E_NOTIMPL;
|
texture->max_colors= max_colors;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI d3drm_texture3_SetShades(IDirect3DRMTexture3 *iface, DWORD max_shades)
|
static HRESULT WINAPI d3drm_texture3_SetShades(IDirect3DRMTexture3 *iface, DWORD max_shades)
|
||||||
|
@ -1262,9 +1265,9 @@ static DWORD WINAPI d3drm_texture3_GetShades(IDirect3DRMTexture3 *iface)
|
||||||
|
|
||||||
static DWORD WINAPI d3drm_texture3_GetColors(IDirect3DRMTexture3 *iface)
|
static DWORD WINAPI d3drm_texture3_GetColors(IDirect3DRMTexture3 *iface)
|
||||||
{
|
{
|
||||||
FIXME("iface %p stub!\n", iface);
|
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture3(iface);
|
||||||
|
TRACE("iface %p\n", iface);
|
||||||
return 0;
|
return texture->max_colors;
|
||||||
}
|
}
|
||||||
|
|
||||||
static DWORD WINAPI d3drm_texture3_GetDecalScale(IDirect3DRMTexture3 *iface)
|
static DWORD WINAPI d3drm_texture3_GetDecalScale(IDirect3DRMTexture3 *iface)
|
||||||
|
@ -1433,6 +1436,7 @@ HRESULT d3drm_texture_create(struct d3drm_texture **texture, IDirect3DRM *d3drm)
|
||||||
object->IDirect3DRMTexture2_iface.lpVtbl = &d3drm_texture2_vtbl;
|
object->IDirect3DRMTexture2_iface.lpVtbl = &d3drm_texture2_vtbl;
|
||||||
object->IDirect3DRMTexture3_iface.lpVtbl = &d3drm_texture3_vtbl;
|
object->IDirect3DRMTexture3_iface.lpVtbl = &d3drm_texture3_vtbl;
|
||||||
object->d3drm = d3drm;
|
object->d3drm = d3drm;
|
||||||
|
object->max_colors = 8;
|
||||||
|
|
||||||
d3drm_object_init(&object->obj, classname);
|
d3drm_object_init(&object->obj, classname);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue