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
35cc5504
Commit
35cc5504
authored
Nov 09, 2008
by
Christian Costa
Committed by
Alexandre Julliard
Nov 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dxof: Allow template definitions in objects file.
parent
e0b91a7a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
d3dxof.c
dlls/d3dxof/d3dxof.c
+26
-0
No files found.
dlls/d3dxof/d3dxof.c
View file @
35cc5504
...
...
@@ -93,6 +93,8 @@ 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
WORD
check_TOKEN
(
parse_buffer
*
buf
);
static
BOOL
parse_template
(
parse_buffer
*
buf
);
static
void
dump_template
(
xtemplate
*
templates_array
,
xtemplate
*
ptemplate
)
{
...
...
@@ -318,6 +320,30 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV
*
ppEnumObj
=
(
LPDIRECTXFILEENUMOBJECT
)
object
;
while
(
object
->
buf
.
rem_bytes
&&
(
check_TOKEN
(
&
object
->
buf
)
==
TOKEN_TEMPLATE
))
{
if
(
!
parse_template
(
&
object
->
buf
))
{
TRACE
(
"Template is not correct
\n
"
);
hr
=
DXFILEERR_BADVALUE
;
goto
error
;
}
else
{
TRACE
(
"Template successfully parsed:
\n
"
);
if
(
TRACE_ON
(
d3dxof
))
dump_template
(
This
->
xtemplates
,
&
This
->
xtemplates
[
This
->
nb_xtemplates
-
1
]);
}
}
if
(
TRACE_ON
(
d3dxof
))
{
int
i
;
TRACE
(
"Registered templates (%d):
\n
"
,
This
->
nb_xtemplates
);
for
(
i
=
0
;
i
<
This
->
nb_xtemplates
;
i
++
)
DPRINTF
(
"%s - %s
\n
"
,
This
->
xtemplates
[
i
].
name
,
debugstr_guid
(
&
This
->
xtemplates
[
i
].
class_id
));
}
return
DXFILE_OK
;
error:
...
...
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