Paul Gofman : ddraw/tests: Test specular lighting with zero shininess in ddraw7.

Alexandre Julliard julliard at winehq.org
Fri Mar 29 16:27:48 CDT 2019


Module: wine
Branch: master
Commit: ce316dfd5fce338c4a7e29accef15431e04ce123
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ce316dfd5fce338c4a7e29accef15431e04ce123

Author: Paul Gofman <gofmanp at gmail.com>
Date:   Fri Mar 29 13:56:39 2019 +0300

ddraw/tests: Test specular lighting with zero shininess in ddraw7.

Signed-off-by: Paul Gofman <gofmanp at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ddraw/tests/ddraw7.c | 81 +++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 74 insertions(+), 7 deletions(-)

diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
index c199994..423dba5 100644
--- a/dlls/ddraw/tests/ddraw7.c
+++ b/dlls/ddraw/tests/ddraw7.c
@@ -4005,6 +4005,66 @@ static void test_specular_lighting(void)
         {160, 360, 0x00000000},
         {320, 360, 0x00000000},
         {480, 360, 0x00000000},
+    },
+    expected_directional_0[] =
+    {
+        {160, 120, 0x00ffffff},
+        {320, 120, 0x00ffffff},
+        {480, 120, 0x00ffffff},
+        {160, 240, 0x00ffffff},
+        {320, 240, 0x00ffffff},
+        {480, 240, 0x00ffffff},
+        {160, 360, 0x00ffffff},
+        {320, 360, 0x00ffffff},
+        {480, 360, 0x00ffffff},
+    },
+    expected_directional_local_0[] =
+    {
+        {160, 120, 0x00ffffff},
+        {320, 120, 0x00ffffff},
+        {480, 120, 0x00ffffff},
+        {160, 240, 0x00ffffff},
+        {320, 240, 0x00ffffff},
+        {480, 240, 0x00ffffff},
+        {160, 360, 0x00ffffff},
+        {320, 360, 0x00ffffff},
+        {480, 360, 0x00ffffff},
+    },
+    expected_point_0[] =
+    {
+        {160, 120, 0x00aaaaaa},
+        {320, 120, 0x00cccccc},
+        {480, 120, 0x00aaaaaa},
+        {160, 240, 0x00cccccc},
+        {320, 240, 0x00ffffff},
+        {480, 240, 0x00cccccc},
+        {160, 360, 0x00aaaaaa},
+        {320, 360, 0x00cccccc},
+        {480, 360, 0x00aaaaaa},
+    },
+    expected_spot_0[] =
+    {
+        {160, 120, 0x00000000},
+        {320, 120, 0x002e2e2e},
+        {480, 120, 0x00000000},
+        {160, 240, 0x002e2e2e},
+        {320, 240, 0x00ffffff},
+        {480, 240, 0x002e2e2e},
+        {160, 360, 0x00000000},
+        {320, 360, 0x002e2e2e},
+        {480, 360, 0x00000000},
+    },
+    expected_point_range_0[] =
+    {
+        {160, 120, 0x00000000},
+        {320, 120, 0x00cccccc},
+        {480, 120, 0x00000000},
+        {160, 240, 0x00cccccc},
+        {320, 240, 0x00ffffff},
+        {480, 240, 0x00cccccc},
+        {160, 360, 0x00000000},
+        {320, 360, 0x00cccccc},
+        {480, 360, 0x00000000},
     };
     static const struct
     {
@@ -4016,14 +4076,21 @@ static void test_specular_lighting(void)
     }
     tests[] =
     {
-        {&directional, FALSE, 30.0f, expected_directional,       ARRAY_SIZE(expected_directional)},
+        {&directional, FALSE, 30.0f, expected_directional, ARRAY_SIZE(expected_directional)},
         {&directional, TRUE,  30.0f, expected_directional_local, ARRAY_SIZE(expected_directional_local)},
-        {&point,       FALSE, 30.0f, expected_point,             ARRAY_SIZE(expected_point)},
-        {&point,       TRUE,  30.0f, expected_point_local,       ARRAY_SIZE(expected_point_local)},
-        {&spot,        FALSE, 30.0f, expected_spot,              ARRAY_SIZE(expected_spot)},
-        {&spot,        TRUE,  30.0f, expected_spot_local,        ARRAY_SIZE(expected_spot_local)},
-        {&point_range, FALSE, 30.0f, expected_point_range,       ARRAY_SIZE(expected_point_range)},
-        {&point_side,  TRUE,   0.0f, expected_point_side,        ARRAY_SIZE(expected_point_side)},
+        {&point, FALSE, 30.0f, expected_point, ARRAY_SIZE(expected_point)},
+        {&point, TRUE,  30.0f, expected_point_local, ARRAY_SIZE(expected_point_local)},
+        {&spot, FALSE, 30.0f, expected_spot, ARRAY_SIZE(expected_spot)},
+        {&spot, TRUE,  30.0f, expected_spot_local, ARRAY_SIZE(expected_spot_local)},
+        {&point_range, FALSE, 30.0f, expected_point_range, ARRAY_SIZE(expected_point_range)},
+        {&point_side, TRUE, 0.0f, expected_point_side, ARRAY_SIZE(expected_point_side)},
+        {&directional, FALSE, 0.0f, expected_directional_0, ARRAY_SIZE(expected_directional_0)},
+        {&directional, TRUE, 0.0f, expected_directional_local_0, ARRAY_SIZE(expected_directional_local_0)},
+        {&point, FALSE, 0.0f, expected_point_0, ARRAY_SIZE(expected_point_0)},
+        {&point, TRUE, 0.0f, expected_point_0, ARRAY_SIZE(expected_point_0)},
+        {&spot, FALSE, 0.0f, expected_spot_0, ARRAY_SIZE(expected_spot_0)},
+        {&spot, TRUE, 0.0f, expected_spot_0, ARRAY_SIZE(expected_spot_0)},
+        {&point_range, FALSE, 0.0f, expected_point_range_0, ARRAY_SIZE(expected_point_range_0)},
     };
     IDirect3DDevice7 *device;
     IDirectDrawSurface7 *rt;




More information about the wine-cvs mailing list