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
a1010e6c
Commit
a1010e6c
authored
Nov 15, 2007
by
David Adam
Committed by
Alexandre Julliard
Nov 16, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx8: Implement D3DXMatrixShadow.
parent
c432b48a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
1 deletion
+42
-1
d3dx8.spec
dlls/d3dx8/d3dx8.spec
+1
-1
math.c
dlls/d3dx8/math.c
+26
-0
math.c
dlls/d3dx8/tests/math.c
+14
-0
d3dx8math.h
include/d3dx8math.h
+1
-0
No files found.
dlls/d3dx8/d3dx8.spec
View file @
a1010e6c
...
...
@@ -47,7 +47,7 @@
@ stdcall D3DXMatrixOrthoLH(ptr long long long long)
@ stdcall D3DXMatrixOrthoOffCenterRH(ptr long long long long long long)
@ stdcall D3DXMatrixOrthoOffCenterLH(ptr long long long long long long)
@ st
ub D3DXMatrixShadow
@ st
dcall D3DXMatrixShadow(ptr ptr ptr)
@ stub D3DXMatrixReflect
@ stub D3DXQuaternionToAxisAngle
@ stub D3DXQuaternionRotationMatrix
...
...
dlls/d3dx8/math.c
View file @
a1010e6c
...
...
@@ -410,6 +410,32 @@ D3DXMATRIX* WINAPI D3DXMatrixScaling(D3DXMATRIX *pout, FLOAT sx, FLOAT sy, FLOAT
return
pout
;
}
D3DXMATRIX
*
WINAPI
D3DXMatrixShadow
(
D3DXMATRIX
*
pout
,
CONST
D3DXVECTOR4
*
plight
,
CONST
D3DXPLANE
*
pplane
)
{
D3DXPLANE
Nplane
;
FLOAT
dot
;
D3DXPlaneNormalize
(
&
Nplane
,
pplane
);
dot
=
D3DXPlaneDot
(
&
Nplane
,
plight
);
pout
->
u
.
m
[
0
][
0
]
=
dot
-
Nplane
.
a
*
plight
->
x
;
pout
->
u
.
m
[
0
][
1
]
=
-
Nplane
.
a
*
plight
->
y
;
pout
->
u
.
m
[
0
][
2
]
=
-
Nplane
.
a
*
plight
->
z
;
pout
->
u
.
m
[
0
][
3
]
=
-
Nplane
.
a
*
plight
->
w
;
pout
->
u
.
m
[
1
][
0
]
=
-
Nplane
.
b
*
plight
->
x
;
pout
->
u
.
m
[
1
][
1
]
=
dot
-
Nplane
.
b
*
plight
->
y
;
pout
->
u
.
m
[
1
][
2
]
=
-
Nplane
.
b
*
plight
->
z
;
pout
->
u
.
m
[
1
][
3
]
=
-
Nplane
.
b
*
plight
->
w
;
pout
->
u
.
m
[
2
][
0
]
=
-
Nplane
.
c
*
plight
->
x
;
pout
->
u
.
m
[
2
][
1
]
=
-
Nplane
.
c
*
plight
->
y
;
pout
->
u
.
m
[
2
][
2
]
=
dot
-
Nplane
.
c
*
plight
->
z
;
pout
->
u
.
m
[
2
][
3
]
=
-
Nplane
.
c
*
plight
->
w
;
pout
->
u
.
m
[
3
][
0
]
=
-
Nplane
.
d
*
plight
->
x
;
pout
->
u
.
m
[
3
][
1
]
=
-
Nplane
.
d
*
plight
->
y
;
pout
->
u
.
m
[
3
][
2
]
=
-
Nplane
.
d
*
plight
->
z
;
pout
->
u
.
m
[
3
][
3
]
=
dot
-
Nplane
.
d
*
plight
->
w
;
return
pout
;
}
D3DXMATRIX
*
WINAPI
D3DXMatrixTranslation
(
D3DXMATRIX
*
pout
,
FLOAT
x
,
FLOAT
y
,
FLOAT
z
)
{
D3DXMatrixIdentity
(
pout
);
...
...
dlls/d3dx8/tests/math.c
View file @
a1010e6c
...
...
@@ -152,8 +152,10 @@ static void D3DXMatrixTest(void)
{
D3DXMATRIX
expectedmat
,
gotmat
,
mat
,
mat2
,
mat3
;
LPD3DXMATRIX
funcpointer
;
D3DXPLANE
plane
;
D3DXQUATERNION
q
;
D3DXVECTOR3
at
,
axis
,
eye
;
D3DXVECTOR4
light
;
BOOL
expected
,
got
;
FLOAT
angle
,
determinant
,
expectedfloat
,
gotfloat
;
...
...
@@ -171,12 +173,16 @@ static void D3DXMatrixTest(void)
U
(
mat2
).
m
[
0
][
3
]
=
-
4
.
0
f
;
U
(
mat2
).
m
[
1
][
3
]
=
-
3
.
0
f
;
U
(
mat2
).
m
[
2
][
3
]
=
-
2
.
0
f
;
U
(
mat2
).
m
[
3
][
3
]
=
-
1
.
0
f
;
plane
.
a
=
-
3
.
0
f
;
plane
.
b
=
-
1
.
0
f
;
plane
.
c
=
4
.
0
f
;
plane
.
d
=
7
.
0
f
;
q
.
x
=
1
.
0
f
;
q
.
y
=
-
4
.
0
f
;
q
.
z
=
7
.
0
f
;
q
.
w
=
-
11
.
0
f
;
at
.
x
=
-
2
.
0
f
;
at
.
y
=
13
.
0
f
;
at
.
z
=
-
9
.
0
f
;
axis
.
x
=
1
.
0
f
;
axis
.
y
=
-
3
.
0
f
;
axis
.
z
=
7
.
0
f
;
eye
.
x
=
8
.
0
f
;
eye
.
y
=
-
5
.
0
f
;
eye
.
z
=
5
.
75
f
;
light
.
x
=
9
.
6
f
;
light
.
y
=
8
.
5
f
;
light
.
z
=
7
.
4
;
light
.
w
=
6
.
3
;
angle
=
D3DX_PI
/
3
.
0
f
;
/*____________D3DXMatrixAffineTransformation______*/
...
...
@@ -396,6 +402,14 @@ static void D3DXMatrixTest(void)
D3DXMatrixScaling
(
&
gotmat
,
0
.
69
f
,
0
.
53
f
,
4
.
11
f
);
expect_mat
(
expectedmat
,
gotmat
);
/*____________D3DXMatrixShadow______________*/
U
(
expectedmat
).
m
[
0
][
0
]
=
12
.
786773
f
;
U
(
expectedmat
).
m
[
0
][
1
]
=
5
.
000
961
f
;
U
(
expectedmat
).
m
[
0
][
2
]
=
4
.
353778
f
;
U
(
expectedmat
).
m
[
0
][
3
]
=
3
.
706595
f
;
U
(
expectedmat
).
m
[
1
][
0
]
=
1
.
882715
;
U
(
expectedmat
).
m
[
1
][
1
]
=
8
.
805615
f
;
U
(
expectedmat
).
m
[
1
][
2
]
=
1
.
451259
f
;
U
(
expectedmat
).
m
[
1
][
3
]
=
1
.
235532
f
;
U
(
expectedmat
).
m
[
2
][
0
]
=
-
7
.
530860
f
;
U
(
expectedmat
).
m
[
2
][
1
]
=
-
6
.
667949
f
;
U
(
expectedmat
).
m
[
2
][
2
]
=
1
.
333590
f
;
U
(
expectedmat
).
m
[
2
][
3
]
=
-
4
.
942127
f
;
U
(
expectedmat
).
m
[
3
][
0
]
=
-
13
.
179006
f
;
U
(
expectedmat
).
m
[
3
][
1
]
=
-
11
.
668910
f
;
U
(
expectedmat
).
m
[
3
][
2
]
=
-
10
.
158816
f
;
U
(
expectedmat
).
m
[
3
][
3
]
=
-
1
.
510094
f
;
D3DXMatrixShadow
(
&
gotmat
,
&
light
,
&
plane
);
expect_mat
(
expectedmat
,
gotmat
);
/*____________D3DXMatrixTranslation______________*/
U
(
expectedmat
).
m
[
0
][
0
]
=
1
.
0
f
;
U
(
expectedmat
).
m
[
0
][
1
]
=
0
.
0
f
;
U
(
expectedmat
).
m
[
0
][
2
]
=
0
.
0
f
;
U
(
expectedmat
).
m
[
0
][
3
]
=
0
.
0
f
;
U
(
expectedmat
).
m
[
1
][
0
]
=
0
.
0
;
U
(
expectedmat
).
m
[
1
][
1
]
=
1
.
0
f
;
U
(
expectedmat
).
m
[
1
][
2
]
=
0
.
0
f
;
U
(
expectedmat
).
m
[
1
][
3
]
=
0
.
0
f
;
...
...
include/d3dx8math.h
View file @
a1010e6c
...
...
@@ -288,6 +288,7 @@ D3DXMATRIX* WINAPI D3DXMatrixRotationY(D3DXMATRIX *pout, FLOAT angle);
D3DXMATRIX
*
WINAPI
D3DXMatrixRotationYawPitchRoll
(
D3DXMATRIX
*
pout
,
FLOAT
yaw
,
FLOAT
pitch
,
FLOAT
roll
);
D3DXMATRIX
*
WINAPI
D3DXMatrixRotationZ
(
D3DXMATRIX
*
pout
,
FLOAT
angle
);
D3DXMATRIX
*
WINAPI
D3DXMatrixScaling
(
D3DXMATRIX
*
pout
,
FLOAT
sx
,
FLOAT
sy
,
FLOAT
sz
);
D3DXMATRIX
*
WINAPI
D3DXMatrixShadow
(
D3DXMATRIX
*
pout
,
CONST
D3DXVECTOR4
*
plight
,
CONST
D3DXPLANE
*
pPlane
);
D3DXMATRIX
*
WINAPI
D3DXMatrixTranslation
(
D3DXMATRIX
*
pout
,
FLOAT
x
,
FLOAT
y
,
FLOAT
z
);
D3DXMATRIX
*
WINAPI
D3DXMatrixTranspose
(
D3DXMATRIX
*
pout
,
CONST
D3DXMATRIX
*
pm
);
...
...
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