d3drm: Implement D3DVectorSubtract.
This commit is contained in:
parent
f50800b25d
commit
70a1cef5e4
|
@ -17,7 +17,7 @@
|
||||||
@ stub D3DRMVectorReflect
|
@ stub D3DRMVectorReflect
|
||||||
@ stub D3DRMVectorRotate
|
@ stub D3DRMVectorRotate
|
||||||
@ stub D3DRMVectorScale
|
@ stub D3DRMVectorScale
|
||||||
@ stub D3DRMVectorSubtract
|
@ stdcall D3DRMVectorSubtract(ptr ptr ptr)
|
||||||
@ stub Direct3DRMCreate
|
@ stub Direct3DRMCreate
|
||||||
@ stub DllCanUnloadNow
|
@ stub DllCanUnloadNow
|
||||||
@ stub DllGetClassObject
|
@ stub DllGetClassObject
|
||||||
|
|
|
@ -40,3 +40,12 @@ LPD3DVECTOR WINAPI D3DRMVectorAdd(LPD3DVECTOR d, LPD3DVECTOR s1, LPD3DVECTOR s2)
|
||||||
d->z=s1->z + s2->z;
|
d->z=s1->z + s2->z;
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Subtract Two Vectors */
|
||||||
|
LPD3DVECTOR WINAPI D3DRMVectorSubtract(LPD3DVECTOR d, LPD3DVECTOR s1, LPD3DVECTOR s2)
|
||||||
|
{
|
||||||
|
d->x=s1->x - s2->x;
|
||||||
|
d->y=s1->y - s2->y;
|
||||||
|
d->z=s1->z - s2->z;
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
|
|
@ -41,6 +41,11 @@ void VectorTest(void)
|
||||||
D3DRMVectorAdd(&r,&u,&v);
|
D3DRMVectorAdd(&r,&u,&v);
|
||||||
e.x=6.0;e.y=6.0;e.z=1.0;
|
e.x=6.0;e.y=6.0;e.z=1.0;
|
||||||
expect_vec(e,r);
|
expect_vec(e,r);
|
||||||
|
|
||||||
|
/*_______________________VectorSubtract__________________________*/
|
||||||
|
D3DRMVectorSubtract(&r,&u,&v);
|
||||||
|
e.x=-2.0;e.y=-2.0;e.z=1.0;
|
||||||
|
expect_vec(e,r);
|
||||||
}
|
}
|
||||||
|
|
||||||
START_TEST(vector)
|
START_TEST(vector)
|
||||||
|
|
Loading…
Reference in New Issue