Commit 0dc3208c authored by David Adam's avatar David Adam Committed by Alexandre Julliard

d3dx8: Implement D3DXPlaneColorScale.

parent 03e92443
...@@ -86,6 +86,16 @@ static void D3DXColorTest(void) ...@@ -86,6 +86,16 @@ static void D3DXColorTest(void)
ok(funcpointer == NULL, "Expected: %p, Got: %p\n", NULL, funcpointer); ok(funcpointer == NULL, "Expected: %p, Got: %p\n", NULL, funcpointer);
funcpointer = D3DXColorNegative(NULL,NULL); funcpointer = D3DXColorNegative(NULL,NULL);
ok(funcpointer == NULL, "Expected: %p, Got: %p\n", NULL, funcpointer); ok(funcpointer == NULL, "Expected: %p, Got: %p\n", NULL, funcpointer);
/*_______________D3DXColorScale________________*/
expected.r = 0.06f; expected.g = 0.225f; expected.b = 0.123f; expected.a = 0.279f;
D3DXColorScale(&got,&color,scale);
expect_color(expected,got);
/* Test the NULL case */
funcpointer = D3DXColorScale(&got,NULL,scale);
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);
} }
static void D3DXPlaneTest(void) static void D3DXPlaneTest(void)
......
...@@ -51,6 +51,16 @@ static inline D3DXCOLOR* D3DXColorNegative(D3DXCOLOR *pout, CONST D3DXCOLOR *pc) ...@@ -51,6 +51,16 @@ static inline D3DXCOLOR* D3DXColorNegative(D3DXCOLOR *pout, CONST D3DXCOLOR *pc)
return pout; return pout;
} }
static inline D3DXCOLOR* D3DXColorScale(D3DXCOLOR *pout, CONST D3DXCOLOR *pc, FLOAT s)
{
if ( !pout || !pc ) return NULL;
pout->r = s* (pc->r);
pout->g = s* (pc->g);
pout->b = s* (pc->b);
pout->a = s* (pc->a);
return pout;
}
/*_______________D3DXVECTOR2________________________*/ /*_______________D3DXVECTOR2________________________*/
static inline D3DXVECTOR2* D3DXVec2Add(D3DXVECTOR2 *pout, CONST D3DXVECTOR2 *pv1, CONST D3DXVECTOR2 *pv2) static inline D3DXVECTOR2* D3DXVec2Add(D3DXVECTOR2 *pout, CONST D3DXVECTOR2 *pv1, CONST D3DXVECTOR2 *pv2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment