mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 09:50:07 +00:00
[D3DRM] Sync with Wine Staging 1.7.55. CORE-10536
svn path=/trunk/; revision=70083
This commit is contained in:
parent
c9ac75dd33
commit
65242a9709
|
@ -30,6 +30,6 @@ if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|||
target_link_libraries(d3drm mingwex)
|
||||
endif()
|
||||
|
||||
add_importlibs(d3drm d3dxof msvcrt kernel32 ntdll)
|
||||
add_importlibs(d3drm ddraw d3dxof msvcrt kernel32 ntdll)
|
||||
add_pch(d3drm d3drm_private.h SOURCE)
|
||||
add_cd_file(TARGET d3drm DESTINATION reactos/system32 FOR all)
|
||||
|
|
|
@ -220,37 +220,125 @@ static HRESULT WINAPI d3drm1_CreateMaterial(IDirect3DRM *iface,
|
|||
static HRESULT WINAPI d3drm1_CreateDevice(IDirect3DRM *iface,
|
||||
DWORD width, DWORD height, IDirect3DRMDevice **device)
|
||||
{
|
||||
struct d3drm_device *object;
|
||||
HRESULT hr;
|
||||
FIXME("iface %p, width %u, height %u, device %p partial stub!\n", iface, width, height, device);
|
||||
|
||||
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice, (IUnknown **)device);
|
||||
hr = d3drm_device_create(&object);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
*device = IDirect3DRMDevice_from_impl(object);
|
||||
|
||||
return D3DRM_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm1_CreateDeviceFromSurface(IDirect3DRM *iface, GUID *guid,
|
||||
IDirectDraw *ddraw, IDirectDrawSurface *backbuffer, IDirect3DRMDevice **device)
|
||||
{
|
||||
FIXME("iface %p, guid %s, ddraw %p, backbuffer %p, device %p partial stub.\n",
|
||||
struct d3drm *d3drm = impl_from_IDirect3DRM(iface);
|
||||
struct d3drm_device *object;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, guid %s, ddraw %p, backbuffer %p, device %p.\n",
|
||||
iface, debugstr_guid(guid), ddraw, backbuffer, device);
|
||||
|
||||
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice, (IUnknown **)device);
|
||||
if (!device)
|
||||
return D3DRMERR_BADVALUE;
|
||||
*device = NULL;
|
||||
|
||||
if (!backbuffer || !ddraw)
|
||||
return D3DRMERR_BADDEVICE;
|
||||
|
||||
hr = d3drm_device_create(&object);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
hr = d3drm_device_init(object, 1, &d3drm->IDirect3DRM_iface, ddraw, backbuffer, TRUE);
|
||||
if (SUCCEEDED(hr))
|
||||
*device = IDirect3DRMDevice_from_impl(object);
|
||||
else
|
||||
d3drm_device_destroy(object);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm1_CreateDeviceFromD3D(IDirect3DRM *iface,
|
||||
IDirect3D *d3d, IDirect3DDevice *d3d_device, IDirect3DRMDevice **device)
|
||||
{
|
||||
FIXME("iface %p, d3d %p, d3d_device %p, device %p partial stub.\n",
|
||||
struct d3drm_device *object;
|
||||
HRESULT hr;
|
||||
TRACE("iface %p, d3d %p, d3d_device %p, device %p.\n",
|
||||
iface, d3d, d3d_device, device);
|
||||
|
||||
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice, (IUnknown **)device);
|
||||
if (!device)
|
||||
return D3DRMERR_BADVALUE;
|
||||
*device = NULL;
|
||||
if (!d3d || !d3d_device)
|
||||
return D3DRMERR_BADVALUE;
|
||||
|
||||
hr = d3drm_device_create(&object);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
hr = d3drm_device_set_ddraw_device_d3d(object, iface, d3d, d3d_device);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
d3drm_device_destroy(object);
|
||||
return hr;
|
||||
}
|
||||
*device = IDirect3DRMDevice_from_impl(object);
|
||||
|
||||
return D3DRM_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm1_CreateDeviceFromClipper(IDirect3DRM *iface,
|
||||
IDirectDrawClipper *clipper, GUID *guid, int width, int height,
|
||||
IDirect3DRMDevice **device)
|
||||
{
|
||||
FIXME("iface %p, clipper %p, guid %s, width %d, height %d, device %p.\n",
|
||||
struct d3drm_device *object;
|
||||
IDirectDraw *ddraw;
|
||||
IDirectDrawSurface *render_target;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, clipper %p, guid %s, width %d, height %d, device %p.\n",
|
||||
iface, clipper, debugstr_guid(guid), width, height, device);
|
||||
|
||||
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice, (IUnknown **)device);
|
||||
if (!device)
|
||||
return D3DRMERR_BADVALUE;
|
||||
*device = NULL;
|
||||
|
||||
if (!clipper || !width || !height)
|
||||
return D3DRMERR_BADVALUE;
|
||||
|
||||
hr = DirectDrawCreate(NULL, &ddraw, NULL);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
hr = d3drm_device_create(&object);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
IDirectDraw_Release(ddraw);
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = d3drm_device_create_surfaces_from_clipper(object, ddraw, clipper, width, height, &render_target);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
IDirectDraw_Release(ddraw);
|
||||
d3drm_device_destroy(object);
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = d3drm_device_init(object, 1, iface, ddraw, render_target, TRUE);
|
||||
IDirectDraw_Release(ddraw);
|
||||
IDirectDrawSurface_Release(render_target);
|
||||
if (FAILED(hr))
|
||||
d3drm_device_destroy(object);
|
||||
else
|
||||
*device = IDirect3DRMDevice_from_impl(object);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm1_CreateTextureFromSurface(IDirect3DRM *iface,
|
||||
|
@ -572,37 +660,103 @@ static HRESULT WINAPI d3drm2_CreateMaterial(IDirect3DRM2 *iface,
|
|||
static HRESULT WINAPI d3drm2_CreateDevice(IDirect3DRM2 *iface,
|
||||
DWORD width, DWORD height, IDirect3DRMDevice2 **device)
|
||||
{
|
||||
FIXME("iface %p, width %u, height %u, device %p.\n", iface, width, height, device);
|
||||
struct d3drm_device *object;
|
||||
HRESULT hr;
|
||||
FIXME("iface %p, width %u, height %u, device %p partial stub!\n", iface, width, height, device);
|
||||
|
||||
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice2, (IUnknown **)device);
|
||||
hr = d3drm_device_create(&object);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
*device = IDirect3DRMDevice2_from_impl(object);
|
||||
|
||||
return D3DRM_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm2_CreateDeviceFromSurface(IDirect3DRM2 *iface, GUID *guid,
|
||||
IDirectDraw *ddraw, IDirectDrawSurface *backbuffer, IDirect3DRMDevice2 **device)
|
||||
{
|
||||
FIXME("iface %p, guid %s, ddraw %p, backbuffer %p, device %p partial stub.\n",
|
||||
struct d3drm *d3drm = impl_from_IDirect3DRM2(iface);
|
||||
IDirect3DRMDevice3 *device3;
|
||||
HRESULT hr;
|
||||
TRACE("iface %p, guid %s, ddraw %p, backbuffer %p, device %p.\n",
|
||||
iface, debugstr_guid(guid), ddraw, backbuffer, device);
|
||||
|
||||
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice2, (IUnknown **)device);
|
||||
if (!device)
|
||||
return D3DRMERR_BADVALUE;
|
||||
*device = NULL;
|
||||
hr = IDirect3DRM3_CreateDeviceFromSurface(&d3drm->IDirect3DRM3_iface, guid, ddraw, backbuffer, 0, &device3);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
hr = IDirect3DRMDevice3_QueryInterface(device3, &IID_IDirect3DRMDevice2, (void**)device);
|
||||
IDirect3DRMDevice3_Release(device3);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm2_CreateDeviceFromD3D(IDirect3DRM2 *iface,
|
||||
IDirect3D2 *d3d, IDirect3DDevice2 *d3d_device, IDirect3DRMDevice2 **device)
|
||||
IDirect3D2 *d3d, IDirect3DDevice2 *d3d_device, IDirect3DRMDevice2 **device)
|
||||
{
|
||||
FIXME("iface %p, d3d %p, d3d_device %p, device %p partial stub.\n",
|
||||
struct d3drm *d3drm = impl_from_IDirect3DRM2(iface);
|
||||
IDirect3D *d3d1;
|
||||
IDirect3DDevice *d3d_device1;
|
||||
IDirect3DRMDevice *device1;
|
||||
HRESULT hr;
|
||||
TRACE("iface %p, d3d %p, d3d_device %p, device %p.\n",
|
||||
iface, d3d, d3d_device, device);
|
||||
|
||||
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice2, (IUnknown **)device);
|
||||
if (!device)
|
||||
return D3DRMERR_BADVALUE;
|
||||
*device = NULL;
|
||||
if (!d3d || !d3d_device)
|
||||
return D3DRMERR_BADVALUE;
|
||||
|
||||
hr = IDirect3D2_QueryInterface(d3d, &IID_IDirect3D, (void **)&d3d1);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
hr = IDirect3DDevice2_QueryInterface(d3d_device, &IID_IDirect3DDevice, (void **)&d3d_device1);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
IDirect3D_Release(d3d1);
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = IDirect3DRM_CreateDeviceFromD3D(&d3drm->IDirect3DRM_iface, d3d1, d3d_device1, &device1);
|
||||
IDirect3D_Release(d3d1);
|
||||
IDirect3DDevice_Release(d3d_device1);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
hr = IDirect3DRMDevice_QueryInterface(device1, &IID_IDirect3DRMDevice2, (void **)device);
|
||||
IDirect3DRMDevice_Release(device1);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm2_CreateDeviceFromClipper(IDirect3DRM2 *iface,
|
||||
IDirectDrawClipper *clipper, GUID *guid, int width, int height,
|
||||
IDirect3DRMDevice2 **device)
|
||||
{
|
||||
FIXME("iface %p, clipper %p, guid %s, width %d, height %d, device %p partial stub.\n",
|
||||
struct d3drm *d3drm = impl_from_IDirect3DRM2(iface);
|
||||
IDirect3DRMDevice3 *device3;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, clipper %p, guid %s, width %d, height %d, device %p.\n",
|
||||
iface, clipper, debugstr_guid(guid), width, height, device);
|
||||
|
||||
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice2, (IUnknown **)device);
|
||||
if (!device)
|
||||
return D3DRMERR_BADVALUE;
|
||||
*device = NULL;
|
||||
hr = IDirect3DRM3_CreateDeviceFromClipper(&d3drm->IDirect3DRM3_iface, clipper, guid, width, height, &device3);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
hr = IDirect3DRMDevice3_QueryInterface(device3, &IID_IDirect3DRMDevice2, (void**)device);
|
||||
IDirect3DRMDevice3_Release(device3);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm2_CreateTextureFromSurface(IDirect3DRM2 *iface,
|
||||
|
@ -946,37 +1100,139 @@ static HRESULT WINAPI d3drm3_CreateMaterial(IDirect3DRM3 *iface,
|
|||
static HRESULT WINAPI d3drm3_CreateDevice(IDirect3DRM3 *iface,
|
||||
DWORD width, DWORD height, IDirect3DRMDevice3 **device)
|
||||
{
|
||||
struct d3drm_device *object;
|
||||
HRESULT hr;
|
||||
FIXME("iface %p, width %u, height %u, device %p partial stub!\n", iface, width, height, device);
|
||||
|
||||
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice3, (IUnknown **)device);
|
||||
hr = d3drm_device_create(&object);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
*device = IDirect3DRMDevice3_from_impl(object);
|
||||
|
||||
return D3DRM_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm3_CreateDeviceFromSurface(IDirect3DRM3 *iface, GUID *guid,
|
||||
IDirectDraw *ddraw, IDirectDrawSurface *backbuffer, DWORD flags, IDirect3DRMDevice3 **device)
|
||||
{
|
||||
FIXME("iface %p, guid %s, ddraw %p, backbuffer %p, flags %#x, device %p partial stub.\n",
|
||||
struct d3drm *d3drm = impl_from_IDirect3DRM3(iface);
|
||||
struct d3drm_device *object;
|
||||
BOOL use_z_surface;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, guid %s, ddraw %p, backbuffer %p, flags %#x, device %p.\n",
|
||||
iface, debugstr_guid(guid), ddraw, backbuffer, flags, device);
|
||||
|
||||
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice3, (IUnknown **)device);
|
||||
if (!device)
|
||||
return D3DRMERR_BADVALUE;
|
||||
*device = NULL;
|
||||
|
||||
if (!backbuffer || !ddraw)
|
||||
return D3DRMERR_BADDEVICE;
|
||||
|
||||
hr = d3drm_device_create(&object);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
use_z_surface = !(flags & D3DRMDEVICE_NOZBUFFER);
|
||||
|
||||
hr = d3drm_device_init(object, 3, &d3drm->IDirect3DRM_iface, ddraw, backbuffer, use_z_surface);
|
||||
if (SUCCEEDED(hr))
|
||||
*device = IDirect3DRMDevice3_from_impl(object);
|
||||
else
|
||||
d3drm_device_destroy(object);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm3_CreateDeviceFromD3D(IDirect3DRM3 *iface,
|
||||
IDirect3D2 *d3d, IDirect3DDevice2 *d3d_device, IDirect3DRMDevice3 **device)
|
||||
{
|
||||
FIXME("iface %p, d3d %p, d3d_device %p, device %p partial stub.\n",
|
||||
struct d3drm *d3drm = impl_from_IDirect3DRM3(iface);
|
||||
IDirect3D *d3d1;
|
||||
IDirect3DDevice *d3d_device1;
|
||||
IDirect3DRMDevice *device1;
|
||||
HRESULT hr;
|
||||
TRACE("iface %p, d3d %p, d3d_device %p, device %p.\n",
|
||||
iface, d3d, d3d_device, device);
|
||||
|
||||
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice3, (IUnknown **)device);
|
||||
if (!device)
|
||||
return D3DRMERR_BADVALUE;
|
||||
*device = NULL;
|
||||
if (!d3d || !d3d_device)
|
||||
return D3DRMERR_BADVALUE;
|
||||
|
||||
hr = IDirect3D2_QueryInterface(d3d, &IID_IDirect3D, (void **)&d3d1);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
hr = IDirect3DDevice2_QueryInterface(d3d_device, &IID_IDirect3DDevice, (void **)&d3d_device1);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
IDirect3D_Release(d3d1);
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = IDirect3DRM_CreateDeviceFromD3D(&d3drm->IDirect3DRM_iface, d3d1, d3d_device1, &device1);
|
||||
IDirect3D_Release(d3d1);
|
||||
IDirect3DDevice_Release(d3d_device1);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
hr = IDirect3DRMDevice_QueryInterface(device1, &IID_IDirect3DRMDevice3, (void **)device);
|
||||
IDirect3DRMDevice_Release(device1);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm3_CreateDeviceFromClipper(IDirect3DRM3 *iface,
|
||||
IDirectDrawClipper *clipper, GUID *guid, int width, int height,
|
||||
IDirect3DRMDevice3 **device)
|
||||
{
|
||||
FIXME("iface %p, clipper %p, guid %s, width %d, height %d, device %p partial stub.\n",
|
||||
struct d3drm *d3drm = impl_from_IDirect3DRM3(iface);
|
||||
struct d3drm_device *object;
|
||||
IDirectDraw *ddraw;
|
||||
IDirectDrawSurface *render_target;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, clipper %p, guid %s, width %d, height %d, device %p.\n",
|
||||
iface, clipper, debugstr_guid(guid), width, height, device);
|
||||
|
||||
return Direct3DRMDevice_create(&IID_IDirect3DRMDevice3, (IUnknown **)device);
|
||||
if (!device)
|
||||
return D3DRMERR_BADVALUE;
|
||||
*device = NULL;
|
||||
|
||||
if (!clipper || !width || !height)
|
||||
return D3DRMERR_BADVALUE;
|
||||
|
||||
hr = DirectDrawCreate(NULL, &ddraw, NULL);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
hr = d3drm_device_create(&object);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
IDirectDraw_Release(ddraw);
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = d3drm_device_create_surfaces_from_clipper(object, ddraw, clipper, width, height, &render_target);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
IDirectDraw_Release(ddraw);
|
||||
d3drm_device_destroy(object);
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = d3drm_device_init(object, 3, &d3drm->IDirect3DRM_iface, ddraw, render_target, TRUE);
|
||||
IDirectDraw_Release(ddraw);
|
||||
IDirectDrawSurface_Release(render_target);
|
||||
if (FAILED(hr))
|
||||
d3drm_device_destroy(object);
|
||||
else
|
||||
*device = IDirect3DRMDevice3_from_impl(object);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm3_CreateShadow(IDirect3DRM3 *iface, IUnknown *object, IDirect3DRMLight *light,
|
||||
|
|
|
@ -38,7 +38,12 @@
|
|||
#include <wine/debug.h>
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
|
||||
|
||||
HRESULT Direct3DRMDevice_create(REFIID riid, IUnknown** ppObj) DECLSPEC_HIDDEN;
|
||||
struct d3drm_device;
|
||||
|
||||
HRESULT d3drm_device_create(struct d3drm_device **out) DECLSPEC_HIDDEN;
|
||||
IDirect3DRMDevice *IDirect3DRMDevice_from_impl(struct d3drm_device *device) DECLSPEC_HIDDEN;
|
||||
IDirect3DRMDevice2 *IDirect3DRMDevice2_from_impl(struct d3drm_device *device) DECLSPEC_HIDDEN;
|
||||
IDirect3DRMDevice3 *IDirect3DRMDevice3_from_impl(struct d3drm_device *device) DECLSPEC_HIDDEN;
|
||||
HRESULT Direct3DRMFace_create(REFIID riid, IUnknown** ret_iface) DECLSPEC_HIDDEN;
|
||||
HRESULT Direct3DRMFrame_create(REFIID riid, IUnknown* parent_frame, IUnknown** ret_iface) DECLSPEC_HIDDEN;
|
||||
HRESULT Direct3DRMLight_create(IUnknown** ppObj) DECLSPEC_HIDDEN;
|
||||
|
@ -51,6 +56,16 @@ HRESULT Direct3DRMTexture_create(REFIID riid, IUnknown** ret_iface) DECLSPEC_HID
|
|||
HRESULT load_mesh_data(IDirect3DRMMeshBuilder3 *iface, IDirectXFileData *data,
|
||||
D3DRMLOADTEXTURECALLBACK load_texture_proc, void *arg) DECLSPEC_HIDDEN;
|
||||
|
||||
void d3drm_device_destroy(struct d3drm_device *device) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT d3drm_device_create_surfaces_from_clipper(struct d3drm_device *object, IDirectDraw *ddraw, IDirectDrawClipper *clipper, int width, int height,
|
||||
IDirectDrawSurface **surface) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT d3drm_device_init(struct d3drm_device *device, UINT version, IDirect3DRM *d3drm, IDirectDraw *ddraw, IDirectDrawSurface *surface,
|
||||
BOOL create_z_surface) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT d3drm_device_set_ddraw_device_d3d(struct d3drm_device *device, IDirect3DRM *d3drm, IDirect3D *d3d, IDirect3DDevice *d3d_device) DECLSPEC_HIDDEN;
|
||||
|
||||
struct d3drm_file_header
|
||||
{
|
||||
WORD major;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1065,7 +1065,7 @@ static BOOL WINAPI d3drm_frame2_GetBoxEnable(IDirect3DRMFrame2 *iface)
|
|||
{
|
||||
FIXME("iface %p stub!\n", iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_frame2_GetAxes(IDirect3DRMFrame2 *iface, D3DVECTOR *dir, D3DVECTOR *up)
|
||||
|
@ -1086,7 +1086,7 @@ static BOOL WINAPI d3drm_frame2_GetInheritAxes(IDirect3DRMFrame2 *iface)
|
|||
{
|
||||
FIXME("iface %p stub!\n", iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_frame2_GetHierarchyBox(IDirect3DRMFrame2 *iface, D3DRMBOX *box)
|
||||
|
@ -2006,7 +2006,7 @@ static BOOL WINAPI d3drm_frame3_GetBoxEnable(IDirect3DRMFrame3 *iface)
|
|||
{
|
||||
FIXME("iface %p stub!\n", iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_frame3_GetAxes(IDirect3DRMFrame3 *iface, D3DVECTOR *dir, D3DVECTOR *up)
|
||||
|
@ -2027,7 +2027,7 @@ static BOOL WINAPI d3drm_frame3_GetInheritAxes(IDirect3DRMFrame3 *iface)
|
|||
{
|
||||
FIXME("iface %p stub!\n", iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_frame3_GetHierarchyBox(IDirect3DRMFrame3 *iface, D3DRMBOX *box)
|
||||
|
|
|
@ -22,12 +22,18 @@
|
|||
|
||||
struct d3drm_texture
|
||||
{
|
||||
IDirect3DRMTexture IDirect3DRMTexture_iface;
|
||||
IDirect3DRMTexture2 IDirect3DRMTexture2_iface;
|
||||
IDirect3DRMTexture3 IDirect3DRMTexture3_iface;
|
||||
LONG ref;
|
||||
DWORD app_data;
|
||||
};
|
||||
|
||||
static inline struct d3drm_texture *impl_from_IDirect3DRMTexture(IDirect3DRMTexture *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, struct d3drm_texture, IDirect3DRMTexture_iface);
|
||||
}
|
||||
|
||||
static inline struct d3drm_texture *impl_from_IDirect3DRMTexture2(IDirect3DRMTexture2 *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, struct d3drm_texture, IDirect3DRMTexture2_iface);
|
||||
|
@ -38,62 +44,337 @@ static inline struct d3drm_texture *impl_from_IDirect3DRMTexture3(IDirect3DRMTex
|
|||
return CONTAINING_RECORD(iface, struct d3drm_texture, IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_QueryInterface(IDirect3DRMTexture *iface, REFIID riid, void **out)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
|
||||
|
||||
return IDirect3DRMTexture3_QueryInterface(&texture->IDirect3DRMTexture3_iface, riid, out);
|
||||
}
|
||||
|
||||
static ULONG WINAPI d3drm_texture1_AddRef(IDirect3DRMTexture *iface)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return IDirect3DRMTexture3_AddRef(&texture->IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI d3drm_texture1_Release(IDirect3DRMTexture *iface)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return IDirect3DRMTexture3_Release(&texture->IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_Clone(IDirect3DRMTexture *iface,
|
||||
IUnknown *outer, REFIID iid, void **out)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p, outer %p, iid %s, out %p.\n", iface, outer, debugstr_guid(iid), out);
|
||||
|
||||
return IDirect3DRMTexture3_Clone(&texture->IDirect3DRMTexture3_iface, outer, iid, out);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_AddDestroyCallback(IDirect3DRMTexture *iface,
|
||||
D3DRMOBJECTCALLBACK cb, void *ctx)
|
||||
{
|
||||
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_DeleteDestroyCallback(IDirect3DRMTexture *iface,
|
||||
D3DRMOBJECTCALLBACK cb, void *ctx)
|
||||
{
|
||||
FIXME("iface %p, cb %p, ctx %p stub!\n", iface, cb, ctx);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_SetAppData(IDirect3DRMTexture *iface, DWORD data)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p, data %#x.\n", iface, data);
|
||||
|
||||
return IDirect3DRMTexture3_SetAppData(&texture->IDirect3DRMTexture3_iface, data);
|
||||
}
|
||||
|
||||
static DWORD WINAPI d3drm_texture1_GetAppData(IDirect3DRMTexture *iface)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return IDirect3DRMTexture3_GetAppData(&texture->IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_SetName(IDirect3DRMTexture *iface, const char *name)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
|
||||
|
||||
return IDirect3DRMTexture3_SetName(&texture->IDirect3DRMTexture3_iface, name);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_GetName(IDirect3DRMTexture *iface, DWORD *size, char *name)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
||||
|
||||
return IDirect3DRMTexture3_GetName(&texture->IDirect3DRMTexture3_iface, size, name);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_GetClassName(IDirect3DRMTexture *iface, DWORD *size, char *name)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
||||
|
||||
return IDirect3DRMTexture3_GetClassName(&texture->IDirect3DRMTexture3_iface, size, name);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_InitFromFile(IDirect3DRMTexture *iface, const char *filename)
|
||||
{
|
||||
FIXME("iface %p, filename %s stub!\n", iface, debugstr_a(filename));
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_InitFromSurface(IDirect3DRMTexture *iface,
|
||||
IDirectDrawSurface *surface)
|
||||
{
|
||||
FIXME("iface %p, surface %p stub!\n", iface, surface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_InitFromResource(IDirect3DRMTexture *iface, HRSRC resource)
|
||||
{
|
||||
FIXME("iface %p, resource %p stub!\n", iface, resource);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_Changed(IDirect3DRMTexture *iface, BOOL pixels, BOOL palette)
|
||||
{
|
||||
FIXME("iface %p, pixels %#x, palette %#x stub!\n", iface, pixels, palette);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_SetColors(IDirect3DRMTexture *iface, DWORD max_colors)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p, max_colors %u.\n", iface, max_colors);
|
||||
|
||||
return IDirect3DRMTexture3_SetColors(&texture->IDirect3DRMTexture3_iface, max_colors);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_SetShades(IDirect3DRMTexture *iface, DWORD max_shades)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p, max_shades %u.\n", iface, max_shades);
|
||||
|
||||
return IDirect3DRMTexture3_SetShades(&texture->IDirect3DRMTexture3_iface, max_shades);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_SetDecalSize(IDirect3DRMTexture *iface, D3DVALUE width, D3DVALUE height)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p, width %.8e, height %.8e stub!\n", iface, width, height);
|
||||
|
||||
return IDirect3DRMTexture3_SetDecalSize(&texture->IDirect3DRMTexture3_iface, width, height);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_SetDecalOrigin(IDirect3DRMTexture *iface, LONG x, LONG y)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p, x %d, y %d.\n", iface, x, y);
|
||||
|
||||
return IDirect3DRMTexture3_SetDecalOrigin(&texture->IDirect3DRMTexture3_iface, x, y);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_SetDecalScale(IDirect3DRMTexture *iface, DWORD scale)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p, scale %u.\n", iface, scale);
|
||||
|
||||
return IDirect3DRMTexture3_SetDecalScale(&texture->IDirect3DRMTexture3_iface, scale);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_SetDecalTransparency(IDirect3DRMTexture *iface, BOOL transparency)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p, transparency %#x.\n", iface, transparency);
|
||||
|
||||
return IDirect3DRMTexture3_SetDecalTransparency(&texture->IDirect3DRMTexture3_iface, transparency);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_SetDecalTransparentColor(IDirect3DRMTexture *iface, D3DCOLOR color)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p, color 0x%08x.\n", iface, color);
|
||||
|
||||
return IDirect3DRMTexture3_SetDecalTransparentColor(&texture->IDirect3DRMTexture3_iface, color);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_GetDecalSize(IDirect3DRMTexture *iface, D3DVALUE *width, D3DVALUE *height)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p, width %p, height %p.\n", iface, width, height);
|
||||
|
||||
return IDirect3DRMTexture3_GetDecalSize(&texture->IDirect3DRMTexture3_iface, width, height);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture1_GetDecalOrigin(IDirect3DRMTexture *iface, LONG *x, LONG *y)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p, x %p, y %p.\n", iface, x, y);
|
||||
|
||||
return IDirect3DRMTexture3_GetDecalOrigin(&texture->IDirect3DRMTexture3_iface, x, y);
|
||||
}
|
||||
|
||||
static D3DRMIMAGE * WINAPI d3drm_texture1_GetImage(IDirect3DRMTexture *iface)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return IDirect3DRMTexture3_GetImage(&texture->IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static DWORD WINAPI d3drm_texture1_GetShades(IDirect3DRMTexture *iface)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return IDirect3DRMTexture3_GetShades(&texture->IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static DWORD WINAPI d3drm_texture1_GetColors(IDirect3DRMTexture *iface)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return IDirect3DRMTexture3_GetColors(&texture->IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static DWORD WINAPI d3drm_texture1_GetDecalScale(IDirect3DRMTexture *iface)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return IDirect3DRMTexture3_GetDecalScale(&texture->IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static BOOL WINAPI d3drm_texture1_GetDecalTransparency(IDirect3DRMTexture *iface)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return IDirect3DRMTexture3_GetDecalTransparency(&texture->IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static D3DCOLOR WINAPI d3drm_texture1_GetDecalTransparentColor(IDirect3DRMTexture *iface)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture(iface);
|
||||
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return IDirect3DRMTexture3_GetDecalTransparentColor(&texture->IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static const struct IDirect3DRMTextureVtbl d3drm_texture1_vtbl =
|
||||
{
|
||||
d3drm_texture1_QueryInterface,
|
||||
d3drm_texture1_AddRef,
|
||||
d3drm_texture1_Release,
|
||||
d3drm_texture1_Clone,
|
||||
d3drm_texture1_AddDestroyCallback,
|
||||
d3drm_texture1_DeleteDestroyCallback,
|
||||
d3drm_texture1_SetAppData,
|
||||
d3drm_texture1_GetAppData,
|
||||
d3drm_texture1_SetName,
|
||||
d3drm_texture1_GetName,
|
||||
d3drm_texture1_GetClassName,
|
||||
d3drm_texture1_InitFromFile,
|
||||
d3drm_texture1_InitFromSurface,
|
||||
d3drm_texture1_InitFromResource,
|
||||
d3drm_texture1_Changed,
|
||||
d3drm_texture1_SetColors,
|
||||
d3drm_texture1_SetShades,
|
||||
d3drm_texture1_SetDecalSize,
|
||||
d3drm_texture1_SetDecalOrigin,
|
||||
d3drm_texture1_SetDecalScale,
|
||||
d3drm_texture1_SetDecalTransparency,
|
||||
d3drm_texture1_SetDecalTransparentColor,
|
||||
d3drm_texture1_GetDecalSize,
|
||||
d3drm_texture1_GetDecalOrigin,
|
||||
d3drm_texture1_GetImage,
|
||||
d3drm_texture1_GetShades,
|
||||
d3drm_texture1_GetColors,
|
||||
d3drm_texture1_GetDecalScale,
|
||||
d3drm_texture1_GetDecalTransparency,
|
||||
d3drm_texture1_GetDecalTransparentColor,
|
||||
};
|
||||
|
||||
static HRESULT WINAPI d3drm_texture2_QueryInterface(IDirect3DRMTexture2 *iface, REFIID riid, void **out)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
|
||||
|
||||
if (IsEqualGUID(riid, &IID_IDirect3DRMTexture2)
|
||||
|| IsEqualGUID(riid, &IID_IDirect3DRMTexture)
|
||||
|| IsEqualGUID(riid, &IID_IUnknown))
|
||||
{
|
||||
*out = &texture->IDirect3DRMTexture2_iface;
|
||||
}
|
||||
else if (IsEqualGUID(riid, &IID_IDirect3DRMTexture3))
|
||||
{
|
||||
*out = &texture->IDirect3DRMTexture3_iface;
|
||||
}
|
||||
else
|
||||
{
|
||||
*out = NULL;
|
||||
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
IUnknown_AddRef((IUnknown *)*out);
|
||||
return S_OK;
|
||||
return IDirect3DRMTexture3_QueryInterface(&texture->IDirect3DRMTexture3_iface, riid, out);
|
||||
}
|
||||
|
||||
static ULONG WINAPI d3drm_texture2_AddRef(IDirect3DRMTexture2 *iface)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
ULONG refcount = InterlockedIncrement(&texture->ref);
|
||||
|
||||
TRACE("%p increasing refcount to %u.\n", iface, refcount);
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return refcount;
|
||||
return IDirect3DRMTexture3_AddRef(&texture->IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static ULONG WINAPI d3drm_texture2_Release(IDirect3DRMTexture2 *iface)
|
||||
{
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
ULONG refcount = InterlockedDecrement(&texture->ref);
|
||||
|
||||
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
if (!refcount)
|
||||
HeapFree(GetProcessHeap(), 0, texture);
|
||||
|
||||
return refcount;
|
||||
return IDirect3DRMTexture3_Release(&texture->IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture2_Clone(IDirect3DRMTexture2 *iface,
|
||||
IUnknown *outer, REFIID iid, void **out)
|
||||
{
|
||||
FIXME("iface %p, outer %p, iid %s, out %p stub!\n", iface, outer, debugstr_guid(iid), out);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("iface %p, outer %p, iid %s, out %p.\n", iface, outer, debugstr_guid(iid), out);
|
||||
|
||||
return IDirect3DRMTexture3_Clone(&texture->IDirect3DRMTexture3_iface, outer, iid, out);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture2_AddDestroyCallback(IDirect3DRMTexture2 *iface,
|
||||
|
@ -132,16 +413,20 @@ static DWORD WINAPI d3drm_texture2_GetAppData(IDirect3DRMTexture2 *iface)
|
|||
|
||||
static HRESULT WINAPI d3drm_texture2_SetName(IDirect3DRMTexture2 *iface, const char *name)
|
||||
{
|
||||
FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name));
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("iface %p, name %s.\n", iface, debugstr_a(name));
|
||||
|
||||
return IDirect3DRMTexture3_SetName(&texture->IDirect3DRMTexture3_iface, name);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture2_GetName(IDirect3DRMTexture2 *iface, DWORD *size, char *name)
|
||||
{
|
||||
FIXME("iface %p, size %p, name %p stub!\n", iface, size, name);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("iface %p, size %p, name %p.\n", iface, size, name);
|
||||
|
||||
return IDirect3DRMTexture3_GetName(&texture->IDirect3DRMTexture3_iface, size, name);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture2_GetClassName(IDirect3DRMTexture2 *iface, DWORD *size, char *name)
|
||||
|
@ -184,107 +469,137 @@ static HRESULT WINAPI d3drm_texture2_Changed(IDirect3DRMTexture2 *iface, BOOL pi
|
|||
|
||||
static HRESULT WINAPI d3drm_texture2_SetColors(IDirect3DRMTexture2 *iface, DWORD max_colors)
|
||||
{
|
||||
FIXME("iface %p, max_colors %u stub!\n", iface, max_colors);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("iface %p, max_colors %u.\n", iface, max_colors);
|
||||
|
||||
return IDirect3DRMTexture3_SetColors(&texture->IDirect3DRMTexture3_iface, max_colors);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture2_SetShades(IDirect3DRMTexture2 *iface, DWORD max_shades)
|
||||
{
|
||||
FIXME("iface %p, max_shades %u stub!\n", iface, max_shades);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("iface %p, max_shades %u.\n", iface, max_shades);
|
||||
|
||||
return IDirect3DRMTexture3_SetShades(&texture->IDirect3DRMTexture3_iface, max_shades);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture2_SetDecalSize(IDirect3DRMTexture2 *iface, D3DVALUE width, D3DVALUE height)
|
||||
{
|
||||
FIXME("iface %p, width %.8e, height %.8e stub!\n", iface, width, height);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("iface %p, width %.8e, height %.8e stub!\n", iface, width, height);
|
||||
|
||||
return IDirect3DRMTexture3_SetDecalSize(&texture->IDirect3DRMTexture3_iface, width, height);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture2_SetDecalOrigin(IDirect3DRMTexture2 *iface, LONG x, LONG y)
|
||||
{
|
||||
FIXME("iface %p, x %d, y %d stub!\n", iface, x, y);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("iface %p, x %d, y %d.\n", iface, x, y);
|
||||
|
||||
return IDirect3DRMTexture3_SetDecalOrigin(&texture->IDirect3DRMTexture3_iface, x, y);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture2_SetDecalScale(IDirect3DRMTexture2 *iface, DWORD scale)
|
||||
{
|
||||
FIXME("iface %p, scale %u stub!\n", iface, scale);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("iface %p, scale %u.\n", iface, scale);
|
||||
|
||||
return IDirect3DRMTexture3_SetDecalScale(&texture->IDirect3DRMTexture3_iface, scale);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture2_SetDecalTransparency(IDirect3DRMTexture2 *iface, BOOL transparency)
|
||||
{
|
||||
FIXME("iface %p, transparency %#x stub!\n", iface, transparency);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("iface %p, transparency %#x.\n", iface, transparency);
|
||||
|
||||
return IDirect3DRMTexture3_SetDecalTransparency(&texture->IDirect3DRMTexture3_iface, transparency);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture2_SetDecalTransparentColor(IDirect3DRMTexture2 *iface, D3DCOLOR color)
|
||||
{
|
||||
FIXME("iface %p, color 0x%08x stub!\n", iface, color);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("iface %p, color 0x%08x.\n", iface, color);
|
||||
|
||||
return IDirect3DRMTexture3_SetDecalTransparentColor(&texture->IDirect3DRMTexture3_iface, color);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture2_GetDecalSize(IDirect3DRMTexture2 *iface, D3DVALUE *width, D3DVALUE *height)
|
||||
{
|
||||
FIXME("iface %p, width %p, height %p stub!\n", iface, width, height);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("iface %p, width %p, height %p.\n", iface, width, height);
|
||||
|
||||
return IDirect3DRMTexture3_GetDecalSize(&texture->IDirect3DRMTexture3_iface, width, height);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture2_GetDecalOrigin(IDirect3DRMTexture2 *iface, LONG *x, LONG *y)
|
||||
{
|
||||
FIXME("iface %p, x %p, y %p stub!\n", iface, x, y);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("iface %p, x %p, y %p.\n", iface, x, y);
|
||||
|
||||
return IDirect3DRMTexture3_GetDecalOrigin(&texture->IDirect3DRMTexture3_iface, x, y);
|
||||
}
|
||||
|
||||
static D3DRMIMAGE * WINAPI d3drm_texture2_GetImage(IDirect3DRMTexture2 *iface)
|
||||
{
|
||||
FIXME("iface %p stub!\n", iface);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return NULL;
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return IDirect3DRMTexture3_GetImage(&texture->IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static DWORD WINAPI d3drm_texture2_GetShades(IDirect3DRMTexture2 *iface)
|
||||
{
|
||||
FIXME("iface %p stub!\n", iface);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return 0;
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return IDirect3DRMTexture3_GetShades(&texture->IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static DWORD WINAPI d3drm_texture2_GetColors(IDirect3DRMTexture2 *iface)
|
||||
{
|
||||
FIXME("iface %p stub!\n", iface);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return 0;
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return IDirect3DRMTexture3_GetColors(&texture->IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static DWORD WINAPI d3drm_texture2_GetDecalScale(IDirect3DRMTexture2 *iface)
|
||||
{
|
||||
FIXME("iface %p stub!\n", iface);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return 0;
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return IDirect3DRMTexture3_GetDecalScale(&texture->IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static BOOL WINAPI d3drm_texture2_GetDecalTransparency(IDirect3DRMTexture2 *iface)
|
||||
{
|
||||
FIXME("iface %p stub!\n", iface);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return FALSE;
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return IDirect3DRMTexture3_GetDecalTransparency(&texture->IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static D3DCOLOR WINAPI d3drm_texture2_GetDecalTransparentColor(IDirect3DRMTexture2 *iface)
|
||||
{
|
||||
FIXME("iface %p stub!\n", iface);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return 0;
|
||||
TRACE("iface %p.\n", iface);
|
||||
|
||||
return IDirect3DRMTexture3_GetDecalTransparentColor(&texture->IDirect3DRMTexture3_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI d3drm_texture2_InitFromImage(IDirect3DRMTexture2 *iface, D3DRMIMAGE *image)
|
||||
|
@ -305,9 +620,11 @@ static HRESULT WINAPI d3drm_texture2_InitFromResource2(IDirect3DRMTexture2 *ifac
|
|||
|
||||
static HRESULT WINAPI d3drm_texture2_GenerateMIPMap(IDirect3DRMTexture2 *iface, DWORD flags)
|
||||
{
|
||||
FIXME("iface %p, flags %#x stub!\n", iface, flags);
|
||||
struct d3drm_texture *texture = impl_from_IDirect3DRMTexture2(iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
TRACE("iface %p, flags %#x.\n", iface, flags);
|
||||
|
||||
return IDirect3DRMTexture3_GenerateMIPMap(&texture->IDirect3DRMTexture3_iface, flags);
|
||||
}
|
||||
|
||||
static const struct IDirect3DRMTexture2Vtbl d3drm_texture2_vtbl =
|
||||
|
@ -710,20 +1027,20 @@ static const struct IDirect3DRMTexture3Vtbl d3drm_texture3_vtbl =
|
|||
HRESULT Direct3DRMTexture_create(REFIID riid, IUnknown **out)
|
||||
{
|
||||
struct d3drm_texture *object;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("riid %s, out %p.\n", debugstr_guid(riid), out);
|
||||
|
||||
if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
object->IDirect3DRMTexture_iface.lpVtbl = &d3drm_texture1_vtbl;
|
||||
object->IDirect3DRMTexture2_iface.lpVtbl = &d3drm_texture2_vtbl;
|
||||
object->IDirect3DRMTexture3_iface.lpVtbl = &d3drm_texture3_vtbl;
|
||||
object->ref = 1;
|
||||
|
||||
if (IsEqualGUID(riid, &IID_IDirect3DRMTexture3))
|
||||
*out = (IUnknown *)&object->IDirect3DRMTexture3_iface;
|
||||
else
|
||||
*out = (IUnknown *)&object->IDirect3DRMTexture2_iface;
|
||||
hr = IDirect3DRMTexture3_QueryInterface(&object->IDirect3DRMTexture3_iface, riid, (void **)out);
|
||||
IDirect3DRMTexture3_Release(&object->IDirect3DRMTexture3_iface);
|
||||
|
||||
return S_OK;
|
||||
return hr;
|
||||
}
|
||||
|
|
|
@ -298,7 +298,7 @@ static BOOL WINAPI d3drm_viewport1_GetUniformScaling(IDirect3DRMViewport *iface)
|
|||
{
|
||||
FIXME("iface %p stub!\n", iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static LONG WINAPI d3drm_viewport1_GetX(IDirect3DRMViewport *iface)
|
||||
|
@ -663,7 +663,7 @@ static BOOL WINAPI d3drm_viewport2_GetUniformScaling(IDirect3DRMViewport2 *iface
|
|||
{
|
||||
FIXME("iface %p stub!\n", iface);
|
||||
|
||||
return E_NOTIMPL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static LONG WINAPI d3drm_viewport2_GetX(IDirect3DRMViewport2 *iface)
|
||||
|
|
|
@ -25,7 +25,7 @@ reactos/dll/directx/wine/amstream # Synced to WineStaging-1.7.55
|
|||
reactos/dll/directx/wine/d3d8 # Synced to WineStaging-1.7.55
|
||||
reactos/dll/directx/wine/d3d9 # Synced to WineStaging-1.7.55
|
||||
reactos/dll/directx/wine/d3dcompiler_43 # Synced to WineStaging-1.7.55
|
||||
reactos/dll/directx/wine/d3drm # Synced to WineStaging-1.7.47
|
||||
reactos/dll/directx/wine/d3drm # Synced to WineStaging-1.7.55
|
||||
reactos/dll/directx/wine/d3dx9_24 => 43 # Synced to WineStaging-1.7.55
|
||||
reactos/dll/directx/wine/d3dxof # Synced to WineStaging-1.7.47
|
||||
reactos/dll/directx/wine/ddraw # Synced to WineStaging-1.7.55
|
||||
|
|
Loading…
Reference in a new issue