Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
8bbf1344
Commit
8bbf1344
authored
Feb 13, 2012
by
Christian Costa
Committed by
Alexandre Julliard
Feb 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dxof: Enable dumping of input x files and templates.
parent
9d06d41e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
d3dxof.c
dlls/d3dxof/d3dxof.c
+31
-0
No files found.
dlls/d3dxof/d3dxof.c
View file @
8bbf1344
...
...
@@ -32,6 +32,7 @@
#include <stdio.h>
WINE_DEFAULT_DEBUG_CHANNEL
(
d3dxof
);
WINE_DECLARE_DEBUG_CHANNEL
(
d3dxof_dump
);
static
const
struct
IDirectXFileVtbl
IDirectXFile_Vtbl
;
static
const
struct
IDirectXFileBinaryVtbl
IDirectXFileBinary_Vtbl
;
...
...
@@ -215,6 +216,21 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV
TRACE
(
"File size is %d bytes
\n
"
,
file_size
);
if
(
TRACE_ON
(
d3dxof_dump
))
{
static
USHORT
num
;
char
tmp
[
12
];
HANDLE
file
;
sprintf
(
tmp
,
"file%05u.x"
,
num
++
);
file
=
CreateFileA
(
tmp
,
GENERIC_WRITE
,
FILE_SHARE_READ
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
if
(
file
!=
INVALID_HANDLE_VALUE
)
{
WriteFile
(
file
,
file_buffer
,
file_size
,
NULL
,
NULL
);
CloseHandle
(
file
);
}
}
object
->
pDirectXFile
=
This
;
object
->
buf
.
pdxf
=
This
;
...
...
@@ -284,6 +300,21 @@ static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LP
if
(
!
pvData
)
return
DXFILEERR_BADVALUE
;
if
(
TRACE_ON
(
d3dxof_dump
))
{
static
USHORT
num
;
char
tmp
[
16
];
HANDLE
file
;
sprintf
(
tmp
,
"template%05u.x"
,
num
++
);
file
=
CreateFileA
(
tmp
,
GENERIC_WRITE
,
FILE_SHARE_READ
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
if
(
file
!=
INVALID_HANDLE_VALUE
)
{
WriteFile
(
file
,
pvData
,
cbSize
,
NULL
,
NULL
);
CloseHandle
(
file
);
}
}
hr
=
parse_header
(
&
buf
,
&
decomp_buffer
);
if
(
FAILED
(
hr
))
goto
cleanup
;
...
...
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