Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
526909f8
Commit
526909f8
authored
Oct 09, 2023
by
Matteo Bruni
Committed by
Alexandre Julliard
Oct 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/tests: Get rid of unnecessary branches in D3DXLoadMeshTest().
parent
e4cdcb1e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
13 deletions
+7
-13
mesh.c
dlls/d3dx9_36/tests/mesh.c
+7
-13
No files found.
dlls/d3dx9_36/tests/mesh.c
View file @
526909f8
...
...
@@ -2383,6 +2383,8 @@ static void D3DXLoadMeshTest(void)
D3DXMATRIX
transform
;
struct
test_context
*
test_context
;
ID3DXAnimationController
*
controller
;
D3DXMESHCONTAINER
*
container
;
unsigned
int
i
;
if
(
!
(
test_context
=
new_test_context
()))
{
...
...
@@ -2418,8 +2420,7 @@ static void D3DXLoadMeshTest(void)
hr
=
D3DXLoadMeshHierarchyFromXInMemory
(
simple_xfile
,
sizeof
(
simple_xfile
)
-
1
,
D3DXMESH_MANAGED
,
device
,
&
alloc_hier
,
NULL
,
&
frame_hier
,
NULL
);
ok
(
hr
==
D3D_OK
,
"Expected D3D_OK, got %#lx
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
D3DXMESHCONTAINER
*
container
=
frame_hier
->
pMeshContainer
;
container
=
frame_hier
->
pMeshContainer
;
ok
(
frame_hier
->
Name
==
NULL
,
"Expected NULL, got '%s'
\n
"
,
frame_hier
->
Name
);
D3DXMatrixIdentity
(
&
transform
);
...
...
@@ -2437,7 +2438,6 @@ static void D3DXLoadMeshTest(void)
hr
=
D3DXFrameDestroy
(
frame_hier
,
&
alloc_hier
);
ok
(
hr
==
D3D_OK
,
"Expected D3D_OK, got %#lx
\n
"
,
hr
);
frame_hier
=
NULL
;
}
controller
=
(
ID3DXAnimationController
*
)
0xdeadbeef
;
hr
=
D3DXLoadMeshHierarchyFromXInMemory
(
box_anim_xfile
,
sizeof
(
box_anim_xfile
)
-
1
,
...
...
@@ -2459,9 +2459,7 @@ static void D3DXLoadMeshTest(void)
hr
=
D3DXLoadMeshHierarchyFromXInMemory
(
box_xfile
,
sizeof
(
box_xfile
)
-
1
,
D3DXMESH_MANAGED
,
device
,
&
alloc_hier
,
NULL
,
&
frame_hier
,
&
controller
);
ok
(
hr
==
D3D_OK
,
"Expected D3D_OK, got %#lx
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
D3DXMESHCONTAINER
*
container
=
frame_hier
->
pMeshContainer
;
container
=
frame_hier
->
pMeshContainer
;
ok
(
!
controller
,
"Animation Controller returned.
\n
"
);
ok
(
frame_hier
->
Name
==
NULL
,
"Expected NULL, got '%s'
\n
"
,
frame_hier
->
Name
);
...
...
@@ -2480,14 +2478,11 @@ static void D3DXLoadMeshTest(void)
hr
=
D3DXFrameDestroy
(
frame_hier
,
&
alloc_hier
);
ok
(
hr
==
D3D_OK
,
"Expected D3D_OK, got %#lx
\n
"
,
hr
);
frame_hier
=
NULL
;
}
hr
=
D3DXLoadMeshHierarchyFromXInMemory
(
framed_xfile
,
sizeof
(
framed_xfile
)
-
1
,
D3DXMESH_MANAGED
,
device
,
&
alloc_hier
,
NULL
,
&
frame_hier
,
NULL
);
ok
(
hr
==
D3D_OK
,
"Expected D3D_OK, got %#lx
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
D3DXMESHCONTAINER
*
container
=
frame_hier
->
pMeshContainer
;
int
i
;
container
=
frame_hier
->
pMeshContainer
;
ok
(
!
strcmp
(
frame_hier
->
Name
,
""
),
"Expected '', got '%s'
\n
"
,
frame_hier
->
Name
);
/* last frame transform replaces the first */
...
...
@@ -2495,7 +2490,8 @@ static void D3DXLoadMeshTest(void)
transform
.
m
[
3
][
2
]
=
3
.
0
;
check_matrix
(
&
frame_hier
->
TransformationMatrix
,
&
transform
);
for
(
i
=
0
;
i
<
3
;
i
++
)
{
for
(
i
=
0
;
i
<
3
;
++
i
)
{
ok
(
!
strcmp
(
container
->
Name
,
""
),
"Expected '', got '%s'
\n
"
,
container
->
Name
);
ok
(
container
->
MeshData
.
Type
==
D3DXMESHTYPE_MESH
,
"Expected %d, got %d
\n
"
,
D3DXMESHTYPE_MESH
,
container
->
MeshData
.
Type
);
...
...
@@ -2511,7 +2507,6 @@ static void D3DXLoadMeshTest(void)
hr
=
D3DXFrameDestroy
(
frame_hier
,
&
alloc_hier
);
ok
(
hr
==
D3D_OK
,
"Expected D3D_OK, got %#lx
\n
"
,
hr
);
frame_hier
=
NULL
;
}
hr
=
D3DXLoadMeshFromXInMemory
(
NULL
,
0
,
D3DXMESH_MANAGED
,
...
...
@@ -2541,7 +2536,6 @@ static void D3DXLoadMeshTest(void)
hr
=
D3DXLoadMeshFromXInMemory
(
simple_xfile
,
sizeof
(
simple_xfile
)
-
1
,
D3DXMESH_MANAGED
,
device
,
NULL
,
NULL
,
NULL
,
NULL
,
&
mesh
);
ok
(
hr
==
D3D_OK
,
"Expected D3D_OK, got %#lx
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
mesh
);
test_LoadMeshFromX
(
device
,
simple_xfile
,
simple_vertex_buffer
,
simple_fvf
,
simple_index_buffer
,
default_materials
,
TRUE
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment