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
5b685e6a
Commit
5b685e6a
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 D3DXPlaneColorSubtract.
parent
2567bd8a
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 @
5b685e6a
...
...
@@ -108,6 +108,18 @@ static void D3DXColorTest(void)
ok
(
funcpointer
==
NULL
,
"Expected: %p, Got: %p
\n
"
,
NULL
,
funcpointer
);
funcpointer
=
D3DXColorScale
(
NULL
,
NULL
,
scale
);
ok
(
funcpointer
==
NULL
,
"Expected: %p, Got: %p
\n
"
,
NULL
,
funcpointer
);
/*_______________D3DXColorSubtract_______________*/
expected
.
r
=
-
0
.
1
f
;
expected
.
g
=
0
.
25
f
;
expected
.
b
=
-
0
.
35
f
,
expected
.
a
=
0
.
82
f
;
D3DXColorSubtract
(
&
got
,
&
color
,
&
color2
);
expect_color
(
expected
,
got
);
/* Test the NULL case */
funcpointer
=
D3DXColorSubtract
(
&
got
,
NULL
,
&
color2
);
ok
(
funcpointer
==
NULL
,
"Expected: %p, Got: %p
\n
"
,
NULL
,
funcpointer
);
funcpointer
=
D3DXColorSubtract
(
NULL
,
NULL
,
&
color2
);
ok
(
funcpointer
==
NULL
,
"Expected: %p, Got: %p
\n
"
,
NULL
,
funcpointer
);
funcpointer
=
D3DXColorSubtract
(
NULL
,
NULL
,
NULL
);
ok
(
funcpointer
==
NULL
,
"Expected: %p, Got: %p
\n
"
,
NULL
,
funcpointer
);
}
static
void
D3DXPlaneTest
(
void
)
...
...
include/d3dx8math.inl
View file @
5b685e6a
...
...
@@ -71,6 +71,16 @@ static inline D3DXCOLOR* D3DXColorScale(D3DXCOLOR *pout, CONST D3DXCOLOR *pc, FL
return pout;
}
static inline D3DXCOLOR* D3DXColorSubtract(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;
}
/*_______________D3DXVECTOR2________________________*/
static inline D3DXVECTOR2* D3DXVec2Add(D3DXVECTOR2 *pout, CONST D3DXVECTOR2 *pv1, CONST D3DXVECTOR2 *pv2)
...
...
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