555{
558 IDirectXFileEnumObject *dxfile_enum_object;
559 void *dxfile_source;
563 IDirectXFileData *data_object;
564 unsigned children_array_size = 0;
566
567 TRACE(
"iface %p, source %p, options %#x, enum_object %p.\n", iface,
source,
options, enum_object);
568
569 if (!enum_object)
571
573
575 {
576 dxfile_source = (
void*)
source;
578 }
580 {
582
586 dxfile_source = &dxfile_resource;
588 }
590 {
592
595 dxfile_source = &dxfile_memory;
597 }
598 else
599 {
602 }
603
605 if (!object)
607
609 object->ref = 1;
610
612
614 {
617 }
618
619
621 {
622 if (
object->nb_children >= children_array_size)
623 {
624 ID3DXFileData **new_children;
625
627 {
628 children_array_size *= 2;
630 sizeof(*
object->children) * children_array_size);
631 }
632 else
633 {
634 children_array_size = 4;
636 }
637 if (!new_children)
638 {
640 break;
641 }
642 object->children = new_children;
643 }
646 IUnknown_Release(data_object);
648 break;
649 object->nb_children++;
650 }
652 {
653 ID3DXFileData **new_children;
654
657 if (new_children)
658 object->children = new_children;
659 }
660
662
664 WARN(
"Cannot get all top level data objects\n");
665
667
668 *enum_object = &object->ID3DXFileEnumObject_iface;
669
671}
#define D3DXF_FILELOAD_FROMFILE
#define D3DXF_FILELOAD_FROMRESOURCE
#define D3DXF_FILELOAD_FROMMEMORY
static const ID3DXFileEnumObjectVtbl d3dx9_file_enum_object_vtbl
static HRESULT d3dx9_file_data_create(IDirectXFileObject *dxfile_object, ID3DXFileData **ret_iface)
#define HeapFree(x, y, z)
#define IDirectXFileEnumObject_GetNextDataObject(p, a)
#define IDirectXFileEnumObject_Release(p)
#define DXFILELOAD_FROMFILE
#define IDirectXFile_CreateEnumObject(p, a, b, c)
#define DXFILELOAD_FROMRESOURCE
#define DXFILEERR_NOMOREOBJECTS
#define DXFILELOAD_FROMMEMORY
static char memory[1024 *256]