Module: wine Branch: master Commit: 69cf5e4d8ef69979658834b49b278f13f22535c6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=69cf5e4d8ef69979658834b49b...
Author: Dylan Smith dylan.ah.smith@gmail.com Date: Wed Jun 22 14:24:35 2011 -0400
d3dx9: Implement GetBoneOffsetMatrix and SetBoneOffsetMatrix.
---
dlls/d3dx9_36/skin.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/d3dx9_36/skin.c b/dlls/d3dx9_36/skin.c index d1713ec..3b03425 100644 --- a/dlls/d3dx9_36/skin.c +++ b/dlls/d3dx9_36/skin.c @@ -26,6 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx); struct bone { char *name; + D3DXMATRIX transform; DWORD num_influences; DWORD *vertices; FLOAT *weights; @@ -274,18 +275,25 @@ static HRESULT WINAPI ID3DXSkinInfoImpl_SetBoneOffsetMatrix(ID3DXSkinInfo *iface { ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface);
- FIXME("(%p, %u, %p): stub\n", This, bone_num, bone_transform); + TRACE("(%p, %u, %p)\n", This, bone_num, bone_transform);
- return E_NOTIMPL; + if (bone_num >= This->num_bones || !bone_transform) + return D3DERR_INVALIDCALL; + + This->bones[bone_num].transform = *bone_transform; + return D3D_OK; }
static LPD3DXMATRIX WINAPI ID3DXSkinInfoImpl_GetBoneOffsetMatrix(ID3DXSkinInfo *iface, DWORD bone_num) { ID3DXSkinInfoImpl *This = impl_from_ID3DXSkinInfo(iface);
- FIXME("(%p, %u): stub\n", This, bone_num); + TRACE("(%p, %u)\n", This, bone_num); + + if (bone_num >= This->num_bones) + return NULL;
- return NULL; + return &This->bones[bone_num].transform; }
static HRESULT WINAPI ID3DXSkinInfoImpl_Clone(ID3DXSkinInfo *iface, LPD3DXSKININFO *skin_info)