[PATCH] Implement ID3DXMatrixStack::Translate

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


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

diff --git a/dlls/d3dx8/math.c b/dlls/d3dx8/math.c
index e4add68..94d8127 100644
--- a/dlls/d3dx8/math.c
+++ b/dlls/d3dx8/math.c
@@ -836,8 +836,13 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_ScaleLocal(ID3DXMatrixStack *iface, F
 static HRESULT WINAPI ID3DXMatrixStackImpl_Translate(ID3DXMatrixStack *iface, FLOAT x, FLOAT y, FLOAT z)
 {
     ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface;
-    FIXME("(%p) : stub\n",This);
-    return E_NOTIMPL;
+    D3DMATRIX tmp ;
+
+    TRACE("iface %p\n",This);
+
+    D3DXMatrixTranslation(&tmp, x, y, z) ;
+    D3DXMatrixMultiply(&This->stack[This->current], &This->stack[This->current], &tmp) ;
+    return D3D_OK;
 }
 
 static HRESULT WINAPI ID3DXMatrixStackImpl_TranslateLocal(ID3DXMatrixStack *iface, FLOAT x, FLOAT y, FLOAT z)
-- 
1.6.0.3


--------------080509090102050306060909--



More information about the wine-patches mailing list