d3drm: Move struct d3drm_device to d3drm_private.h.
Signed-off-by: Aaryaman Vasishta <jem456.vasishta@gmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
44af0bb81b
commit
90d97a9346
|
@ -279,7 +279,7 @@ static HRESULT WINAPI d3drm1_CreateDevice(IDirect3DRM *iface,
|
|||
if (FAILED(hr = d3drm_device_create(&object, iface)))
|
||||
return hr;
|
||||
|
||||
*device = IDirect3DRMDevice_from_impl(object);
|
||||
*device = &object->IDirect3DRMDevice_iface;
|
||||
|
||||
return D3DRM_OK;
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ static HRESULT WINAPI d3drm1_CreateDeviceFromSurface(IDirect3DRM *iface, GUID *g
|
|||
return hr;
|
||||
|
||||
if (SUCCEEDED(hr = d3drm_device_init(object, 1, ddraw, backbuffer, TRUE)))
|
||||
*device = IDirect3DRMDevice_from_impl(object);
|
||||
*device = &object->IDirect3DRMDevice_iface;
|
||||
else
|
||||
d3drm_device_destroy(object);
|
||||
|
||||
|
@ -333,7 +333,7 @@ static HRESULT WINAPI d3drm1_CreateDeviceFromD3D(IDirect3DRM *iface,
|
|||
d3drm_device_destroy(object);
|
||||
return hr;
|
||||
}
|
||||
*device = IDirect3DRMDevice_from_impl(object);
|
||||
*device = &object->IDirect3DRMDevice_iface;
|
||||
|
||||
return D3DRM_OK;
|
||||
}
|
||||
|
@ -381,7 +381,7 @@ static HRESULT WINAPI d3drm1_CreateDeviceFromClipper(IDirect3DRM *iface,
|
|||
if (FAILED(hr))
|
||||
d3drm_device_destroy(object);
|
||||
else
|
||||
*device = IDirect3DRMDevice_from_impl(object);
|
||||
*device = &object->IDirect3DRMDevice_iface;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
@ -759,7 +759,7 @@ static HRESULT WINAPI d3drm2_CreateDevice(IDirect3DRM2 *iface,
|
|||
if (FAILED(hr = d3drm_device_create(&object, &d3drm->IDirect3DRM_iface)))
|
||||
return hr;
|
||||
|
||||
*device = IDirect3DRMDevice2_from_impl(object);
|
||||
*device = &object->IDirect3DRMDevice2_iface;
|
||||
|
||||
return D3DRM_OK;
|
||||
}
|
||||
|
@ -1309,7 +1309,7 @@ static HRESULT WINAPI d3drm3_CreateDevice(IDirect3DRM3 *iface,
|
|||
if (FAILED(hr = d3drm_device_create(&object, &d3drm->IDirect3DRM_iface)))
|
||||
return hr;
|
||||
|
||||
*device = IDirect3DRMDevice3_from_impl(object);
|
||||
*device = &object->IDirect3DRMDevice3_iface;
|
||||
|
||||
return D3DRM_OK;
|
||||
}
|
||||
|
@ -1338,7 +1338,7 @@ static HRESULT WINAPI d3drm3_CreateDeviceFromSurface(IDirect3DRM3 *iface, GUID *
|
|||
use_z_surface = !(flags & D3DRMDEVICE_NOZBUFFER);
|
||||
|
||||
if (SUCCEEDED(hr = d3drm_device_init(object, 3, ddraw, backbuffer, use_z_surface)))
|
||||
*device = IDirect3DRMDevice3_from_impl(object);
|
||||
*device = &object->IDirect3DRMDevice3_iface;
|
||||
else
|
||||
d3drm_device_destroy(object);
|
||||
|
||||
|
@ -1428,7 +1428,7 @@ static HRESULT WINAPI d3drm3_CreateDeviceFromClipper(IDirect3DRM3 *iface,
|
|||
if (FAILED(hr))
|
||||
d3drm_device_destroy(object);
|
||||
else
|
||||
*device = IDirect3DRMDevice3_from_impl(object);
|
||||
*device = &object->IDirect3DRMDevice3_iface;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "d3drm.h"
|
||||
#include "dxfile.h"
|
||||
#include "d3drmwin.h"
|
||||
|
||||
#include "wine/list.h"
|
||||
|
||||
|
@ -30,7 +31,6 @@
|
|||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(*(a)))
|
||||
#endif
|
||||
|
||||
struct d3drm_device;
|
||||
struct d3drm_object
|
||||
{
|
||||
LONG ref;
|
||||
|
@ -81,6 +81,25 @@ struct d3drm_viewport
|
|||
D3DRMPROJECTIONTYPE projection;
|
||||
};
|
||||
|
||||
struct d3drm_device
|
||||
{
|
||||
IDirect3DRMDevice IDirect3DRMDevice_iface;
|
||||
IDirect3DRMDevice2 IDirect3DRMDevice2_iface;
|
||||
IDirect3DRMDevice3 IDirect3DRMDevice3_iface;
|
||||
IDirect3DRMWinDevice IDirect3DRMWinDevice_iface;
|
||||
IDirect3DRM *d3drm;
|
||||
IDirectDraw *ddraw;
|
||||
IDirectDrawSurface *primary_surface, *render_target;
|
||||
IDirectDrawClipper *clipper;
|
||||
IDirect3DDevice *device;
|
||||
LONG ref;
|
||||
BOOL dither;
|
||||
D3DRMRENDERQUALITY quality;
|
||||
DWORD rendermode;
|
||||
DWORD height;
|
||||
DWORD width;
|
||||
};
|
||||
|
||||
HRESULT d3drm_device_create(struct d3drm_device **device, IDirect3DRM *d3drm) 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;
|
||||
|
@ -98,9 +117,6 @@ void d3drm_object_cleanup(IDirect3DRMObject *iface, struct d3drm_object *object)
|
|||
HRESULT d3drm_texture_create(struct d3drm_texture **texture, IDirect3DRM *d3drm) DECLSPEC_HIDDEN;
|
||||
HRESULT d3drm_frame_create(struct d3drm_frame **frame, IUnknown *parent_frame, IDirect3DRM *d3drm) DECLSPEC_HIDDEN;
|
||||
HRESULT d3drm_viewport_create(struct d3drm_viewport **viewport, IDirect3DRM *d3drm) 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 Direct3DRMLight_create(IUnknown** ppObj) DECLSPEC_HIDDEN;
|
||||
HRESULT Direct3DRMMesh_create(IDirect3DRMMesh** obj) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -27,29 +27,9 @@
|
|||
|
||||
#include "d3drm_private.h"
|
||||
#include "initguid.h"
|
||||
#include "d3drmwin.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
|
||||
|
||||
struct d3drm_device
|
||||
{
|
||||
IDirect3DRMDevice IDirect3DRMDevice_iface;
|
||||
IDirect3DRMDevice2 IDirect3DRMDevice2_iface;
|
||||
IDirect3DRMDevice3 IDirect3DRMDevice3_iface;
|
||||
IDirect3DRMWinDevice IDirect3DRMWinDevice_iface;
|
||||
IDirect3DRM *d3drm;
|
||||
IDirectDraw *ddraw;
|
||||
IDirectDrawSurface *primary_surface, *render_target;
|
||||
IDirectDrawClipper *clipper;
|
||||
IDirect3DDevice *device;
|
||||
LONG ref;
|
||||
BOOL dither;
|
||||
D3DRMRENDERQUALITY quality;
|
||||
DWORD rendermode;
|
||||
DWORD height;
|
||||
DWORD width;
|
||||
};
|
||||
|
||||
static inline struct d3drm_device *impl_from_IDirect3DRMDevice(IDirect3DRMDevice *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, struct d3drm_device, IDirect3DRMDevice_iface);
|
||||
|
@ -65,21 +45,6 @@ static inline struct d3drm_device *impl_from_IDirect3DRMDevice3(IDirect3DRMDevic
|
|||
return CONTAINING_RECORD(iface, struct d3drm_device, IDirect3DRMDevice3_iface);
|
||||
}
|
||||
|
||||
IDirect3DRMDevice *IDirect3DRMDevice_from_impl(struct d3drm_device *device)
|
||||
{
|
||||
return &device->IDirect3DRMDevice_iface;
|
||||
}
|
||||
|
||||
IDirect3DRMDevice2 *IDirect3DRMDevice2_from_impl(struct d3drm_device *device)
|
||||
{
|
||||
return &device->IDirect3DRMDevice2_iface;
|
||||
}
|
||||
|
||||
IDirect3DRMDevice3 *IDirect3DRMDevice3_from_impl(struct d3drm_device *device)
|
||||
{
|
||||
return &device->IDirect3DRMDevice3_iface;
|
||||
}
|
||||
|
||||
void d3drm_device_destroy(struct d3drm_device *device)
|
||||
{
|
||||
if (device->device)
|
||||
|
|
Loading…
Reference in New Issue