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
082d740f
Commit
082d740f
authored
Jan 31, 2009
by
David Adam
Committed by
Alexandre Julliard
Feb 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx8: Simplify some functions.
parent
77c857d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
math.c
dlls/d3dx8/math.c
+18
-18
No files found.
dlls/d3dx8/math.c
View file @
082d740f
...
...
@@ -1346,15 +1346,15 @@ D3DXVECTOR3* WINAPI D3DXVec3Normalize(D3DXVECTOR3 *pout, CONST D3DXVECTOR3 *pv)
D3DXVECTOR3
*
WINAPI
D3DXVec3Project
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv
,
CONST
D3DVIEWPORT8
*
pviewport
,
CONST
D3DXMATRIX
*
pprojection
,
CONST
D3DXMATRIX
*
pview
,
CONST
D3DXMATRIX
*
pworld
)
{
D3DXMATRIX
m
1
,
m2
;
D3DXVECTOR3
out
,
vec
;
D3DXMatrixMultiply
(
&
m
1
,
pworld
,
pview
);
D3DXMatrixMultiply
(
&
m
2
,
&
m1
,
pprojection
);
D3DXVec3TransformCoord
(
&
vec
,
pv
,
&
m2
);
out
.
x
=
pviewport
->
X
+
(
1
.
0
f
+
vec
.
x
)
*
pviewport
->
Width
/
2
.
0
f
;
out
.
y
=
pviewport
->
Y
+
(
1
.
0
f
-
vec
.
y
)
*
pviewport
->
Height
/
2
.
0
f
;
out
.
z
=
pviewport
->
MinZ
+
vec
.
z
*
(
pviewport
->
MaxZ
-
pviewport
->
MinZ
);
D3DXMATRIX
m
;
D3DXVECTOR3
out
;
D3DXMatrixMultiply
(
&
m
,
pworld
,
pview
);
D3DXMatrixMultiply
(
&
m
,
&
m
,
pprojection
);
D3DXVec3TransformCoord
(
&
out
,
pv
,
&
m
);
out
.
x
=
pviewport
->
X
+
(
1
.
0
f
+
out
.
x
)
*
pviewport
->
Width
/
2
.
0
f
;
out
.
y
=
pviewport
->
Y
+
(
1
.
0
f
-
out
.
y
)
*
pviewport
->
Height
/
2
.
0
f
;
out
.
z
=
pviewport
->
MinZ
+
out
.
z
*
(
pviewport
->
MaxZ
-
pviewport
->
MinZ
);
*
pout
=
out
;
return
pout
;
}
...
...
@@ -1404,16 +1404,16 @@ D3DXVECTOR3* WINAPI D3DXVec3TransformNormal(D3DXVECTOR3 *pout, CONST D3DXVECTOR3
D3DXVECTOR3
*
WINAPI
D3DXVec3Unproject
(
D3DXVECTOR3
*
pout
,
CONST
D3DXVECTOR3
*
pv
,
CONST
D3DVIEWPORT8
*
pviewport
,
CONST
D3DXMATRIX
*
pprojection
,
CONST
D3DXMATRIX
*
pview
,
CONST
D3DXMATRIX
*
pworld
)
{
D3DXMATRIX
m
1
,
m2
,
m3
;
D3DXVECTOR3
out
,
vec
;
D3DXMATRIX
m
;
D3DXVECTOR3
out
;
D3DXMatrixMultiply
(
&
m
1
,
pworld
,
pview
);
D3DXMatrixMultiply
(
&
m
2
,
&
m1
,
pprojection
);
D3DXMatrixInverse
(
&
m
3
,
NULL
,
&
m2
);
vec
.
x
=
2
.
0
f
*
(
pv
->
x
-
pviewport
->
X
)
/
pviewport
->
Width
-
1
.
0
f
;
vec
.
y
=
1
.
0
f
-
2
.
0
f
*
(
pv
->
y
-
pviewport
->
Y
)
/
pviewport
->
Height
;
vec
.
z
=
(
pv
->
z
-
pviewport
->
MinZ
)
/
(
pviewport
->
MaxZ
-
pviewport
->
MinZ
);
D3DXVec3TransformCoord
(
&
out
,
&
vec
,
&
m3
);
D3DXMatrixMultiply
(
&
m
,
pworld
,
pview
);
D3DXMatrixMultiply
(
&
m
,
&
m
,
pprojection
);
D3DXMatrixInverse
(
&
m
,
NULL
,
&
m
);
out
.
x
=
2
.
0
f
*
(
pv
->
x
-
pviewport
->
X
)
/
pviewport
->
Width
-
1
.
0
f
;
out
.
y
=
1
.
0
f
-
2
.
0
f
*
(
pv
->
y
-
pviewport
->
Y
)
/
pviewport
->
Height
;
out
.
z
=
(
pv
->
z
-
pviewport
->
MinZ
)
/
(
pviewport
->
MaxZ
-
pviewport
->
MinZ
);
D3DXVec3TransformCoord
(
&
out
,
&
out
,
&
m
);
*
pout
=
out
;
return
pout
;
}
...
...
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