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
2567bd8a
Commit
2567bd8a
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 D3DXPlaneColorAdd.
parent
0dc3208c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
math.c
dlls/d3dx8/tests/math.c
+12
-0
d3dx8math.inl
include/d3dx8math.inl
+10
-0
No files found.
dlls/d3dx8/tests/math.c
View file @
2567bd8a
...
...
@@ -43,6 +43,18 @@ static void D3DXColorTest(void)
color2
.
r
=
0
.
3
f
;
color2
.
g
=
0
.
5
f
;
color2
.
b
=
0
.
76
f
;
color2
.
a
=
0
.
11
f
;
scale
=
0
.
3
f
;
/*_______________D3DXColorAdd________________*/
expected
.
r
=
0
.
9
f
;
expected
.
g
=
1
.
05
f
;
expected
.
b
=
0
.
99
f
,
expected
.
a
=
0
.
93
f
;
D3DXColorAdd
(
&
got
,
&
color1
,
&
color2
);
expect_color
(
expected
,
got
);
/* Test the NULL case */
funcpointer
=
D3DXColorAdd
(
&
got
,
NULL
,
&
color2
);
ok
(
funcpointer
==
NULL
,
"Expected: %p, Got: %p
\n
"
,
NULL
,
funcpointer
);
funcpointer
=
D3DXColorAdd
(
NULL
,
NULL
,
&
color2
);
ok
(
funcpointer
==
NULL
,
"Expected: %p, Got: %p
\n
"
,
NULL
,
funcpointer
);
funcpointer
=
D3DXColorAdd
(
NULL
,
NULL
,
NULL
);
ok
(
funcpointer
==
NULL
,
"Expected: %p, Got: %p
\n
"
,
NULL
,
funcpointer
);
/*_______________D3DXColorLerp________________*/
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
);
...
...
include/d3dx8math.inl
View file @
2567bd8a
...
...
@@ -21,6 +21,16 @@
/*_______________D3DXCOLOR_____________________*/
static inline D3DXCOLOR* D3DXColorAdd(D3DXCOLOR *pout, CONST D3DXCOLOR *pc1, CONST D3DXCOLOR *pc2)
{
if ( !pout || !pc1 || !pc2 ) return NULL;
pout->r = (pc1->r) + (pc2->r);
pout->g = (pc1->g) + (pc2->g);
pout->b = (pc1->b) + (pc2->b);
pout->a = (pc1->a) + (pc2->a);
return pout;
}
static inline D3DXCOLOR* D3DXColorLerp(D3DXCOLOR *pout, CONST D3DXCOLOR *pc1, CONST D3DXCOLOR *pc2, FLOAT s)
{
if ( !pout || !pc1 || !pc2 ) 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