Commit 43ce2bf5 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d2d1/effect: Use effect property types identifier directly in initializers.

parent aa2aa203
...@@ -361,25 +361,25 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties * ...@@ -361,25 +361,25 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties *
{ {
static const UINT32 sizes[] = static const UINT32 sizes[] =
{ {
0, /* D2D1_PROPERTY_TYPE_UNKNOWN */ [D2D1_PROPERTY_TYPE_UNKNOWN] = 0,
0, /* D2D1_PROPERTY_TYPE_STRING */ [D2D1_PROPERTY_TYPE_STRING] = 0,
sizeof(BOOL), /* D2D1_PROPERTY_TYPE_BOOL */ [D2D1_PROPERTY_TYPE_BOOL] = sizeof(BOOL),
sizeof(UINT32), /* D2D1_PROPERTY_TYPE_UINT32 */ [D2D1_PROPERTY_TYPE_UINT32] = sizeof(UINT32),
sizeof(INT32), /* D2D1_PROPERTY_TYPE_INT32 */ [D2D1_PROPERTY_TYPE_INT32] = sizeof(INT32),
sizeof(float), /* D2D1_PROPERTY_TYPE_FLOAT */ [D2D1_PROPERTY_TYPE_FLOAT] = sizeof(float),
2 * sizeof(float), /* D2D1_PROPERTY_TYPE_VECTOR2 */ [D2D1_PROPERTY_TYPE_VECTOR2] = sizeof(D2D_VECTOR_2F),
3 * sizeof(float), /* D2D1_PROPERTY_TYPE_VECTOR3 */ [D2D1_PROPERTY_TYPE_VECTOR3] = sizeof(D2D_VECTOR_3F),
4 * sizeof(float), /* D2D1_PROPERTY_TYPE_VECTOR4 */ [D2D1_PROPERTY_TYPE_VECTOR4] = sizeof(D2D_VECTOR_4F),
0, /* FIXME: D2D1_PROPERTY_TYPE_BLOB */ [D2D1_PROPERTY_TYPE_BLOB] = 0 /* FIXME */,
sizeof(void *), /* D2D1_PROPERTY_TYPE_IUNKNOWN */ [D2D1_PROPERTY_TYPE_IUNKNOWN] = sizeof(IUnknown *),
sizeof(UINT32), /* D2D1_PROPERTY_TYPE_ENUM */ [D2D1_PROPERTY_TYPE_ENUM] = sizeof(UINT32),
sizeof(UINT32), /* D2D1_PROPERTY_TYPE_ARRAY */ [D2D1_PROPERTY_TYPE_ARRAY] = sizeof(UINT32),
sizeof(CLSID), /* D2D1_PROPERTY_TYPE_CLSID */ [D2D1_PROPERTY_TYPE_CLSID] = sizeof(CLSID),
6 * sizeof(float), /* D2D1_PROPERTY_TYPE_MATRIX_3X2 */ [D2D1_PROPERTY_TYPE_MATRIX_3X2] = sizeof(D2D_MATRIX_3X2_F),
12 * sizeof(float), /* D2D1_PROPERTY_TYPE_MATRIX_4X3 */ [D2D1_PROPERTY_TYPE_MATRIX_4X3] = sizeof(D2D_MATRIX_4X3_F),
16 * sizeof(float), /* D2D1_PROPERTY_TYPE_MATRIX_4X4 */ [D2D1_PROPERTY_TYPE_MATRIX_4X4] = sizeof(D2D_MATRIX_4X4_F),
20 * sizeof(float), /* D2D1_PROPERTY_TYPE_MATRIX_5X4 */ [D2D1_PROPERTY_TYPE_MATRIX_5X4] = sizeof(D2D_MATRIX_5X4_F),
sizeof(void *), /* D2D1_PROPERTY_TYPE_COLOR_CONTEXT */ [D2D1_PROPERTY_TYPE_COLOR_CONTEXT] = sizeof(ID2D1ColorContext *),
}; };
struct d2d_effect_property *p; struct d2d_effect_property *p;
HRESULT hr; HRESULT hr;
......
...@@ -677,25 +677,25 @@ static HRESULT parse_effect_get_property_type(IXmlReader *reader, D2D1_PROPERTY_ ...@@ -677,25 +677,25 @@ static HRESULT parse_effect_get_property_type(IXmlReader *reader, D2D1_PROPERTY_
{ {
static const WCHAR *types[] = static const WCHAR *types[] =
{ {
L"", /* D2D1_PROPERTY_TYPE_UNKNOWN */ [D2D1_PROPERTY_TYPE_UNKNOWN] = L"",
L"string", /* D2D1_PROPERTY_TYPE_STRING */ [D2D1_PROPERTY_TYPE_STRING] = L"string",
L"bool", /* D2D1_PROPERTY_TYPE_BOOL */ [D2D1_PROPERTY_TYPE_BOOL] = L"bool",
L"uint32", /* D2D1_PROPERTY_TYPE_UINT32 */ [D2D1_PROPERTY_TYPE_UINT32] = L"uint32",
L"int32", /* D2D1_PROPERTY_TYPE_INT32 */ [D2D1_PROPERTY_TYPE_INT32] = L"int32",
L"float", /* D2D1_PROPERTY_TYPE_FLOAT */ [D2D1_PROPERTY_TYPE_FLOAT] = L"float",
L"vector2", /* D2D1_PROPERTY_TYPE_VECTOR2 */ [D2D1_PROPERTY_TYPE_VECTOR2] = L"vector2",
L"vector3", /* D2D1_PROPERTY_TYPE_VECTOR3 */ [D2D1_PROPERTY_TYPE_VECTOR3] = L"vector3",
L"vector4", /* D2D1_PROPERTY_TYPE_VECTOR4 */ [D2D1_PROPERTY_TYPE_VECTOR4] = L"vector4",
L"blob", /* D2D1_PROPERTY_TYPE_BLOB */ [D2D1_PROPERTY_TYPE_BLOB] = L"blob",
L"iunknown", /* D2D1_PROPERTY_TYPE_IUNKNOWN */ [D2D1_PROPERTY_TYPE_IUNKNOWN] = L"iunknown",
L"enum", /* D2D1_PROPERTY_TYPE_ENUM */ [D2D1_PROPERTY_TYPE_ENUM] = L"enum",
L"array", /* D2D1_PROPERTY_TYPE_ARRAY */ [D2D1_PROPERTY_TYPE_ARRAY] = L"array",
L"clsid", /* D2D1_PROPERTY_TYPE_CLSID */ [D2D1_PROPERTY_TYPE_CLSID] = L"clsid",
L"matrix3x2", /* D2D1_PROPERTY_TYPE_MATRIX_3X2 */ [D2D1_PROPERTY_TYPE_MATRIX_3X2] = L"matrix3x2",
L"matrix4x3", /* D2D1_PROPERTY_TYPE_MATRIX_4X3 */ [D2D1_PROPERTY_TYPE_MATRIX_4X3] = L"matrix4x3",
L"matrix4x4", /* D2D1_PROPERTY_TYPE_MATRIX_4X4 */ [D2D1_PROPERTY_TYPE_MATRIX_4X4] = L"matrix4x4",
L"matrix5x4", /* D2D1_PROPERTY_TYPE_MATRIX_5X4 */ [D2D1_PROPERTY_TYPE_MATRIX_5X4] = L"matrix5x4",
L"colorcontext", /* D2D1_PROPERTY_TYPE_COLOR_CONTEXT */ [D2D1_PROPERTY_TYPE_COLOR_CONTEXT] = L"colorcontext",
}; };
unsigned int i; unsigned int i;
WCHAR *value; WCHAR *value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment