45"<3D82AB43-62DA-11CF-AB39-0020AF71E433>"
67"template MeshVertexColors\n"
69"<1630B821-7842-11cf-8F52-0040333594A3>\n"
70"DWORD nVertexColors;\n"
71"array indexColor vertexColors[nVertexColors];\n"
76"template MeshVertexColors\n"
78"<1630B821-7842-11cf-8F52-0040333594A3>\n"
79"DWORD nVertexColors;\n"
80"array IndexColor vertexColors[nVertexColors];\n"
92 ok(
ret ==
S_OK,
"D3DXCreateFile failed with %#x\n",
ret);
110 ok(
ret ==
S_OK,
"RegisterTemplates failed with %#x\n",
ret);
112 d3dxfile->lpVtbl->Release(d3dxfile);
119 ID3DXFileEnumObject *enum_object;
120 ID3DXFileData *data_object;
126 ok(
ret ==
S_OK,
"D3DXCreateFile failed with %#x\n",
ret);
129 ok(
ret ==
S_OK,
"RegisterTemplates failed with %#x\n",
ret);
135 ok(
ret ==
S_OK,
"CreateEnumObject failed with %#x\n",
ret);
137 ret = enum_object->lpVtbl->GetChild(enum_object, 0, &data_object);
140 ret = data_object->lpVtbl->Unlock(data_object);
142 ret = data_object->lpVtbl->Lock(data_object, &
size, &
data);
144 ret = data_object->lpVtbl->Lock(data_object, &
size, &
data);
146 ret = data_object->lpVtbl->Unlock(data_object);
148 ret = data_object->lpVtbl->Unlock(data_object);
151 data_object->lpVtbl->Release(data_object);
152 enum_object->lpVtbl->Release(enum_object);
153 d3dxfile->lpVtbl->Release(d3dxfile);
160 ID3DXFileEnumObject *enum_object;
161 ID3DXFileData *data_object;
167 ok(
ret ==
S_OK,
"D3DXCreateFile failed with %#x\n",
ret);
170 ok(
ret ==
S_OK,
"RegisterTemplates failed with %#x\n",
ret);
176 ok(
ret ==
S_OK,
"CreateEnumObject failed with %#x\n",
ret);
177 ret = enum_object->lpVtbl->GetChild(enum_object, 0, &data_object);
180 ret = data_object->lpVtbl->GetName(data_object,
NULL,
NULL);
182 ret = data_object->lpVtbl->GetName(data_object,
name,
NULL);
184 ret = data_object->lpVtbl->GetName(data_object,
NULL, &
length);
186 ok(
length == 7,
"Returned length should be 7 instead of %ld\n",
length);
188 ret = data_object->lpVtbl->GetName(data_object,
name, &
length);
190 ok(
length == 7,
"Returned length should be 7 instead of %ld\n",
length);
191 ok(!
strcmp(
name,
"Object"),
"Returned string should be 'Object' instead of '%s'\n",
name);
193 ret = data_object->lpVtbl->GetName(data_object,
name, &
length);
196 data_object->lpVtbl->Release(data_object);
197 enum_object->lpVtbl->Release(enum_object);
203 ok(
ret ==
S_OK,
"CreateEnumObject failed with %#x\n",
ret);
204 ret = enum_object->lpVtbl->GetChild(enum_object, 0, &data_object);
209 ret = data_object->lpVtbl->GetName(data_object,
NULL, &
length);
211 ok(
length == 1,
"Returned length should be 1 instead of %ld\n",
length);
214 ret = data_object->lpVtbl->GetName(data_object,
name, &
length);
216 ok(
length == 1,
"Returned length should be 1 instead of %ld\n",
length);
217 ok(
name[0] == 0x7f,
"First character is %#x instead of 0x7f\n",
name[0]);
220 ret = data_object->lpVtbl->GetName(data_object,
name, &
length);
222 ok(
length == 1,
"Returned length should be 1 instead of %ld\n",
length);
223 ok(
name[0] == 0,
"First character is %#x instead of 0x00\n",
name[0]);
225 data_object->lpVtbl->Release(data_object);
226 enum_object->lpVtbl->Release(enum_object);
227 d3dxfile->lpVtbl->Release(d3dxfile);
236 ok(
ret ==
S_OK,
"D3DXCreateFile failed with %#x\n",
ret);
240 ok(
ret ==
S_OK,
"RegisterTemplates failed with %#x\n",
ret);
244 d3dxfile->lpVtbl->Release(d3dxfile);
259 ret = xfile_data->lpVtbl->GetId(xfile_data, &
clsid);
260 ok(
ret ==
S_OK,
"ID3DXFileData_GetId failed with %#x\n",
ret);
261 ret = xfile_data->lpVtbl->GetName(xfile_data,
name, &
len);
262 ok(
ret ==
S_OK,
"ID3DXFileData_GetName failed with %#x\n",
ret);
263 ret = xfile_data->lpVtbl->GetType(xfile_data, &clsid_type);
264 ok(
ret ==
S_OK,
"IDirectXFileData_GetType failed with %#x\n",
ret);
265 ret = xfile_data->lpVtbl->Lock(xfile_data, &
size, (
const void**)&
data);
266 ok(
ret ==
S_OK,
"IDirectXFileData_Lock failed with %#x\n",
ret);
271 printf(
"Found object '%s' - %s - %s - %lu\n",
286 ret = xfile_data->lpVtbl->Unlock(xfile_data);
287 ok(
ret ==
S_OK,
"ID3DXFileData_Unlock failed with %#x\n",
ret);
289 ret = xfile_data->lpVtbl->GetChildren(xfile_data, &children);
290 ok(
ret ==
S_OK,
"ID3DXFileData_GetChildren failed with %#x\n",
ret);
294 for (
i = 0;
i < children;
i++)
296 ID3DXFileData *
child;
299 ret = xfile_data->lpVtbl->GetChild(xfile_data,
i, &
child);
300 ok(
ret ==
S_OK,
"ID3DXFileData_GetChild failed with %#x\n",
ret);
304 printf(
"Found Data Reference (%d)\n",
i + 1);
306 printf(
"Found Data (%d)\n",
i + 1);
320 ID3DXFile *xfile =
NULL;
321 ID3DXFileEnumObject *xfile_enum_object =
NULL;
342 skip(
"Templates file is too big\n");
346 printf(
"Load templates file (%u bytes)\n",
size);
349 ok(
ret ==
S_OK,
"D3DXCreateFile failed with %#x\n",
ret);
351 ret = xfile->lpVtbl->RegisterTemplates(xfile,
data,
size);
352 ok(
ret ==
S_OK,
"ID3DXFileImpl_RegisterTemplates failed with %#x\n",
ret);
355 ok(
ret ==
S_OK,
"ID3DXFile_CreateEnumObject failed with %#x\n",
ret);
357 ret = xfile_enum_object->lpVtbl->GetChildren(xfile_enum_object, &children);
358 ok(
ret ==
S_OK,
"ID3DXFileEnumObject_GetChildren failed with %#x\n",
ret);
360 for (
i = 0;
i < children;
i++)
362 ID3DXFileData *
child;
363 ret = xfile_enum_object->lpVtbl->GetChild(xfile_enum_object,
i, &
child);
364 ok(
ret ==
S_OK,
"ID3DXFileEnumObject_GetChild failed with %#x\n",
ret);
370 ref = xfile_enum_object->lpVtbl->Release(xfile_enum_object);
371 ok(
ref == 0,
"Got refcount %u, expected 0\n",
ref);
373 ref = xfile->lpVtbl->Release(xfile);
374 ok(
ref == 0,
"Got refcount %u, expected 0\n",
ref);
int strcmp(const char *String1, const char *String2)
#define D3DXF_FILELOAD_FROMFILE
#define D3DXFERR_BADFILEVERSION
#define D3DXFERR_BADFILEFLOATSIZE
#define D3DXF_FILELOAD_FROMMEMORY
#define D3DXFERR_PARSEERROR
#define D3DXFERR_BADFILETYPE
#define D3DXFERR_BADVALUE
HRESULT WINAPI D3DXFileCreate(ID3DXFile **d3dxfile)
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define HeapFree(x, y, z)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static char object_noname[]
static void test_templates(void)
static char template_using_index_color_upper[]
static const char templates[]
static void test_getname(void)
static const char templates_bad_file_type2[]
static void test_lock_unlock(void)
static char template_using_index_color_lower[]
static const char templates_parse_error[]
static const char templates_bad_file_float_size[]
static void process_data(ID3DXFileData *xfile_data, int level)
static void test_type_index_color(void)
static const char templates_bad_file_type1[]
static const char templates_bad_file_version[]
static void test_dump(void)
static char memory[1024 *256]
static __inline const char * wine_dbgstr_guid(const GUID *id)