Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7a20c1dc
Commit
7a20c1dc
authored
Oct 16, 2008
by
Christian Costa
Committed by
Alexandre Julliard
Oct 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dxof: Move template dumping code in a separate function.
parent
e0325b09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
40 deletions
+43
-40
d3dxof.c
dlls/d3dxof/d3dxof.c
+43
-40
No files found.
dlls/d3dxof/d3dxof.c
View file @
7a20c1dc
...
...
@@ -92,6 +92,48 @@ static const struct IDirectXFileSaveObjectVtbl IDirectXFileSaveObject_Vtbl;
static
BOOL
parse_object_parts
(
parse_buffer
*
buf
,
BOOL
allow_optional
);
static
BOOL
parse_object
(
parse_buffer
*
buf
);
static
const
char
*
get_primitive_string
(
WORD
token
);
static
void
dump_template
(
xtemplate
*
templates_array
,
xtemplate
*
ptemplate
)
{
int
j
,
k
;
GUID
*
clsid
;
clsid
=
&
ptemplate
->
class_id
;
DPRINTF
(
"template %s
\n
"
,
ptemplate
->
name
);
DPRINTF
(
"{
\n
"
);
DPRINTF
(
CLSIDFMT
"
\n
"
,
clsid
->
Data1
,
clsid
->
Data2
,
clsid
->
Data3
,
clsid
->
Data4
[
0
],
clsid
->
Data4
[
1
],
clsid
->
Data4
[
2
],
clsid
->
Data4
[
3
],
clsid
->
Data4
[
4
],
clsid
->
Data4
[
5
],
clsid
->
Data4
[
6
],
clsid
->
Data4
[
7
]);
for
(
j
=
0
;
j
<
ptemplate
->
nb_members
;
j
++
)
{
if
(
ptemplate
->
members
[
j
].
nb_dims
)
DPRINTF
(
"array "
);
if
(
ptemplate
->
members
[
j
].
type
==
TOKEN_NAME
)
DPRINTF
(
"%s "
,
templates_array
[
ptemplate
->
members
[
j
].
idx_template
].
name
);
else
DPRINTF
(
"%s "
,
get_primitive_string
(
ptemplate
->
members
[
j
].
type
));
DPRINTF
(
"%s"
,
ptemplate
->
members
[
j
].
name
);
for
(
k
=
0
;
k
<
ptemplate
->
members
[
j
].
nb_dims
;
k
++
)
{
if
(
ptemplate
->
members
[
j
].
dim_fixed
[
k
])
DPRINTF
(
"[%d]"
,
ptemplate
->
members
[
j
].
dim_value
[
k
]);
else
DPRINTF
(
"[%s]"
,
ptemplate
->
members
[
ptemplate
->
members
[
j
].
dim_value
[
k
]].
name
);
}
DPRINTF
(
";
\n
"
);
}
if
(
ptemplate
->
open
)
DPRINTF
(
"[...]
\n
"
);
else
if
(
ptemplate
->
nb_childs
)
{
DPRINTF
(
"[%s"
,
ptemplate
->
childs
[
0
]);
for
(
j
=
1
;
j
<
ptemplate
->
nb_childs
;
j
++
)
DPRINTF
(
",%s"
,
ptemplate
->
childs
[
j
]);
DPRINTF
(
"]
\n
"
);
}
DPRINTF
(
"}
\n
"
);
}
HRESULT
IDirectXFileImpl_Create
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppObj
)
{
...
...
@@ -1081,46 +1123,7 @@ static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LP
{
TRACE
(
"Template successfully parsed:
\n
"
);
if
(
TRACE_ON
(
d3dxof
))
{
int
i
,
j
,
k
;
GUID
*
clsid
;
i
=
This
->
nb_xtemplates
-
1
;
clsid
=
&
This
->
xtemplates
[
i
].
class_id
;
DPRINTF
(
"template %s
\n
"
,
This
->
xtemplates
[
i
].
name
);
DPRINTF
(
"{
\n
"
);
DPRINTF
(
CLSIDFMT
"
\n
"
,
clsid
->
Data1
,
clsid
->
Data2
,
clsid
->
Data3
,
clsid
->
Data4
[
0
],
clsid
->
Data4
[
1
],
clsid
->
Data4
[
2
],
clsid
->
Data4
[
3
],
clsid
->
Data4
[
4
],
clsid
->
Data4
[
5
],
clsid
->
Data4
[
6
],
clsid
->
Data4
[
7
]);
for
(
j
=
0
;
j
<
This
->
xtemplates
[
i
].
nb_members
;
j
++
)
{
if
(
This
->
xtemplates
[
i
].
members
[
j
].
nb_dims
)
DPRINTF
(
"array "
);
if
(
This
->
xtemplates
[
i
].
members
[
j
].
type
==
TOKEN_NAME
)
DPRINTF
(
"%s "
,
This
->
xtemplates
[
This
->
xtemplates
[
i
].
members
[
j
].
idx_template
].
name
);
else
DPRINTF
(
"%s "
,
get_primitive_string
(
This
->
xtemplates
[
i
].
members
[
j
].
type
));
DPRINTF
(
"%s"
,
This
->
xtemplates
[
i
].
members
[
j
].
name
);
for
(
k
=
0
;
k
<
This
->
xtemplates
[
i
].
members
[
j
].
nb_dims
;
k
++
)
{
if
(
This
->
xtemplates
[
i
].
members
[
j
].
dim_fixed
[
k
])
DPRINTF
(
"[%d]"
,
This
->
xtemplates
[
i
].
members
[
j
].
dim_value
[
k
]);
else
DPRINTF
(
"[%s]"
,
This
->
xtemplates
[
i
].
members
[
This
->
xtemplates
[
i
].
members
[
j
].
dim_value
[
k
]].
name
);
}
DPRINTF
(
";
\n
"
);
}
if
(
This
->
xtemplates
[
i
].
open
)
DPRINTF
(
"[...]
\n
"
);
else
if
(
This
->
xtemplates
[
i
].
nb_childs
)
{
DPRINTF
(
"[%s"
,
This
->
xtemplates
[
i
].
childs
[
0
]);
for
(
j
=
1
;
j
<
This
->
xtemplates
[
i
].
nb_childs
;
j
++
)
DPRINTF
(
",%s"
,
This
->
xtemplates
[
i
].
childs
[
j
]);
DPRINTF
(
"]
\n
"
);
}
DPRINTF
(
"}
\n
"
);
}
dump_template
(
This
->
xtemplates
,
&
This
->
xtemplates
[
This
->
nb_xtemplates
-
1
]);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment