diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index f6fa169a8bc..a92ca81e9d6 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -1919,17 +1919,18 @@ static void test_render_zero_triangles(void) HWND window; HRESULT hr; - struct nvertex + static const struct { - float x, y, z; - float nx, ny, nz; + struct vec3 position; + struct vec3 normal; DWORD diffuse; - } quad[] = + } + quad[] = { - { 0.0f, -1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff}, - { 0.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff}, - { 1.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff}, - { 1.0f, -1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff}, + {{0.0f, -1.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff}, + {{0.0f, 0.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff}, + {{1.0f, 0.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff}, + {{1.0f, -1.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff}, }; window = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c index 1bf2e0a42e8..ba73bb687cf 100644 --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c @@ -133,13 +133,6 @@ static IDirect3DDevice8 *create_device(IDirect3D8 *d3d, HWND device_window, HWND return NULL; } -struct nvertex -{ - float x, y, z; - float nx, ny, nz; - DWORD diffuse; -}; - static void test_sanity(void) { IDirect3DDevice8 *device; @@ -212,19 +205,25 @@ static void lighting_test(void) {{ 0.0f, 1.0f, 0.1f}, 0xff00ff00}, {{ 0.0f, 0.0f, 0.1f}, 0xff00ff00}, }; - static const struct nvertex unlitnquad[] = + static const struct { - { 0.0f, -1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff}, - { 0.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff}, - { 1.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff}, - { 1.0f, -1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff}, - }; - static const struct nvertex litnquad[] = + struct vec3 position; + struct vec3 normal; + DWORD diffuse; + } + unlitnquad[] = { - { 0.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00}, - { 0.0f, 1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00}, - { 1.0f, 1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00}, - { 1.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00}, + {{0.0f, -1.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff}, + {{0.0f, 0.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff}, + {{1.0f, 0.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff}, + {{1.0f, -1.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff}, + }, + litnquad[] = + { + {{0.0f, 0.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xffffff00}, + {{0.0f, 1.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xffffff00}, + {{1.0f, 1.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xffffff00}, + {{1.0f, 0.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xffffff00}, }; static const WORD Indices[] = {0, 1, 2, 2, 3, 0}; static const D3DMATRIX mat =