d3dx8: Implement D3DXColorAdjustContrast.
This commit is contained in:
parent
8389eab6b7
commit
375dcaa82e
|
@ -67,7 +67,7 @@
|
||||||
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
@ stdcall D3DXPlaneFromPoints(ptr ptr ptr ptr)
|
||||||
@ stdcall D3DXPlaneTransform(ptr ptr ptr)
|
@ stdcall D3DXPlaneTransform(ptr ptr ptr)
|
||||||
@ stdcall D3DXColorAdjustSaturation(ptr ptr long)
|
@ stdcall D3DXColorAdjustSaturation(ptr ptr long)
|
||||||
@ stub D3DXColorAdjustContrast
|
@ stdcall D3DXColorAdjustContrast(ptr ptr long)
|
||||||
@ stub D3DXCreateMatrixStack
|
@ stub D3DXCreateMatrixStack
|
||||||
@ stdcall D3DXCreateFont(ptr ptr ptr)
|
@ stdcall D3DXCreateFont(ptr ptr ptr)
|
||||||
@ stub D3DXCreateFontIndirect
|
@ stub D3DXCreateFontIndirect
|
||||||
|
|
|
@ -34,6 +34,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx8);
|
||||||
|
|
||||||
/*_________________D3DXColor____________________*/
|
/*_________________D3DXColor____________________*/
|
||||||
|
|
||||||
|
D3DXCOLOR* WINAPI D3DXColorAdjustContrast(D3DXCOLOR *pout, CONST D3DXCOLOR *pc, FLOAT s)
|
||||||
|
{
|
||||||
|
pout->r = 0.5f + s * (pc->r - 0.5f);
|
||||||
|
pout->g = 0.5f + s * (pc->g - 0.5f);
|
||||||
|
pout->b = 0.5f + s * (pc->b - 0.5f);
|
||||||
|
pout->a = pc->a;
|
||||||
|
return pout;
|
||||||
|
}
|
||||||
|
|
||||||
D3DXCOLOR* WINAPI D3DXColorAdjustSaturation(D3DXCOLOR *pout, CONST D3DXCOLOR *pc, FLOAT s)
|
D3DXCOLOR* WINAPI D3DXColorAdjustSaturation(D3DXCOLOR *pout, CONST D3DXCOLOR *pc, FLOAT s)
|
||||||
{
|
{
|
||||||
FLOAT grey;
|
FLOAT grey;
|
||||||
|
|
|
@ -82,6 +82,11 @@ static void D3DXColorTest(void)
|
||||||
funcpointer = D3DXColorAdd(NULL,NULL,NULL);
|
funcpointer = D3DXColorAdd(NULL,NULL,NULL);
|
||||||
ok(funcpointer == NULL, "Expected: %p, Got: %p\n", NULL, funcpointer);
|
ok(funcpointer == NULL, "Expected: %p, Got: %p\n", NULL, funcpointer);
|
||||||
|
|
||||||
|
/*_______________D3DXColorAdjustContrast______*/
|
||||||
|
expected.r = 0.41f; expected.g = 0.575f; expected.b = 0.473f, expected.a = 0.93f;
|
||||||
|
D3DXColorAdjustContrast(&got,&color,scale);
|
||||||
|
expect_color(expected,got);
|
||||||
|
|
||||||
/*_______________D3DXColorAdjustSaturation______*/
|
/*_______________D3DXColorAdjustSaturation______*/
|
||||||
expected.r = 0.486028f; expected.g = 0.651028f; expected.b = 0.549028f, expected.a = 0.93f;
|
expected.r = 0.486028f; expected.g = 0.651028f; expected.b = 0.549028f, expected.a = 0.93f;
|
||||||
D3DXColorAdjustSaturation(&got,&color,scale);
|
D3DXColorAdjustSaturation(&got,&color,scale);
|
||||||
|
|
|
@ -263,7 +263,9 @@ typedef struct D3DXCOLOR
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
D3DXCOLOR* WINAPI D3DXColorAdjustContrast(D3DXCOLOR *pout, CONST D3DXCOLOR *pc, FLOAT s);
|
||||||
D3DXCOLOR* WINAPI D3DXColorAdjustSaturation(D3DXCOLOR *pout, CONST D3DXCOLOR *pc, FLOAT s);
|
D3DXCOLOR* WINAPI D3DXColorAdjustSaturation(D3DXCOLOR *pout, CONST D3DXCOLOR *pc, FLOAT s);
|
||||||
|
|
||||||
D3DXMATRIX* WINAPI D3DXMatrixAffineTransformation(D3DXMATRIX *pout, float scaling, D3DXVECTOR3 *rotationcenter, D3DXQUATERNION *rotation, D3DXVECTOR3 *translation);
|
D3DXMATRIX* WINAPI D3DXMatrixAffineTransformation(D3DXMATRIX *pout, float scaling, D3DXVECTOR3 *rotationcenter, D3DXQUATERNION *rotation, D3DXVECTOR3 *translation);
|
||||||
FLOAT WINAPI D3DXMatrixfDeterminant(CONST D3DXMATRIX *pm);
|
FLOAT WINAPI D3DXMatrixfDeterminant(CONST D3DXMATRIX *pm);
|
||||||
D3DXMATRIX* WINAPI D3DXMatrixInverse(D3DXMATRIX *pout, FLOAT *pdeterminant, CONST D3DXMATRIX *pm);
|
D3DXMATRIX* WINAPI D3DXMatrixInverse(D3DXMATRIX *pout, FLOAT *pdeterminant, CONST D3DXMATRIX *pm);
|
||||||
|
|
Loading…
Reference in New Issue