Commit 217516ce authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3drm: Define NONAMELESSUNION and NONAMELESSSTRUCT in d3drm_private.h.

parent 2bdc13ef
......@@ -21,12 +21,15 @@
#ifndef __D3DRM_PRIVATE_INCLUDED__
#define __D3DRM_PRIVATE_INCLUDED__
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#define COBJMACROS
#include <assert.h>
#include <math.h>
#include "d3drm.h"
#include "dxfile.h"
#include "d3drmwin.h"
#include "wine/debug.h"
#include "wine/list.h"
#ifndef ARRAY_SIZE
......
......@@ -18,14 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <assert.h>
#include "wine/debug.h"
#include "winbase.h"
#include "wingdi.h"
#include "config.h"
#include "wine/port.h"
#include "d3drm_private.h"
#include "initguid.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
......@@ -163,7 +159,7 @@ HRESULT d3drm_device_init(struct d3drm_device *device, UINT version, IDirectDraw
surface_desc.dwSize = sizeof(surface_desc);
surface_desc.dwFlags = DDSD_CAPS | DDSD_ZBUFFERBITDEPTH | DDSD_WIDTH | DDSD_HEIGHT;
surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER;
surface_desc.dwZBufferBitDepth = 16;
surface_desc.u2.dwZBufferBitDepth = 16;
surface_desc.dwWidth = desc.dwWidth;
surface_desc.dwHeight = desc.dwHeight;
hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &ds, NULL);
......
......@@ -17,8 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define NONAMELESSUNION
#include "config.h"
#include "wine/port.h"
......
......@@ -19,15 +19,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define NONAMELESSUNION
#include "wine/debug.h"
#include "winbase.h"
#include "wingdi.h"
#include "rmxfguid.h"
#include "config.h"
#include "wine/port.h"
#include "d3drm_private.h"
#include "rmxfguid.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
......
......@@ -18,10 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wine/debug.h"
#include "winbase.h"
#include "wingdi.h"
#include "config.h"
#include "wine/port.h"
#include "d3drm_private.h"
......@@ -39,10 +37,10 @@ static inline struct d3drm_viewport *impl_from_IDirect3DRMViewport2(IDirect3DRMV
static inline void d3drm_normalize_d3d_color(D3DCOLORVALUE *color_value, D3DCOLOR color)
{
color_value->r = RGBA_GETRED(color) / 255.0f;
color_value->g = RGBA_GETGREEN(color) / 255.0f;
color_value->b = RGBA_GETBLUE(color) / 255.0f;
color_value->a = RGBA_GETALPHA(color) / 255.0f;
color_value->u1.r = RGBA_GETRED(color) / 255.0f;
color_value->u2.g = RGBA_GETGREEN(color) / 255.0f;
color_value->u3.b = RGBA_GETBLUE(color) / 255.0f;
color_value->u4.a = RGBA_GETALPHA(color) / 255.0f;
}
static HRESULT d3drm_update_background_material(struct d3drm_viewport *viewport)
......@@ -58,7 +56,7 @@ static HRESULT d3drm_update_background_material(struct d3drm_viewport *viewport)
memset(&mat, 0, sizeof(mat));
mat.dwSize = sizeof(mat);
d3drm_normalize_d3d_color(&mat.diffuse, color);
d3drm_normalize_d3d_color(&mat.u.diffuse, color);
return IDirect3DMaterial_SetMaterial(viewport->material, &mat);
}
......@@ -427,9 +425,9 @@ static HRESULT WINAPI d3drm_viewport2_Clear(IDirect3DRMViewport2 *iface, DWORD f
TRACE("iface %p, flags %#x.\n", iface, flags);
clear_rect.x1 = clear_rect.y1 = 0;
clear_rect.x2 = viewport->device->width;
clear_rect.y2 = viewport->device->height;
clear_rect.u1.x1 = clear_rect.u2.y1 = 0;
clear_rect.u3.x2 = viewport->device->width;
clear_rect.u4.y2 = viewport->device->height;
if (flags & D3DRMCLEAR_TARGET)
{
......
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