d3dx8: Remove useless variables.
This commit is contained in:
parent
4051eaf7c9
commit
86d392cce8
|
@ -61,7 +61,7 @@ D3DXCOLOR* WINAPI D3DXColorAdjustSaturation(D3DXCOLOR *pout, CONST D3DXCOLOR *pc
|
|||
|
||||
D3DXMATRIX* WINAPI D3DXMatrixAffineTransformation(D3DXMATRIX *pout, FLOAT scaling, CONST D3DXVECTOR3 *rotationcenter, CONST D3DXQUATERNION *rotation, CONST D3DXVECTOR3 *translation)
|
||||
{
|
||||
D3DXMATRIX m1, m2, m3, m4, m5, p1, p2, p3;
|
||||
D3DXMATRIX m1, m2, m3, m4, m5;
|
||||
|
||||
D3DXMatrixScaling(&m1, scaling, scaling, scaling);
|
||||
if ( !rotationcenter )
|
||||
|
@ -90,10 +90,10 @@ D3DXMATRIX* WINAPI D3DXMatrixAffineTransformation(D3DXMATRIX *pout, FLOAT scalin
|
|||
{
|
||||
D3DXMatrixTranslation(&m5, translation->x, translation->y, translation->z);
|
||||
}
|
||||
D3DXMatrixMultiply(&p1, &m1, &m2);
|
||||
D3DXMatrixMultiply(&p2, &p1, &m3);
|
||||
D3DXMatrixMultiply(&p3, &p2, &m4);
|
||||
D3DXMatrixMultiply(pout, &p3, &m5);
|
||||
D3DXMatrixMultiply(&m1, &m1, &m2);
|
||||
D3DXMatrixMultiply(&m1, &m1, &m3);
|
||||
D3DXMatrixMultiply(&m1, &m1, &m4);
|
||||
D3DXMatrixMultiply(pout, &m1, &m5);
|
||||
return pout;
|
||||
}
|
||||
|
||||
|
@ -218,10 +218,8 @@ D3DXMATRIX* WINAPI D3DXMatrixMultiply(D3DXMATRIX *pout, CONST D3DXMATRIX *pm1, C
|
|||
|
||||
D3DXMATRIX* WINAPI D3DXMatrixMultiplyTranspose(D3DXMATRIX *pout, CONST D3DXMATRIX *pm1, CONST D3DXMATRIX *pm2)
|
||||
{
|
||||
D3DXMATRIX temp;
|
||||
|
||||
D3DXMatrixMultiply(&temp, pm1, pm2);
|
||||
D3DXMatrixTranspose(pout, &temp);
|
||||
D3DXMatrixMultiply(pout, pm1, pm2);
|
||||
D3DXMatrixTranspose(pout, pout);
|
||||
return pout;
|
||||
}
|
||||
|
||||
|
@ -421,15 +419,15 @@ D3DXMATRIX* WINAPI D3DXMatrixRotationY(D3DXMATRIX *pout, FLOAT angle)
|
|||
|
||||
D3DXMATRIX* WINAPI D3DXMatrixRotationYawPitchRoll(D3DXMATRIX *pout, FLOAT yaw, FLOAT pitch, FLOAT roll)
|
||||
{
|
||||
D3DXMATRIX m, pout1, pout2, pout3;
|
||||
D3DXMATRIX m;
|
||||
|
||||
D3DXMatrixIdentity(&pout3);
|
||||
D3DXMatrixIdentity(pout);
|
||||
D3DXMatrixRotationZ(&m, roll);
|
||||
D3DXMatrixMultiply(&pout2,&pout3,&m);
|
||||
D3DXMatrixMultiply(pout, pout, &m);
|
||||
D3DXMatrixRotationX(&m, pitch);
|
||||
D3DXMatrixMultiply(&pout1,&pout2,&m);
|
||||
D3DXMatrixMultiply(pout, pout, &m);
|
||||
D3DXMatrixRotationY(&m, yaw);
|
||||
D3DXMatrixMultiply(pout,&pout1,&m);
|
||||
D3DXMatrixMultiply(pout, pout, &m);
|
||||
return pout;
|
||||
}
|
||||
D3DXMATRIX* WINAPI D3DXMatrixRotationZ(D3DXMATRIX *pout, FLOAT angle)
|
||||
|
@ -479,7 +477,7 @@ D3DXMATRIX* WINAPI D3DXMatrixShadow(D3DXMATRIX *pout, CONST D3DXVECTOR4 *plight,
|
|||
|
||||
D3DXMATRIX* WINAPI D3DXMatrixTransformation(D3DXMATRIX *pout, CONST D3DXVECTOR3 *pscalingcenter, CONST D3DXQUATERNION *pscalingrotation, CONST D3DXVECTOR3 *pscaling, CONST D3DXVECTOR3 *protationcenter, CONST D3DXQUATERNION *protation, CONST D3DXVECTOR3 *ptranslation)
|
||||
{
|
||||
D3DXMATRIX m1, m2, m3, m4, m5, m6, m7, p1, p2, p3, p4, p5;
|
||||
D3DXMATRIX m1, m2, m3, m4, m5, m6, m7;
|
||||
D3DXQUATERNION prc;
|
||||
D3DXVECTOR3 psc, pt;
|
||||
|
||||
|
@ -548,12 +546,12 @@ D3DXMATRIX* WINAPI D3DXMatrixTransformation(D3DXMATRIX *pout, CONST D3DXVECTOR3
|
|||
}
|
||||
D3DXMatrixTranslation(&m5, psc.x - prc.x, psc.y - prc.y, psc.z - prc.z);
|
||||
D3DXMatrixTranslation(&m7, prc.x + pt.x, prc.y + pt.y, prc.z + pt.z);
|
||||
D3DXMatrixMultiply(&p1, &m1, &m2);
|
||||
D3DXMatrixMultiply(&p2, &p1, &m3);
|
||||
D3DXMatrixMultiply(&p3, &p2, &m4);
|
||||
D3DXMatrixMultiply(&p4, &p3, &m5);
|
||||
D3DXMatrixMultiply(&p5, &p4, &m6);
|
||||
D3DXMatrixMultiply(pout, &p5, &m7);
|
||||
D3DXMatrixMultiply(&m1, &m1, &m2);
|
||||
D3DXMatrixMultiply(&m1, &m1, &m3);
|
||||
D3DXMatrixMultiply(&m1, &m1, &m4);
|
||||
D3DXMatrixMultiply(&m1, &m1, &m5);
|
||||
D3DXMatrixMultiply(&m1, &m1, &m6);
|
||||
D3DXMatrixMultiply(pout, &m1, &m7);
|
||||
return pout;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue