Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
---
dlls/ddraw/tests/ddraw1.c | 18 ++++++++--------
dlls/ddraw/tests/ddraw2.c | 22 ++++++++++----------
dlls/ddraw/tests/ddraw4.c | 44 +++++++++++++++++++--------------------
dlls/ddraw/tests/ddraw7.c | 44 +++++++++++++++++++--------------------
4 files changed, 64 insertions(+), 64 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index 9e562de5c44d..d36120426f92 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -4368,7 +4368,7 @@ static void fill_surface(IDirectDrawSurface *surface, D3DCOLOR color)
for (y = 0; y < surface_desc.dwHeight; ++y)
{
- ptr = (DWORD *)((BYTE *)surface_desc.lpSurface + y * surface_desc.lPitch);
+ ptr = (DWORD *)((BYTE *)surface_desc.lpSurface + y * U1(surface_desc).lPitch);
for (x = 0; x < surface_desc.dwWidth; ++x)
{
ptr[x] = color;
@@ -9114,11 +9114,11 @@ static void test_blt_z_alpha(void)
for (i = 0; i < ARRAY_SIZE(blt_flags); ++i)
{
- fx.dwFillColor = 0x3300ff00;
+ U5(fx).dwFillColor = 0x3300ff00;
hr = IDirectDrawSurface_Blt(src_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr);
- fx.dwFillColor = 0xccff0000;
+ U5(fx).dwFillColor = 0xccff0000;
hr = IDirectDrawSurface_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr);
@@ -9184,7 +9184,7 @@ static void test_cross_device_blt(void)
surface_desc.dwSize = sizeof(surface_desc);
surface_desc.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT;
surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP | DDSCAPS_VIDEOMEMORY;
- U5(surface_desc).dwBackBufferCount = 2;
+ surface_desc.dwBackBufferCount = 2;
hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &surface, NULL);
ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr);
@@ -10610,7 +10610,7 @@ static void test_ck_operation(void)
surface_desc.dwWidth = 4;
surface_desc.dwHeight = 1;
surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
- U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_RGB;
+ surface_desc.ddpfPixelFormat.dwFlags = DDPF_RGB;
U1(surface_desc.ddpfPixelFormat).dwRGBBitCount = 32;
U2(surface_desc.ddpfPixelFormat).dwRBitMask = 0x00ff0000;
U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x0000ff00;
@@ -11266,10 +11266,10 @@ static void test_clear(void)
/* negative x, negative y.
* Also ignored, except on WARP, which clears the entire screen. */
- rect_negneg.x1 = 640;
- rect_negneg.y1 = 240;
- rect_negneg.x2 = 320;
- rect_negneg.y2 = 0;
+ U1(rect_negneg).x1 = 640;
+ U2(rect_negneg).y1 = 240;
+ U3(rect_negneg).x2 = 320;
+ U4(rect_negneg).y2 = 0;
viewport_set_background(device, viewport, green);
hr = IDirect3DViewport_Clear(viewport, 1, &rect_negneg, D3DCLEAR_TARGET);
ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr);
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
index e4a866e23619..7cbfce056fdd 100644
--- a/dlls/ddraw/tests/ddraw2.c
+++ b/dlls/ddraw/tests/ddraw2.c
@@ -4977,7 +4977,7 @@ static void fill_surface(IDirectDrawSurface *surface, D3DCOLOR color)
for (y = 0; y < surface_desc.dwHeight; ++y)
{
- ptr = (DWORD *)((BYTE *)surface_desc.lpSurface + y * surface_desc.lPitch);
+ ptr = (DWORD *)((BYTE *)surface_desc.lpSurface + y * U1(surface_desc).lPitch);
for (x = 0; x < surface_desc.dwWidth; ++x)
{
ptr[x] = color;
@@ -10246,11 +10246,11 @@ static void test_blt_z_alpha(void)
for (i = 0; i < ARRAY_SIZE(blt_flags); ++i)
{
- fx.dwFillColor = 0x3300ff00;
+ U5(fx).dwFillColor = 0x3300ff00;
hr = IDirectDrawSurface_Blt(src_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr);
- fx.dwFillColor = 0xccff0000;
+ U5(fx).dwFillColor = 0xccff0000;
hr = IDirectDrawSurface_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr);
@@ -10316,7 +10316,7 @@ static void test_cross_device_blt(void)
surface_desc.dwSize = sizeof(surface_desc);
surface_desc.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT;
surface_desc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP | DDSCAPS_VIDEOMEMORY;
- U5(surface_desc).dwBackBufferCount = 2;
+ surface_desc.dwBackBufferCount = 2;
hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &surface, NULL);
ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr);
@@ -11965,7 +11965,7 @@ static void test_ck_operation(void)
surface_desc.dwWidth = 4;
surface_desc.dwHeight = 1;
surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
- U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_RGB;
+ surface_desc.ddpfPixelFormat.dwFlags = DDPF_RGB;
U1(surface_desc.ddpfPixelFormat).dwRGBBitCount = 32;
U2(surface_desc.ddpfPixelFormat).dwRBitMask = 0x00ff0000;
U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x0000ff00;
@@ -12688,10 +12688,10 @@ static void test_clear(void)
/* negative x, negative y.
* Also ignored, except on WARP, which clears the entire screen. */
- rect_negneg.x1 = 640;
- rect_negneg.y1 = 240;
- rect_negneg.x2 = 320;
- rect_negneg.y2 = 0;
+ U1(rect_negneg).x1 = 640;
+ U2(rect_negneg).y1 = 240;
+ U3(rect_negneg).x2 = 320;
+ U4(rect_negneg).y2 = 0;
viewport_set_background(device, viewport, green);
hr = IDirect3DViewport2_Clear(viewport, 1, &rect_negneg, D3DCLEAR_TARGET);
ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr);
@@ -12993,7 +12993,7 @@ static void test_viewport(void)
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface_GetSurfaceDesc(ds, &surface_desc);
- z_fmt = U4(surface_desc).ddpfPixelFormat;
+ z_fmt = surface_desc.ddpfPixelFormat;
for (i = 0; i < ARRAY_SIZE(rt_sizes); ++i)
{
@@ -13010,7 +13010,7 @@ static void test_viewport(void)
surface_desc.dwFlags = DDSD_CAPS | DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT;
surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER;
- U4(surface_desc).ddpfPixelFormat = z_fmt;
+ surface_desc.ddpfPixelFormat = z_fmt;
hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &ds, NULL);
ok(SUCCEEDED(hr), "Failed to create depth buffer, hr %#x (i %u).\n", hr, i);
hr = IDirectDrawSurface_AddAttachedSurface(rt, ds);
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index 92ca9f6eb4b1..9b47c2bd3ca9 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -6295,7 +6295,7 @@ static void fill_surface(IDirectDrawSurface4 *surface, D3DCOLOR color)
for (y = 0; y < surface_desc.dwHeight; ++y)
{
- ptr = (DWORD *)((BYTE *)surface_desc.lpSurface + y * surface_desc.lPitch);
+ ptr = (DWORD *)((BYTE *)surface_desc.lpSurface + y * U1(surface_desc).lPitch);
for (x = 0; x < surface_desc.dwWidth; ++x)
{
ptr[x] = color;
@@ -11714,11 +11714,11 @@ static void test_blt_z_alpha(void)
for (i = 0; i < ARRAY_SIZE(blt_flags); ++i)
{
- fx.dwFillColor = 0x3300ff00;
+ U5(fx).dwFillColor = 0x3300ff00;
hr = IDirectDrawSurface4_Blt(src_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr);
- fx.dwFillColor = 0xccff0000;
+ U5(fx).dwFillColor = 0xccff0000;
hr = IDirectDrawSurface4_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr);
@@ -11802,12 +11802,12 @@ static void test_cross_device_blt(void)
surface_desc.dwWidth = 640;
surface_desc.dwHeight = 480;
surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;
- surface_desc.ddpfPixelFormat.dwSize = sizeof(surface_desc.ddpfPixelFormat);
- surface_desc.ddpfPixelFormat.dwFlags = DDPF_RGB;
- U1(surface_desc.ddpfPixelFormat).dwRGBBitCount = 16;
- U2(surface_desc.ddpfPixelFormat).dwRBitMask = 0x00007c00;
- U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x000003e0;
- U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x0000001f;
+ U4(surface_desc).ddpfPixelFormat.dwSize = sizeof(U4(surface_desc).ddpfPixelFormat);
+ U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_RGB;
+ U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 16;
+ U2(U4(surface_desc).ddpfPixelFormat).dwRBitMask = 0x00007c00;
+ U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x000003e0;
+ U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x0000001f;
hr = IDirectDraw4_CreateSurface(ddraw2, &surface_desc, &surface2, NULL);
ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr);
@@ -13695,10 +13695,10 @@ static void test_ck_operation(void)
surface_desc.dwHeight = 1;
surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_RGB;
- U1(U4(surface_desc.ddpfPixelFormat)).dwRGBBitCount = 32;
- U2(U4(surface_desc.ddpfPixelFormat)).dwRBitMask = 0x00ff0000;
- U3(U4(surface_desc.ddpfPixelFormat)).dwGBitMask = 0x0000ff00;
- U4(U4(surface_desc.ddpfPixelFormat)).dwBBitMask = 0x000000ff;
+ U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 32;
+ U2(U4(surface_desc).ddpfPixelFormat).dwRBitMask = 0x00ff0000;
+ U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x0000ff00;
+ U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff;
hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &dst, NULL);
ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr);
@@ -13834,11 +13834,11 @@ static void test_ck_operation(void)
surface_desc.dwHeight = 1;
surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_RGB | DDPF_ALPHAPIXELS;
- U1(U4(surface_desc.ddpfPixelFormat)).dwRGBBitCount = 32;
- U2(U4(surface_desc.ddpfPixelFormat)).dwRBitMask = 0x00ff0000;
- U3(U4(surface_desc.ddpfPixelFormat)).dwGBitMask = 0x0000ff00;
- U4(U4(surface_desc.ddpfPixelFormat)).dwBBitMask = 0x000000ff;
- U5(U4(surface_desc.ddpfPixelFormat)).dwRGBAlphaBitMask = 0xff000000;
+ U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 32;
+ U2(U4(surface_desc).ddpfPixelFormat).dwRBitMask = 0x00ff0000;
+ U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x0000ff00;
+ U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff;
+ U5(U4(surface_desc).ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000;
hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &dst, NULL);
ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr);
hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &src, NULL);
@@ -14807,10 +14807,10 @@ static void test_clear(void)
ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr);
/* negative x, negative y.
* Also ignored, except on WARP, which clears the entire screen. */
- rect_negneg.x1 = 640;
- rect_negneg.y1 = 240;
- rect_negneg.x2 = 320;
- rect_negneg.y2 = 0;
+ U1(rect_negneg).x1 = 640;
+ U2(rect_negneg).y1 = 240;
+ U3(rect_negneg).x2 = 320;
+ U4(rect_negneg).y2 = 0;
hr = IDirect3DViewport3_Clear2(viewport, 1, &rect_negneg, D3DCLEAR_TARGET, 0xff00ff00, 0.0f, 0);
ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr);
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
index ccb22d538823..fbc27376a530 100644
--- a/dlls/ddraw/tests/ddraw7.c
+++ b/dlls/ddraw/tests/ddraw7.c
@@ -6093,7 +6093,7 @@ static void fill_surface(IDirectDrawSurface7 *surface, D3DCOLOR color)
for (y = 0; y < surface_desc.dwHeight; ++y)
{
- ptr = (DWORD *)((BYTE *)surface_desc.lpSurface + y * surface_desc.lPitch);
+ ptr = (DWORD *)((BYTE *)surface_desc.lpSurface + y * U1(surface_desc).lPitch);
for (x = 0; x < surface_desc.dwWidth; ++x)
{
ptr[x] = color;
@@ -11624,11 +11624,11 @@ static void test_blt_z_alpha(void)
for (i = 0; i < ARRAY_SIZE(blt_flags); ++i)
{
- fx.dwFillColor = 0x3300ff00;
+ U5(fx).dwFillColor = 0x3300ff00;
hr = IDirectDrawSurface7_Blt(src_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr);
- fx.dwFillColor = 0xccff0000;
+ U5(fx).dwFillColor = 0xccff0000;
hr = IDirectDrawSurface7_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
ok(SUCCEEDED(hr), "Test %u: Got unexpected hr %#x.\n", i, hr);
@@ -11712,12 +11712,12 @@ static void test_cross_device_blt(void)
surface_desc.dwWidth = 640;
surface_desc.dwHeight = 480;
surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;
- surface_desc.ddpfPixelFormat.dwSize = sizeof(surface_desc.ddpfPixelFormat);
- surface_desc.ddpfPixelFormat.dwFlags = DDPF_RGB;
- U1(surface_desc.ddpfPixelFormat).dwRGBBitCount = 16;
- U2(surface_desc.ddpfPixelFormat).dwRBitMask = 0x00007c00;
- U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x000003e0;
- U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x0000001f;
+ U4(surface_desc).ddpfPixelFormat.dwSize = sizeof(U4(surface_desc).ddpfPixelFormat);
+ U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_RGB;
+ U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 16;
+ U2(U4(surface_desc).ddpfPixelFormat).dwRBitMask = 0x00007c00;
+ U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x000003e0;
+ U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x0000001f;
hr = IDirectDraw7_CreateSurface(ddraw2, &surface_desc, &surface2, NULL);
ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr);
@@ -12952,10 +12952,10 @@ static void test_ck_operation(void)
surface_desc.dwHeight = 1;
surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_RGB;
- U1(U4(surface_desc.ddpfPixelFormat)).dwRGBBitCount = 32;
- U2(U4(surface_desc.ddpfPixelFormat)).dwRBitMask = 0x00ff0000;
- U3(U4(surface_desc.ddpfPixelFormat)).dwGBitMask = 0x0000ff00;
- U4(U4(surface_desc.ddpfPixelFormat)).dwBBitMask = 0x000000ff;
+ U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 32;
+ U2(U4(surface_desc).ddpfPixelFormat).dwRBitMask = 0x00ff0000;
+ U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x0000ff00;
+ U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff;
hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &dst, NULL);
ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr);
@@ -13091,11 +13091,11 @@ static void test_ck_operation(void)
surface_desc.dwHeight = 1;
surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_RGB | DDPF_ALPHAPIXELS;
- U1(U4(surface_desc.ddpfPixelFormat)).dwRGBBitCount = 32;
- U2(U4(surface_desc.ddpfPixelFormat)).dwRBitMask = 0x00ff0000;
- U3(U4(surface_desc.ddpfPixelFormat)).dwGBitMask = 0x0000ff00;
- U4(U4(surface_desc.ddpfPixelFormat)).dwBBitMask = 0x000000ff;
- U5(U4(surface_desc.ddpfPixelFormat)).dwRGBAlphaBitMask = 0xff000000;
+ U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 32;
+ U2(U4(surface_desc).ddpfPixelFormat).dwRBitMask = 0x00ff0000;
+ U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x0000ff00;
+ U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff;
+ U5(U4(surface_desc).ddpfPixelFormat).dwRGBAlphaBitMask = 0xff000000;
hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &dst, NULL);
ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr);
hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &src, NULL);
@@ -14152,10 +14152,10 @@ static void test_clear(void)
ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr);
/* negative x, negative y.
* Also ignored, except on WARP, which clears the entire screen. */
- rect_negneg.x1 = 640;
- rect_negneg.y1 = 240;
- rect_negneg.x2 = 320;
- rect_negneg.y2 = 0;
+ U1(rect_negneg).x1 = 640;
+ U2(rect_negneg).y1 = 240;
+ U3(rect_negneg).x2 = 320;
+ U4(rect_negneg).y2 = 0;
hr = IDirect3DDevice7_Clear(device, 1, &rect_negneg, D3DCLEAR_TARGET, 0xff00ff00, 0.0f, 0);
ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr);
--
2.19.2