David Adam : d3dx9_36: Fix failing tests in Windows.
Alexandre Julliard
julliard at winehq.org
Mon Feb 2 09:01:20 CST 2009
Module: wine
Branch: master
Commit: 3f1a7abf48fdf628a00ecbb236218398a6a75dc1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3f1a7abf48fdf628a00ecbb236218398a6a75dc1
Author: David Adam <david.adam.cnrs at gmail.com>
Date: Sat Jan 31 12:04:55 2009 +0100
d3dx9_36: Fix failing tests in Windows.
---
dlls/d3dx9_36/math.c | 8 ++++----
dlls/d3dx9_36/tests/math.c | 39 +++++++++++++++++++++++++++++++--------
2 files changed, 35 insertions(+), 12 deletions(-)
diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c
index 13b8bd3..b8416c6 100644
--- a/dlls/d3dx9_36/math.c
+++ b/dlls/d3dx9_36/math.c
@@ -164,13 +164,13 @@ D3DXMATRIX* WINAPI D3DXMatrixTransformation2D(
{
sca.x=pscaling->x;
sca.y=pscaling->y;
- sca.z=0.0f;
+ sca.z=1.0f;
}
else
{
- sca.x=0.0f;
- sca.y=0.0f;
- sca.z=0.0f;
+ sca.x=1.0f;
+ sca.y=1.0f;
+ sca.z=1.0f;
}
if ( protationcenter )
diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c
index 50db67b..8a9c3e2 100644
--- a/dlls/d3dx9_36/tests/math.c
+++ b/dlls/d3dx9_36/tests/math.c
@@ -612,7 +612,7 @@ static void test_Matrix_Transformation2D(void)
U(exp_mat).m[3][1] = -13.401899f;
U(exp_mat).m[0][2] = 0.0f;
U(exp_mat).m[1][2] = 0.0f;
- U(exp_mat).m[2][2] = 0.0f;
+ U(exp_mat).m[2][2] = 1.0f;
U(exp_mat).m[3][2] = 0.0f;
U(exp_mat).m[0][3] = 0.0f;
U(exp_mat).m[1][3] = 0.0f;
@@ -635,17 +635,17 @@ static void test_Matrix_Transformation2D(void)
sca_rot = 5.0f*D3DX_PI/4.0f;
- U(exp_mat).m[0][0] = 0.0f;
- U(exp_mat).m[1][0] = 0.0f;
+ U(exp_mat).m[0][0] = 0.50f;
+ U(exp_mat).m[1][0] = -0.866025f;
U(exp_mat).m[2][0] = 0.0f;
- U(exp_mat).m[3][0] = 2.830127f;
- U(exp_mat).m[0][1] = 0.0f;
- U(exp_mat).m[1][1] = 0.0f;
+ U(exp_mat).m[3][0] = -6.0f;
+ U(exp_mat).m[0][1] = 0.866025f;
+ U(exp_mat).m[1][1] = 0.50f;
U(exp_mat).m[2][1] = 0.0f;
- U(exp_mat).m[3][1] = 12.294229f;
+ U(exp_mat).m[3][1] = 7.0f;
U(exp_mat).m[0][2] = 0.0f;
U(exp_mat).m[1][2] = 0.0f;
- U(exp_mat).m[2][2] = 0.0f;
+ U(exp_mat).m[2][2] = 1.0f;
U(exp_mat).m[3][2] = 0.0f;
U(exp_mat).m[0][3] = 0.0f;
U(exp_mat).m[1][3] = 0.0f;
@@ -655,6 +655,29 @@ static void test_Matrix_Transformation2D(void)
D3DXMatrixTransformation2D(&got_mat, &sca_center, sca_rot, NULL, NULL, rot, &trans);
expect_mat(&exp_mat, &got_mat);
+
+/*_________*/
+
+ U(exp_mat).m[0][0] = 0.50f;
+ U(exp_mat).m[1][0] = -0.866025f;
+ U(exp_mat).m[2][0] = 0.0f;
+ U(exp_mat).m[3][0] = 0.0f;
+ U(exp_mat).m[0][1] = 0.866025f;
+ U(exp_mat).m[1][1] = 0.50f;
+ U(exp_mat).m[2][1] = 0.0f;
+ U(exp_mat).m[3][1] = 0.0f;
+ U(exp_mat).m[0][2] = 0.0f;
+ U(exp_mat).m[1][2] = 0.0f;
+ U(exp_mat).m[2][2] = 1.0f;
+ U(exp_mat).m[3][2] = 0.0f;
+ U(exp_mat).m[0][3] = 0.0f;
+ U(exp_mat).m[1][3] = 0.0f;
+ U(exp_mat).m[2][3] = 0.0f;
+ U(exp_mat).m[3][3] = 1.0f;
+
+ D3DXMatrixTransformation2D(&got_mat, NULL, sca_rot, NULL, NULL, rot, NULL);
+
+ expect_mat(&exp_mat, &got_mat);
}
static void test_D3DXVec_Array(void)
More information about the wine-cvs
mailing list