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
2f370204
Commit
2f370204
authored
Oct 23, 2007
by
David Adam
Committed by
Alexandre Julliard
Oct 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx8: Implement D3DXPlaneColorLerp.
parent
6ebc5cef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
math.c
dlls/d3dx8/tests/math.c
+15
-0
d3dx8math.inl
include/d3dx8math.inl
+12
-0
No files found.
dlls/d3dx8/tests/math.c
View file @
2f370204
...
...
@@ -36,8 +36,23 @@ static void D3DXColorTest(void)
{
D3DXCOLOR
color
,
color1
,
expected
,
got
;
LPD3DXCOLOR
funcpointer
;
FLOAT
scale
;
color
.
r
=
0
.
2
f
;
color
.
g
=
0
.
75
f
;
color
.
b
=
0
.
41
f
;
color
.
a
=
0
.
93
f
;
scale
=
0
.
3
f
;
/*_______________D3DXColorLerp________________*/
color1
.
r
=
0
.
6
f
;
color1
.
g
=
0
.
55
f
;
color1
.
b
=
0
.
23
f
;
color1
.
a
=
0
.
82
f
;
expected
.
r
=
0
.
32
f
;
expected
.
g
=
0
.
69
f
;
expected
.
b
=
0
.
356
f
;
expected
.
a
=
0
.
897
f
;
D3DXColorLerp
(
&
got
,
&
color
,
&
color1
,
scale
);
expect_color
(
expected
,
got
);
/* Test the NULL case */
funcpointer
=
D3DXColorLerp
(
&
got
,
NULL
,
&
color1
,
scale
);
ok
(
funcpointer
==
NULL
,
"Expected: %p, Got: %p
\n
"
,
NULL
,
funcpointer
);
funcpointer
=
D3DXColorLerp
(
NULL
,
NULL
,
&
color1
,
scale
);
ok
(
funcpointer
==
NULL
,
"Expected: %p, Got: %p
\n
"
,
NULL
,
funcpointer
);
funcpointer
=
D3DXColorLerp
(
NULL
,
NULL
,
NULL
,
scale
);
ok
(
funcpointer
==
NULL
,
"Expected: %p, Got: %p
\n
"
,
NULL
,
funcpointer
);
/*_______________D3DXColorNegative________________*/
expected
.
r
=
0
.
8
f
;
expected
.
g
=
0
.
25
f
;
expected
.
b
=
0
.
59
f
;
expected
.
a
=
0
.
93
f
;
...
...
include/d3dx8math.inl
View file @
2f370204
...
...
@@ -19,6 +19,18 @@
#ifndef __D3DX8MATH_INL__
#define __D3DX8MATH_INL__
/*_______________D3DXCOLOR_____________________*/
static inline D3DXCOLOR* D3DXColorLerp(D3DXCOLOR *pout, CONST D3DXCOLOR *pc1, CONST D3DXCOLOR *pc2, FLOAT s)
{
if ( !pout || !pc1 || !pc2 ) return NULL;
pout->r = (1-s) * (pc1->r) + s *(pc2->r);
pout->g = (1-s) * (pc1->g) + s *(pc2->g);
pout->b = (1-s) * (pc1->b) + s *(pc2->b);
pout->a = (1-s) * (pc1->a) + s *(pc2->a);
return pout;
}
static inline D3DXCOLOR* D3DXColorNegative(D3DXCOLOR *pout, CONST D3DXCOLOR *pc)
{
if ( !pout || !pc ) return NULL;
...
...
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