Henri Verbeet : d3d9: Get rid of the D3D_DECL_* macros.
Alexandre Julliard
julliard at winehq.org
Fri May 25 10:52:49 CDT 2012
Module: wine
Branch: master
Commit: b5d64260e00ef98de12cecbfcbd5a2910538875b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b5d64260e00ef98de12cecbfcbd5a2910538875b
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Fri May 25 16:10:28 2012 +0200
d3d9: Get rid of the D3D_DECL_* macros.
---
dlls/d3d9/vertexdeclaration.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/d3d9/vertexdeclaration.c b/dlls/d3d9/vertexdeclaration.c
index 679f010..2d31dd7 100644
--- a/dlls/d3d9/vertexdeclaration.c
+++ b/dlls/d3d9/vertexdeclaration.c
@@ -27,8 +27,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
static const struct
{
enum wined3d_format_id format;
- int size;
- int typesize;
+ unsigned int component_count;
+ unsigned int component_size;
}
d3d_dtype_lookup[] =
{
@@ -51,9 +51,6 @@ d3d_dtype_lookup[] =
/* D3DDECLTYPE_FLOAT16_4 */ {WINED3DFMT_R16G16B16A16_FLOAT, 4, sizeof(short int)}
};
-#define D3D_DECL_SIZE(type) d3d_dtype_lookup[type].size
-#define D3D_DECL_TYPESIZE(type) d3d_dtype_lookup[type].typesize
-
static inline IDirect3DVertexDeclaration9Impl *impl_from_IDirect3DVertexDeclaration9(IDirect3DVertexDeclaration9 *iface)
{
return CONTAINING_RECORD(iface, IDirect3DVertexDeclaration9Impl, IDirect3DVertexDeclaration9_iface);
@@ -192,7 +189,8 @@ HRESULT vdecl_convert_fvf(
elements[idx].Stream = 0;
elements[idx].Method = D3DDECLMETHOD_DEFAULT;
elements[idx].Offset = offset;
- offset += D3D_DECL_SIZE(elements[idx].Type) * D3D_DECL_TYPESIZE(elements[idx].Type);
+ offset += d3d_dtype_lookup[elements[idx].Type].component_count
+ * d3d_dtype_lookup[elements[idx].Type].component_size;
}
*ppVertexElements = elements;
More information about the wine-cvs
mailing list