Hi,
> +void primitiveDeclarationConvertToStridedData(
> + IWineD3DDevice *iface,
> + BOOL useVertexShaderFunction,
> + Direct3DVertexStridedData *strided,
> + LONG BaseVertexIndex,
> + DWORD *fvf,
> + BOOL storeOrder,
> + INT arrayUsageMap[WINED3DSHADERDECLUSAGE_MAX_USAGE]) {
I personally dislike that. In my opinion it's better this way:
void
primitiveDeclarationConvertToStridedData(IWineD3DDevice *iface,
BOOL useVertexShaderFunction,
... )
{
code;
}
Well, primitiveDeclarationConvertToStridedData is a bit of a bad example,
because the function name isn't that short and INT
arrayUsageMap[WINED3DSHADERDECLUSAGE_MAX_USAGE] is long too. However, it
makes much more sense for the usual COM functions IMO:
/***************************************************************
* IWineD3DDevice::SetTexture
*
* Some comments don't hurt. That's the usual style I have
* found in other places, I think we should consistently
* write what each function does for WineD3D, as is is a Wine-
* specific dll and doesn't have MSDN documentation
*
* Params:
* stage: What's this?
* Texture: What's this?
*
* Returns:
* What should the return value be?
*
***************************************************************/
HRESULT WINAPI
IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface,
DWORD stage,
IWineD3DBaseTexture *Texture)
{
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
IWineD3DBaseTextureImpl *TexImpl = (IWineD3DBaseTextureImpl *) Texture;
HRESULT hr;
foo();
bar();
/* Do a function call: */
hr = IWineD3DDevice_FunkyCall(iface,
Param1,
Param2);
if(hr != D3D_OK)
{
/* What went wrong? */
return WINED3DERR_VERYBADERROR;
}
return WINED3D_OK;
}
Just my 2 cent. I know this is all a matter of taste. I plan making up the
WineD3D code this way when AJ is back and patches go in again.
Stefan