[PATCH] Implement ID3DXMatrixStack::RotateAxisLocal

Jérôme Gardou jerome.gardou at laposte.net
Sat Nov 15 09:17:20 CST 2008


---
 dlls/d3dx8/math.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dlls/d3dx8/math.c b/dlls/d3dx8/math.c
index 2872f44..f6aba1d 100644
--- a/dlls/d3dx8/math.c
+++ b/dlls/d3dx8/math.c
@@ -774,8 +774,14 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_RotateAxis(ID3DXMatrixStack *iface, C
 static HRESULT WINAPI ID3DXMatrixStackImpl_RotateAxisLocal(ID3DXMatrixStack *iface, CONST D3DXVECTOR3 *pv, FLOAT angle)
 {
     ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface;
-    FIXME("(%p) : stub\n",This);
-    return E_NOTIMPL;
+    D3DMATRIX tmp ;
+
+    TRACE("iface %p\n",This);
+
+    if(!pv) return D3DERR_INVALIDCALL ;
+    D3DXMatrixRotationAxis(&tmp, pv, angle) ;
+    D3DXMatrixMultiply(&This->stack[This->current], &tmp, &This->stack[This->current]) ;
+    return D3D_OK;
 }
 
 static HRESULT WINAPI ID3DXMatrixStackImpl_RotateYawPitchRoll(ID3DXMatrixStack *iface, FLOAT x, FLOAT y, FLOAT z)
-- 
1.6.0.3


--------------020308020601040509060709--



More information about the wine-patches mailing list