diff --git a/dlls/d3drm/d3drm_private.h b/dlls/d3drm/d3drm_private.h index 1aa0a98b8d6..8419046ba96 100644 --- a/dlls/d3drm/d3drm_private.h +++ b/dlls/d3drm/d3drm_private.h @@ -21,12 +21,15 @@ #ifndef __D3DRM_PRIVATE_INCLUDED__ #define __D3DRM_PRIVATE_INCLUDED__ +#define NONAMELESSUNION +#define NONAMELESSSTRUCT #define COBJMACROS +#include #include #include "d3drm.h" #include "dxfile.h" #include "d3drmwin.h" - +#include "wine/debug.h" #include "wine/list.h" #ifndef ARRAY_SIZE diff --git a/dlls/d3drm/device.c b/dlls/d3drm/device.c index c970244abe1..a774ae58275 100644 --- a/dlls/d3drm/device.c +++ b/dlls/d3drm/device.c @@ -18,14 +18,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#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); diff --git a/dlls/d3drm/math.c b/dlls/d3drm/math.c index 72cb267e679..a6c0c858126 100644 --- a/dlls/d3drm/math.c +++ b/dlls/d3drm/math.c @@ -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" diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c index 20c0346b12c..e873d333e77 100644 --- a/dlls/d3drm/meshbuilder.c +++ b/dlls/d3drm/meshbuilder.c @@ -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); diff --git a/dlls/d3drm/viewport.c b/dlls/d3drm/viewport.c index 2a1d0353240..183588a7fcf 100644 --- a/dlls/d3drm/viewport.c +++ b/dlls/d3drm/viewport.c @@ -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) {