d3drm: Define NONAMELESSUNION and NONAMELESSSTRUCT in d3drm_private.h.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2016-11-10 16:17:40 +01:00 committed by Alexandre Julliard
parent 2bdc13efc6
commit 217516ce79
5 changed files with 20 additions and 29 deletions

View File

@ -21,12 +21,15 @@
#ifndef __D3DRM_PRIVATE_INCLUDED__ #ifndef __D3DRM_PRIVATE_INCLUDED__
#define __D3DRM_PRIVATE_INCLUDED__ #define __D3DRM_PRIVATE_INCLUDED__
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#define COBJMACROS #define COBJMACROS
#include <assert.h>
#include <math.h> #include <math.h>
#include "d3drm.h" #include "d3drm.h"
#include "dxfile.h" #include "dxfile.h"
#include "d3drmwin.h" #include "d3drmwin.h"
#include "wine/debug.h"
#include "wine/list.h" #include "wine/list.h"
#ifndef ARRAY_SIZE #ifndef ARRAY_SIZE

View File

@ -18,14 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <assert.h> #include "config.h"
#include "wine/debug.h" #include "wine/port.h"
#include "winbase.h"
#include "wingdi.h"
#include "d3drm_private.h" #include "d3drm_private.h"
#include "initguid.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3drm); 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.dwSize = sizeof(surface_desc);
surface_desc.dwFlags = DDSD_CAPS | DDSD_ZBUFFERBITDEPTH | DDSD_WIDTH | DDSD_HEIGHT; surface_desc.dwFlags = DDSD_CAPS | DDSD_ZBUFFERBITDEPTH | DDSD_WIDTH | DDSD_HEIGHT;
surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER;
surface_desc.dwZBufferBitDepth = 16; surface_desc.u2.dwZBufferBitDepth = 16;
surface_desc.dwWidth = desc.dwWidth; surface_desc.dwWidth = desc.dwWidth;
surface_desc.dwHeight = desc.dwHeight; surface_desc.dwHeight = desc.dwHeight;
hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &ds, NULL); hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &ds, NULL);

View File

@ -17,8 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#define NONAMELESSUNION
#include "config.h" #include "config.h"
#include "wine/port.h" #include "wine/port.h"

View File

@ -19,15 +19,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#define NONAMELESSUNION #include "config.h"
#include "wine/port.h"
#include "wine/debug.h"
#include "winbase.h"
#include "wingdi.h"
#include "rmxfguid.h"
#include "d3drm_private.h" #include "d3drm_private.h"
#include "rmxfguid.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3drm); WINE_DEFAULT_DEBUG_CHANNEL(d3drm);

View File

@ -18,10 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "wine/debug.h" #include "config.h"
#include "wine/port.h"
#include "winbase.h"
#include "wingdi.h"
#include "d3drm_private.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) static inline void d3drm_normalize_d3d_color(D3DCOLORVALUE *color_value, D3DCOLOR color)
{ {
color_value->r = RGBA_GETRED(color) / 255.0f; color_value->u1.r = RGBA_GETRED(color) / 255.0f;
color_value->g = RGBA_GETGREEN(color) / 255.0f; color_value->u2.g = RGBA_GETGREEN(color) / 255.0f;
color_value->b = RGBA_GETBLUE(color) / 255.0f; color_value->u3.b = RGBA_GETBLUE(color) / 255.0f;
color_value->a = RGBA_GETALPHA(color) / 255.0f; color_value->u4.a = RGBA_GETALPHA(color) / 255.0f;
} }
static HRESULT d3drm_update_background_material(struct d3drm_viewport *viewport) 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)); memset(&mat, 0, sizeof(mat));
mat.dwSize = 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); 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); TRACE("iface %p, flags %#x.\n", iface, flags);
clear_rect.x1 = clear_rect.y1 = 0; clear_rect.u1.x1 = clear_rect.u2.y1 = 0;
clear_rect.x2 = viewport->device->width; clear_rect.u3.x2 = viewport->device->width;
clear_rect.y2 = viewport->device->height; clear_rect.u4.y2 = viewport->device->height;
if (flags & D3DRMCLEAR_TARGET) if (flags & D3DRMCLEAR_TARGET)
{ {