2 * DirectX File private interfaces (D3DXOF.DLL)
4 * Copyright 2004, 2008 Christian Costa
6 * This file contains the (internal) driver registration functions,
7 * driver enumeration APIs and DirectDraw creation functions.
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 #ifndef __D3DXOF_PRIVATE_INCLUDED__
25 #define __D3DXOF_PRIVATE_INCLUDED__
36 #define MAX_NAME_LEN 32
37 #define MAX_ARRAY_DIM 4
38 #define MAX_MEMBERS 50
39 #define MAX_CHILDS 100
40 #define MAX_TEMPLATES 200
41 #define MAX_OBJECTS 500
42 #define MAX_SUBOBJECTS 500
43 #define MAX_STRINGS_BUFFER 10000
45 #define MAX_DATA_SIZE 400000
50 char name[MAX_NAME_LEN];
52 BOOL dim_fixed[MAX_ARRAY_DIM]; /* fixed or variable */
53 ULONG dim_value[MAX_ARRAY_DIM]; /* fixed value or member index */
57 char name[MAX_NAME_LEN];
62 char childs[MAX_CHILDS][MAX_NAME_LEN];
64 member members[MAX_MEMBERS];
75 struct _xobject* ptarget;
76 char name[MAX_NAME_LEN];
83 xobject_member members[MAX_MEMBERS];
86 struct _xobject * childs[MAX_CHILDS];
87 struct _xobject * root;
90 typedef struct _xobject xobject;
96 xtemplate xtemplates[MAX_TEMPLATES];
100 IDirectXFileBinary lpVtbl;
102 } IDirectXFileBinaryImpl;
105 IDirectXFileData lpVtbl;
113 } IDirectXFileDataImpl;
116 IDirectXFileDataReference lpVtbl;
119 } IDirectXFileDataReferenceImpl;
122 IDirectXFileObject lpVtbl;
124 } IDirectXFileObjectImpl;
127 /* Buffer to parse */
138 xobject** pxo_globals;
139 ULONG nb_pxo_globals;
141 IDirectXFileImpl* pdxf;
143 xtemplate* pxt[MAX_SUBOBJECTS];
150 IDirectXFileEnumObject lpVtbl;
152 DXFILELOADOPTIONS source;
156 HGLOBAL resource_data;
158 IDirectXFileImpl* pDirectXFile;
160 xobject* xobjects[MAX_OBJECTS];
161 IDirectXFileData* pRefObjects[MAX_OBJECTS];
162 } IDirectXFileEnumObjectImpl;
165 IDirectXFileSaveObject lpVtbl;
167 } IDirectXFileSaveObjectImpl;
169 HRESULT IDirectXFileImpl_Create(IUnknown *pUnkOuter, LPVOID *ppObj);
170 HRESULT IDirectXFileFileObjectImpl_Create(IDirectXFileObjectImpl** ppObj);
171 HRESULT IDirectXFileFileSaveObjectImpl_Create(IDirectXFileSaveObjectImpl** ppObj);
173 BOOL read_bytes(parse_buffer * buf, LPVOID data, DWORD size);
174 BOOL parse_template(parse_buffer * buf);
175 void dump_template(xtemplate* templates_array, xtemplate* ptemplate);
176 BOOL is_template_available(parse_buffer * buf);
177 BOOL parse_object(parse_buffer * buf);
179 #endif /* __D3DXOF_PRIVATE_INCLUDED__ */