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
8002b790
Commit
8002b790
authored
Sep 22, 2008
by
Christian Costa
Committed by
Alexandre Julliard
Sep 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dxof: Implement IDirectXFileDataImpl_GetNextObject.
parent
e8754b8e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
15 deletions
+33
-15
d3dxof.c
dlls/d3dxof/d3dxof.c
+32
-15
d3dxof_private.h
dlls/d3dxof/d3dxof_private.h
+1
-0
No files found.
dlls/d3dxof/d3dxof.c
View file @
8002b790
...
...
@@ -161,7 +161,7 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV
DWORD
size
;
HANDLE
hFile
=
INVALID_HANDLE_VALUE
;
FIXME
(
"(%p/%p)->(%p,%x,%p) partial stub!
\n
"
,
This
,
iface
,
pvSource
,
dwLoadOptions
,
ppEnumObj
);
TRACE
(
"(%p/%p)->(%p,%x,%p)
\n
"
,
This
,
iface
,
pvSource
,
dwLoadOptions
,
ppEnumObj
);
if
(
!
ppEnumObj
)
return
DXFILEERR_BADVALUE
;
...
...
@@ -1393,14 +1393,25 @@ static HRESULT WINAPI IDirectXFileDataImpl_GetType(IDirectXFileData* iface, cons
static
HRESULT
WINAPI
IDirectXFileDataImpl_GetNextObject
(
IDirectXFileData
*
iface
,
LPDIRECTXFILEOBJECT
*
ppChildObj
)
{
HRESULT
hr
;
IDirectXFileDataImpl
*
This
=
(
IDirectXFileDataImpl
*
)
iface
;
IDirectXFileDataImpl
*
object
;
FIXME
(
"(%p/%p)->(%p) stub!
\n
"
,
This
,
iface
,
ppChildObj
);
TRACE
(
"(%p/%p)->(%p)
\n
"
,
This
,
iface
,
ppChildObj
);
if
(
This
->
cur_enum_object
>=
This
->
pobj
->
nb_childs
)
return
DXFILEERR_NOMOREOBJECTS
;
return
DXFILEERR_BADVALUE
;
hr
=
IDirectXFileDataImpl_Create
(
&
object
);
if
(
hr
!=
S_OK
)
return
DXFILEERR_BADVALUE
;
object
->
pobj
=
This
->
pobj
->
childs
[
This
->
cur_enum_object
++
];
object
->
cur_enum_object
=
0
;
*
ppChildObj
=
(
LPDIRECTXFILEOBJECT
)
object
;
return
DXFILE_OK
;
}
static
HRESULT
WINAPI
IDirectXFileDataImpl_AddDataObject
(
IDirectXFileData
*
iface
,
LPDIRECTXFILEDATA
pDataObj
)
...
...
@@ -1751,6 +1762,8 @@ static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional)
if
(
allow_optional
)
{
buf
->
pxo
->
size
=
buf
->
cur_pdata
-
buf
->
pxo
->
pdata
;
/* Skip trailing semicolon */
while
(
check_TOKEN
(
buf
)
==
TOKEN_SEMICOLON
)
get_TOKEN
(
buf
);
...
...
@@ -1767,6 +1780,9 @@ static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional)
}
else
if
(
check_TOKEN
(
buf
)
==
TOKEN_NAME
)
{
xobject
*
pxo
=
buf
->
pxo
;
buf
->
pxo
=
buf
->
pxo
->
childs
[
buf
->
pxo
->
nb_childs
]
=
&
buf
->
pxo_tab
[
buf
->
cur_subobject
++
];
TRACE
(
"Enter optional %s
\n
"
,
(
char
*
)
buf
->
value
);
buf
->
level
++
;
if
(
!
parse_object
(
buf
))
...
...
@@ -1775,6 +1791,8 @@ static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional)
return
FALSE
;
}
buf
->
level
--
;
buf
->
pxo
=
pxo
;
buf
->
pxo
->
nb_childs
++
;
}
else
break
;
...
...
@@ -1788,6 +1806,8 @@ static BOOL parse_object(parse_buffer * buf)
{
int
i
;
buf
->
pxo
->
pdata
=
buf
->
cur_pdata
;
if
(
get_TOKEN
(
buf
)
!=
TOKEN_NAME
)
return
FALSE
;
...
...
@@ -1849,10 +1869,9 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
IDirectXFileEnumObjectImpl
*
This
=
(
IDirectXFileEnumObjectImpl
*
)
iface
;
IDirectXFileDataImpl
*
object
;
HRESULT
hr
;
LPBYTE
pdata
;
FIXME
(
"(%p/%p)->(%p) stub!
\n
"
,
This
,
iface
,
ppDataObj
);
/*printf("%d\n", This->buf.rem_bytes);*/
TRACE
(
"(%p/%p)->(%p)
\n
"
,
This
,
iface
,
ppDataObj
);
if
(
!
This
->
buf
.
rem_bytes
)
return
DXFILEERR_NOMOREOBJECTS
;
...
...
@@ -1861,20 +1880,19 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
if
(
!
SUCCEEDED
(
hr
))
return
hr
;
This
->
buf
.
pxo
=
&
This
->
xobjects
[
This
->
nb_xobjects
][
This
->
buf
.
cur_subobject
];
TRACE
(
"Start %d %d
\n
"
,
This
->
nb_xobjects
,
This
->
buf
.
cur_subobject
);
This
->
buf
.
pxo_tab
=
&
This
->
xobjects
[
This
->
nb_xobjects
][
0
];
This
->
buf
.
cur_subobject
=
0
;
This
->
buf
.
pxo
=
&
This
->
buf
.
pxo_tab
[
This
->
buf
.
cur_subobject
++
];
This
->
buf
.
pxo
->
pdata
=
HeapAlloc
(
GetProcessHeap
(),
0
,
MAX_DATA_SIZE
);
if
(
!
This
->
buf
.
pxo
->
pdata
)
pdata
=
HeapAlloc
(
GetProcessHeap
(),
0
,
MAX_DATA_SIZE
);
if
(
!
pdata
)
{
WARN
(
"Out of memory
\n
"
);
return
DXFILEERR_BADALLOC
;
}
This
->
buf
.
cur_pdata
=
This
->
buf
.
pxo
->
pdata
;
This
->
buf
.
cur_pdata
=
pdata
;
This
->
buf
.
level
=
0
;
This
->
buf
.
pxo
->
pdata
=
This
->
buf
.
cur_pdata
;
if
(
!
parse_object
(
&
This
->
buf
))
{
TRACE
(
"Object is not correct
\n
"
);
...
...
@@ -1882,9 +1900,8 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
return
DXFILEERR_PARSEERROR
;
}
This
->
buf
.
pxo
->
size
=
This
->
buf
.
cur_pdata
-
This
->
buf
.
pxo
->
pdata
;
object
->
pobj
=
This
->
buf
.
pxo
;
object
->
cur_enum_object
=
0
;
*
ppDataObj
=
(
LPDIRECTXFILEDATA
)
object
;
...
...
dlls/d3dxof/d3dxof_private.h
View file @
8002b790
...
...
@@ -120,6 +120,7 @@ typedef struct {
ULONG
cur_subobject
;
LPBYTE
cur_pdata
;
BYTE
value
[
100
];
xobject
*
pxo_tab
;
IDirectXFileImpl
*
pdxf
;
xobject
*
pxo
;
xtemplate
*
pxt
[
MAX_SUBOBJECTS
];
...
...
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