=?UTF-8?Q?Rico=20Sch=C3=BCller=20?=: d3dx9: Implement ID3DXBaseEffect:: SetVectorArray().
Alexandre Julliard
julliard at winehq.org
Wed Dec 14 13:23:32 CST 2011
Module: wine
Branch: master
Commit: 165afd63cee6e4c52512e6a31ea2c20a2d312ba3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=165afd63cee6e4c52512e6a31ea2c20a2d312ba3
Author: Rico Schüller <kgbricola at web.de>
Date: Tue Dec 13 17:02:37 2011 +0100
d3dx9: Implement ID3DXBaseEffect::SetVectorArray().
---
dlls/d3dx9_36/effect.c | 34 ++++++++++++++++++++++++++++++++--
1 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c
index 1e86aa2..d9fc0b9 100644
--- a/dlls/d3dx9_36/effect.c
+++ b/dlls/d3dx9_36/effect.c
@@ -2123,10 +2123,40 @@ static HRESULT WINAPI ID3DXBaseEffectImpl_GetVector(ID3DXBaseEffect *iface, D3DX
static HRESULT WINAPI ID3DXBaseEffectImpl_SetVectorArray(ID3DXBaseEffect *iface, D3DXHANDLE parameter, CONST D3DXVECTOR4 *vector, UINT count)
{
struct ID3DXBaseEffectImpl *This = impl_from_ID3DXBaseEffect(iface);
+ struct d3dx_parameter *param = get_valid_parameter(This, parameter);
- FIXME("iface %p, parameter %p, vector %p, count %u stub\n", This, parameter, vector, count);
+ TRACE("iface %p, parameter %p, vector %p, count %u stub\n", This, parameter, vector, count);
- return E_NOTIMPL;
+ if (param && param->element_count && param->element_count >= count)
+ {
+ UINT i;
+
+ TRACE("Class %s\n", debug_d3dxparameter_class(param->class));
+
+ switch (param->class)
+ {
+ case D3DXPC_VECTOR:
+ for (i = 0; i < count; ++i)
+ {
+ set_vector(get_parameter_struct(param->member_handles[i]), &vector[i]);
+ }
+ return D3D_OK;
+
+ case D3DXPC_SCALAR:
+ case D3DXPC_MATRIX_ROWS:
+ case D3DXPC_OBJECT:
+ case D3DXPC_STRUCT:
+ break;
+
+ default:
+ FIXME("Unhandled class %s\n", debug_d3dxparameter_class(param->class));
+ break;
+ }
+ }
+
+ WARN("Invalid argument specified\n");
+
+ return D3DERR_INVALIDCALL;
}
static HRESULT WINAPI ID3DXBaseEffectImpl_GetVectorArray(ID3DXBaseEffect *iface, D3DXHANDLE parameter, D3DXVECTOR4 *vector, UINT count)
More information about the wine-cvs
mailing list