d3drm: IDirect3DRMTexture3 Get/SetDecalOrigin.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alistair Leslie-Hughes 2022-05-13 13:08:33 +10:00 committed by Alexandre Julliard
parent b8f67bf78d
commit 913c82e48c
3 changed files with 33 additions and 4 deletions

View File

@ -64,6 +64,8 @@ struct d3drm_texture
IDirect3DRM *d3drm;
D3DRMIMAGE *image;
IDirectDrawSurface *surface;
LONG decal_x;
LONG decal_y;
};
struct d3drm_frame

View File

@ -2706,6 +2706,7 @@ static void test_Texture(void)
IDirect3DRMTexture2 *texture2;
IDirect3DRMTexture3 *texture3;
IDirectDrawSurface *surface;
LONG decalx, decaly;
D3DRMIMAGE initimg =
{
@ -2867,6 +2868,22 @@ static void test_Texture(void)
test_object_name((IDirect3DRMObject *)texture2);
test_object_name((IDirect3DRMObject *)texture3);
hr = IDirect3DRMTexture_GetDecalOrigin(texture1, &decalx, &decaly);
ok(hr == S_OK, "got %#lx.\n", hr);
ok(decalx == 0, "got %ld.\n", decalx);
ok(decaly == 0, "got %ld.\n", decaly);
hr = IDirect3DRMTexture_SetDecalOrigin(texture1, 1, 1);
ok(hr == S_OK, "got %#lx.\n", hr);
hr = IDirect3DRMTexture_GetDecalOrigin(texture1, &decalx, &decaly);
ok(hr == S_OK, "got %#lx.\n", hr);
ok(decalx == 1, "got %ld.\n", decalx);
ok(decaly == 1, "got %ld.\n", decaly);
hr = IDirect3DRMTexture_SetDecalOrigin(texture1, 0, 0);
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);

View File

@ -1194,9 +1194,14 @@ static HRESULT WINAPI d3drm_texture3_SetDecalSize(IDirect3DRMTexture3 *iface, D3
static HRESULT WINAPI d3drm_texture3_SetDecalOrigin(IDirect3DRMTexture3 *iface, LONG x, LONG y)
{
FIXME("iface %p, x %ld, y %ld stub!\n", iface, x, y);
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture3(iface);
return E_NOTIMPL;
TRACE("iface %p, x %ld, y %ld\n", iface, x, y);
texture->decal_x = x;
texture->decal_y = y;
return S_OK;
}
static HRESULT WINAPI d3drm_texture3_SetDecalScale(IDirect3DRMTexture3 *iface, DWORD scale)
@ -1229,9 +1234,14 @@ static HRESULT WINAPI d3drm_texture3_GetDecalSize(IDirect3DRMTexture3 *iface, D3
static HRESULT WINAPI d3drm_texture3_GetDecalOrigin(IDirect3DRMTexture3 *iface, LONG *x, LONG *y)
{
FIXME("iface %p, x %p, y %p stub!\n", iface, x, y);
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture3(iface);
return E_NOTIMPL;
TRACE("iface %p, x %p, y %p\n", iface, x, y);
*x = texture->decal_x;
*y = texture->decal_y;
return S_OK;
}
static D3DRMIMAGE * WINAPI d3drm_texture3_GetImage(IDirect3DRMTexture3 *iface)