Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e74a99b7
Commit
e74a99b7
authored
Oct 18, 2012
by
Rico Schüller
Committed by
Alexandre Julliard
Oct 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Fix calculation when in and out overlap in D3DXSHRotateZ().
parent
d814eca3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
55 deletions
+33
-55
math.c
dlls/d3dx9_36/math.c
+33
-55
No files found.
dlls/d3dx9_36/math.c
View file @
e74a99b7
...
...
@@ -2811,70 +2811,48 @@ FLOAT* WINAPI D3DXSHRotate(FLOAT *out, UINT order, CONST D3DXMATRIX *matrix, CON
return
out
;
}
FLOAT
*
WINAPI
D3DXSHRotateZ
(
FLOAT
*
out
,
UINT
order
,
FLOAT
angle
,
CONST
FLOAT
*
in
)
FLOAT
*
WINAPI
D3DXSHRotateZ
(
FLOAT
*
out
,
UINT
order
,
FLOAT
angle
,
const
FLOAT
*
in
)
{
FLOAT
c1a
,
c2a
,
c3a
,
c4a
,
c5a
,
s1a
,
s2a
,
s3a
,
s4a
,
s5a
;
UINT
i
,
sum
=
0
;
FLOAT
c
[
5
],
s
[
5
];
TRACE
(
"out %p, order %u, angle %f, in %p
\n
"
,
out
,
order
,
angle
,
in
);
c1a
=
cosf
(
angle
);
s1a
=
sinf
(
angle
);
order
=
min
(
max
(
order
,
D3DXSH_MINORDER
),
D3DXSH_MAXORDER
);
out
[
0
]
=
in
[
0
];
out
[
1
]
=
c1a
*
in
[
1
]
+
s1a
*
in
[
3
];
out
[
2
]
=
in
[
2
];
out
[
3
]
=
c1a
*
in
[
3
]
-
s1a
*
in
[
1
];
if
(
order
<=
D3DXSH_MINORDER
)
return
out
;
c2a
=
cosf
(
2
.
0
f
*
angle
);
s2a
=
sinf
(
2
.
0
f
*
angle
);
out
[
4
]
=
c2a
*
in
[
4
]
+
s2a
*
in
[
8
];
out
[
5
]
=
c1a
*
in
[
5
]
+
s1a
*
in
[
7
];
out
[
6
]
=
in
[
6
];
out
[
7
]
=
c1a
*
in
[
7
]
-
s1a
*
in
[
5
];
out
[
8
]
=
c2a
*
in
[
8
]
-
s2a
*
in
[
4
];
if
(
order
==
3
)
return
out
;
for
(
i
=
1
;
i
<
order
;
i
++
)
{
UINT
j
;
c3a
=
cosf
(
3
.
0
f
*
angle
);
s3a
=
sinf
(
3
.
0
f
*
angle
);
out
[
9
]
=
c3a
*
in
[
9
]
+
s3a
*
in
[
15
];
out
[
10
]
=
c2a
*
in
[
10
]
+
s2a
*
in
[
14
];
out
[
11
]
=
c1a
*
in
[
11
]
+
s1a
*
in
[
13
];
out
[
12
]
=
in
[
12
];
out
[
13
]
=
c1a
*
in
[
13
]
-
s1a
*
in
[
11
];
out
[
14
]
=
c2a
*
in
[
14
]
-
s2a
*
in
[
10
];
out
[
15
]
=
c3a
*
in
[
15
]
-
s3a
*
in
[
9
];
if
(
order
==
4
)
return
out
;
c
[
i
-
1
]
=
cosf
(
i
*
angle
);
s
[
i
-
1
]
=
sinf
(
i
*
angle
);
sum
+=
i
*
2
;
c4a
=
cosf
(
4
.
0
f
*
angle
)
;
s4a
=
sinf
(
4
.
0
f
*
angle
)
;
out
[
16
]
=
c4a
*
in
[
16
]
+
s4a
*
in
[
24
];
out
[
17
]
=
c3a
*
in
[
17
]
+
s3a
*
in
[
23
];
out
[
18
]
=
c2a
*
in
[
18
]
+
s2a
*
in
[
22
]
;
out
[
19
]
=
c1a
*
in
[
19
]
+
s1a
*
in
[
21
];
out
[
20
]
=
in
[
20
];
out
[
21
]
=
c1a
*
in
[
21
]
-
s1a
*
in
[
19
];
out
[
22
]
=
c2a
*
in
[
22
]
-
s2a
*
in
[
18
];
out
[
23
]
=
c3a
*
in
[
23
]
-
s3a
*
in
[
17
];
out
[
24
]
=
c4a
*
in
[
24
]
-
s4a
*
in
[
16
]
;
if
(
order
==
5
)
return
out
;
out
[
sum
-
i
]
=
c
[
i
-
1
]
*
in
[
sum
-
i
]
;
out
[
sum
-
i
]
+=
s
[
i
-
1
]
*
in
[
sum
+
i
]
;
for
(
j
=
i
-
1
;
j
>
0
;
j
--
)
{
out
[
sum
-
j
]
=
0
.
0
f
;
out
[
sum
-
j
]
=
c
[
j
-
1
]
*
in
[
sum
-
j
];
out
[
sum
-
j
]
+=
s
[
j
-
1
]
*
in
[
sum
+
j
];
}
if
(
in
==
out
)
out
[
sum
]
=
0
.
0
f
;
else
out
[
sum
]
=
in
[
sum
]
;
c5a
=
cosf
(
5
.
0
f
*
angle
);
s5a
=
sinf
(
5
.
0
f
*
angle
);
out
[
25
]
=
c5a
*
in
[
25
]
+
s5a
*
in
[
35
];
out
[
26
]
=
c4a
*
in
[
26
]
+
s4a
*
in
[
34
];
out
[
27
]
=
c3a
*
in
[
27
]
+
s3a
*
in
[
33
];
out
[
28
]
=
c2a
*
in
[
28
]
+
s2a
*
in
[
32
];
out
[
29
]
=
c1a
*
in
[
29
]
+
s1a
*
in
[
31
];
out
[
30
]
=
in
[
30
];
out
[
31
]
=
c1a
*
in
[
31
]
-
s1a
*
in
[
29
];
out
[
32
]
=
c2a
*
in
[
32
]
-
s2a
*
in
[
28
];
out
[
33
]
=
c3a
*
in
[
33
]
-
s3a
*
in
[
27
];
out
[
34
]
=
c4a
*
in
[
34
]
-
s4a
*
in
[
26
];
out
[
35
]
=
c5a
*
in
[
35
]
-
s5a
*
in
[
25
];
for
(
j
=
1
;
j
<
i
;
j
++
)
{
out
[
sum
+
j
]
=
0
.
0
f
;
out
[
sum
+
j
]
=
-
s
[
j
-
1
]
*
in
[
sum
-
j
];
out
[
sum
+
j
]
+=
c
[
j
-
1
]
*
in
[
sum
+
j
];
}
out
[
sum
+
i
]
=
-
s
[
i
-
1
]
*
in
[
sum
-
i
];
out
[
sum
+
i
]
+=
c
[
i
-
1
]
*
in
[
sum
+
i
];
}
return
out
;
}
...
...
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