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
26640c8e
Commit
26640c8e
authored
Jan 07, 2013
by
Christian Costa
Committed by
Alexandre Julliard
Jan 07, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm: Avoid LP stuff and rename some variables.
parent
8e0d3abd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
30 deletions
+30
-30
meshbuilder.c
dlls/d3drm/meshbuilder.c
+30
-30
No files found.
dlls/d3drm/meshbuilder.c
View file @
26640c8e
...
...
@@ -1554,18 +1554,18 @@ end:
/*** IDirect3DRMMeshBuilder3 methods ***/
static
HRESULT
WINAPI
IDirect3DRMMeshBuilder3Impl_Load
(
IDirect3DRMMeshBuilder3
*
iface
,
LPVOID
filename
,
LPVOID
name
,
void
*
filename
,
void
*
name
,
D3DRMLOADOPTIONS
loadflags
,
D3DRMLOADTEXTURE3CALLBACK
cb
,
LPVOID
arg
)
D3DRMLOADTEXTURE3CALLBACK
cb
,
void
*
arg
)
{
IDirect3DRMMeshBuilderImpl
*
This
=
impl_from_IDirect3DRMMeshBuilder3
(
iface
);
DXFILELOADOPTIONS
load_options
;
LPDIRECTXFILE
pDXF
ile
=
NULL
;
LPDIRECTXFILEENUMOBJECT
pEnumO
bject
=
NULL
;
LPDIRECTXFILEDATA
pD
ata
=
NULL
;
const
GUID
*
pG
uid
;
IDirectXFile
*
dxf
ile
=
NULL
;
IDirectXFileEnumObject
*
enum_o
bject
=
NULL
;
IDirectXFileData
*
d
ata
=
NULL
;
const
GUID
*
g
uid
;
DWORD
size
;
Header
*
pH
eader
;
Header
*
h
eader
;
HRESULT
hr
;
HRESULT
ret
=
D3DRMERR_BADOBJECT
;
...
...
@@ -1588,82 +1588,82 @@ static HRESULT WINAPI IDirect3DRMMeshBuilder3Impl_Load(IDirect3DRMMeshBuilder3*
return
E_NOTIMPL
;
}
hr
=
DirectXFileCreate
(
&
pDXF
ile
);
hr
=
DirectXFileCreate
(
&
dxf
ile
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
hr
=
IDirectXFile_RegisterTemplates
(
pDXF
ile
,
templates
,
strlen
(
templates
));
hr
=
IDirectXFile_RegisterTemplates
(
dxf
ile
,
templates
,
strlen
(
templates
));
if
(
hr
!=
DXFILE_OK
)
goto
end
;
hr
=
IDirectXFile_CreateEnumObject
(
pDXFile
,
filename
,
load_options
,
&
pEnumO
bject
);
hr
=
IDirectXFile_CreateEnumObject
(
dxfile
,
filename
,
load_options
,
&
enum_o
bject
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
hr
=
IDirectXFileEnumObject_GetNextDataObject
(
pEnumObject
,
&
pD
ata
);
hr
=
IDirectXFileEnumObject_GetNextDataObject
(
enum_object
,
&
d
ata
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
hr
=
IDirectXFileData_GetType
(
pData
,
&
pG
uid
);
hr
=
IDirectXFileData_GetType
(
data
,
&
g
uid
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
TRACE
(
"Found object type whose GUID = %s
\n
"
,
debugstr_guid
(
pG
uid
));
TRACE
(
"Found object type whose GUID = %s
\n
"
,
debugstr_guid
(
g
uid
));
if
(
!
IsEqualGUID
(
pG
uid
,
&
TID_DXFILEHeader
))
if
(
!
IsEqualGUID
(
g
uid
,
&
TID_DXFILEHeader
))
{
ret
=
D3DRMERR_BADFILE
;
goto
end
;
}
hr
=
IDirectXFileData_GetData
(
pData
,
NULL
,
&
size
,
(
void
**
)
&
pH
eader
);
hr
=
IDirectXFileData_GetData
(
data
,
NULL
,
&
size
,
(
void
**
)
&
h
eader
);
if
((
hr
!=
DXFILE_OK
)
||
(
size
!=
sizeof
(
Header
)))
goto
end
;
TRACE
(
"Version is %d %d %d
\n
"
,
pHeader
->
major
,
pHeader
->
minor
,
pH
eader
->
flags
);
TRACE
(
"Version is %d %d %d
\n
"
,
header
->
major
,
header
->
minor
,
h
eader
->
flags
);
/* Version must be 1.0.x */
if
((
pHeader
->
major
!=
1
)
||
(
pH
eader
->
minor
!=
0
))
if
((
header
->
major
!=
1
)
||
(
h
eader
->
minor
!=
0
))
{
ret
=
D3DRMERR_BADFILE
;
goto
end
;
}
IDirectXFileData_Release
(
pD
ata
);
pD
ata
=
NULL
;
IDirectXFileData_Release
(
d
ata
);
d
ata
=
NULL
;
hr
=
IDirectXFileEnumObject_GetNextDataObject
(
pEnumObject
,
&
pD
ata
);
hr
=
IDirectXFileEnumObject_GetNextDataObject
(
enum_object
,
&
d
ata
);
if
(
hr
!=
DXFILE_OK
)
{
ret
=
D3DRMERR_NOTFOUND
;
goto
end
;
}
hr
=
IDirectXFileData_GetType
(
pData
,
&
pG
uid
);
hr
=
IDirectXFileData_GetType
(
data
,
&
g
uid
);
if
(
hr
!=
DXFILE_OK
)
goto
end
;
TRACE
(
"Found object type whose GUID = %s
\n
"
,
debugstr_guid
(
pG
uid
));
TRACE
(
"Found object type whose GUID = %s
\n
"
,
debugstr_guid
(
g
uid
));
if
(
!
IsEqualGUID
(
pG
uid
,
&
TID_D3DRMMesh
))
if
(
!
IsEqualGUID
(
g
uid
,
&
TID_D3DRMMesh
))
{
ret
=
D3DRMERR_NOTFOUND
;
goto
end
;
}
/* We don't care about the texture interface version since we rely on QueryInterface */
hr
=
load_mesh_data
(
iface
,
pD
ata
,
(
D3DRMLOADTEXTURECALLBACK
)
cb
,
arg
);
hr
=
load_mesh_data
(
iface
,
d
ata
,
(
D3DRMLOADTEXTURECALLBACK
)
cb
,
arg
);
if
(
hr
==
S_OK
)
ret
=
D3DRM_OK
;
end:
if
(
pD
ata
)
IDirectXFileData_Release
(
pD
ata
);
if
(
pEnumO
bject
)
IDirectXFileEnumObject_Release
(
pEnumO
bject
);
if
(
pDXF
ile
)
IDirectXFile_Release
(
pDXF
ile
);
if
(
d
ata
)
IDirectXFileData_Release
(
d
ata
);
if
(
enum_o
bject
)
IDirectXFileEnumObject_Release
(
enum_o
bject
);
if
(
dxf
ile
)
IDirectXFile_Release
(
dxf
ile
);
if
(
ret
!=
D3DRM_OK
)
clean_mesh_builder_data
(
This
);
...
...
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