From 809147f825c338019fe3974b3ca6a4e096d7b583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Thu, 27 Nov 2008 07:42:16 +0100 Subject: [PATCH] d3dx8: Implement D3DXMatrixStack_Translate. --- dlls/d3dx8/math.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx8/math.c b/dlls/d3dx8/math.c index 687927fd513..a989b5721a3 100644 --- a/dlls/d3dx8/math.c +++ b/dlls/d3dx8/math.c @@ -845,9 +845,15 @@ static HRESULT WINAPI ID3DXMatrixStackImpl_ScaleLocal(ID3DXMatrixStack *iface, F static HRESULT WINAPI ID3DXMatrixStackImpl_Translate(ID3DXMatrixStack *iface, FLOAT x, FLOAT y, FLOAT z) { + D3DXMATRIX temp; ID3DXMatrixStackImpl *This = (ID3DXMatrixStackImpl *)iface; - FIXME("(%p) : stub\n",This); - return E_NOTIMPL; + + TRACE("iface %p\n", iface); + + D3DXMatrixTranslation(&temp, x, y, z); + D3DXMatrixMultiply(&This->stack[This->current], &This->stack[This->current], &temp); + + return D3D_OK; } static HRESULT WINAPI ID3DXMatrixStackImpl_TranslateLocal(ID3DXMatrixStack *iface, FLOAT x, FLOAT y, FLOAT z)