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
5524923c
Commit
5524923c
authored
Apr 19, 2007
by
David Adam
Committed by
Alexandre Julliard
Apr 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Implement D3DRMVectorscale.
parent
d882ee27
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
d3drm.spec
dlls/d3drm/d3drm.spec
+1
-1
math.c
dlls/d3drm/math.c
+9
-0
vector.c
dlls/d3drm/tests/vector.c
+7
-1
No files found.
dlls/d3drm/d3drm.spec
View file @
5524923c
...
...
@@ -16,7 +16,7 @@
@ stub D3DRMVectorRandom
@ stub D3DRMVectorReflect
@ stub D3DRMVectorRotate
@ st
ub D3DRMVectorScale
@ st
dcall D3DRMVectorScale(ptr ptr long)
@ stdcall D3DRMVectorSubtract(ptr ptr ptr)
@ stub Direct3DRMCreate
@ stub DllCanUnloadNow
...
...
dlls/d3drm/math.c
View file @
5524923c
...
...
@@ -74,3 +74,12 @@ D3DVALUE WINAPI D3DRMVectorModulus(LPD3DVECTOR v)
result
=
sqrt
(
v
->
x
*
v
->
x
+
v
->
y
*
v
->
y
+
v
->
z
*
v
->
z
);
return
result
;
}
/* Scale a vector */
LPD3DVECTOR
WINAPI
D3DRMVectorScale
(
LPD3DVECTOR
d
,
LPD3DVECTOR
s
,
D3DVALUE
factor
)
{
d
->
x
=
factor
*
s
->
x
;
d
->
y
=
factor
*
s
->
y
;
d
->
z
=
factor
*
s
->
z
;
return
d
;
}
dlls/d3drm/tests/vector.c
View file @
5524923c
...
...
@@ -32,7 +32,7 @@
void
VectorTest
(
void
)
{
D3DVALUE
mod
;
D3DVALUE
mod
,
par
;
D3DVECTOR
e
,
r
,
u
,
v
;
u
.
x
=
2
.
0
;
u
.
y
=
2
.
0
;
u
.
z
=
1
.
0
;
...
...
@@ -60,6 +60,12 @@ void VectorTest(void)
/*_______________________VectorModulus_____________________________*/
mod
=
D3DRMVectorModulus
(
&
u
);
ok
((
mod
==
3
.
0
),
"Expected 3.0, Got %f"
,
mod
);
/*_______________________VectorScale__________________________*/
par
=
2
.
5
;
D3DRMVectorScale
(
&
r
,
&
v
,
par
);
e
.
x
=
10
.
0
;
e
.
y
=
10
.
0
;
e
.
z
=
0
.
0
;
expect_vec
(
e
,
r
);
}
START_TEST
(
vector
)
...
...
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