2 * DirectX File private interfaces (D3DXOF.DLL)
4 * Copyright 2004, 2008 Christian Costa
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __D3DXOF_PRIVATE_INCLUDED__
22 #define __D3DXOF_PRIVATE_INCLUDED__
33 #define MAX_NAME_LEN 40
34 #define MAX_ARRAY_DIM 4
35 #define MAX_MEMBERS 50
36 #define MAX_CHILDREN 200
37 #define MAX_TEMPLATES 200
38 #define MAX_OBJECTS 500
39 #define MAX_SUBOBJECTS 2000
40 #define MAX_STRINGS_BUFFER 10000
45 char name[MAX_NAME_LEN];
47 BOOL dim_fixed[MAX_ARRAY_DIM]; /* fixed or variable */
48 ULONG dim_value[MAX_ARRAY_DIM]; /* fixed value or member index */
52 char name[MAX_NAME_LEN];
57 char children[MAX_CHILDREN][MAX_NAME_LEN];
59 member members[MAX_MEMBERS];
70 struct _xobject* ptarget;
71 char name[MAX_NAME_LEN];
78 xobject_member members[MAX_MEMBERS];
81 struct _xobject * children[MAX_CHILDREN];
82 struct _xobject * root;
85 typedef struct _xobject xobject;
88 IDirectXFile IDirectXFile_iface;
91 xtemplate xtemplates[MAX_TEMPLATES];
95 IDirectXFileBinary IDirectXFileBinary_iface;
97 } IDirectXFileBinaryImpl;
100 IDirectXFileData IDirectXFileData_iface;
107 } IDirectXFileDataImpl;
110 IDirectXFileDataReference IDirectXFileDataReference_iface;
113 } IDirectXFileDataReferenceImpl;
116 IDirectXFileObject IDirectXFileObject_iface;
118 } IDirectXFileObjectImpl;
121 /* Buffer to parse */
131 xobject** pxo_globals;
132 ULONG nb_pxo_globals;
134 IDirectXFileImpl* pdxf;
136 xtemplate* pxt[MAX_SUBOBJECTS];
144 IDirectXFileEnumObject IDirectXFileEnumObject_iface;
146 LPBYTE mapped_memory;
147 LPBYTE decomp_buffer;
149 IDirectXFileImpl* pDirectXFile;
151 xobject* xobjects[MAX_OBJECTS];
152 IDirectXFileData* pRefObjects[MAX_OBJECTS];
153 } IDirectXFileEnumObjectImpl;
156 IDirectXFileSaveObject IDirectXFileSaveObject_iface;
158 } IDirectXFileSaveObjectImpl;
160 HRESULT IDirectXFileImpl_Create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN;
162 HRESULT parse_header(parse_buffer *buf, BYTE **decomp_buffer_ptr) DECLSPEC_HIDDEN;
163 BOOL parse_object(parse_buffer * buf) DECLSPEC_HIDDEN;
164 BOOL parse_templates(parse_buffer * buf) DECLSPEC_HIDDEN;
166 int mszip_decompress(int inlen, int outlen, char* inbuffer, char* outbuffer) DECLSPEC_HIDDEN;
168 #endif /* __D3DXOF_PRIVATE_INCLUDED__ */