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
e5a9dcf9
Commit
e5a9dcf9
authored
Aug 13, 2013
by
Rico Schüller
Committed by
Alexandre Julliard
Aug 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Introduce a helper function for the annotations.
parent
d8cd2805
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
45 deletions
+32
-45
effect.c
dlls/d3dx9_36/effect.c
+32
-45
No files found.
dlls/d3dx9_36/effect.c
View file @
e5a9dcf9
...
...
@@ -1381,36 +1381,44 @@ static D3DXHANDLE WINAPI ID3DXBaseEffectImpl_GetFunctionByName(ID3DXBaseEffect *
return
NULL
;
}
static
D3DXHANDLE
WINAPI
ID3DXBaseEffectImpl_GetAnnotation
(
ID3DXBaseEffect
*
iface
,
D3DXHANDLE
object
,
UINT
index
)
static
UINT
get_annotation_from_object
(
struct
ID3DXBaseEffectImpl
*
base
,
D3DXHANDLE
object
,
struct
d3dx_parameter
**
annotations
)
{
struct
ID3DXBaseEffectImpl
*
This
=
impl_from_ID3DXBaseEffect
(
iface
);
struct
d3dx_parameter
*
param
=
get_valid_parameter
(
This
,
object
);
struct
d3dx_pass
*
pass
=
get_valid_pass
(
This
,
object
);
struct
d3dx_technique
*
technique
=
get_valid_technique
(
This
,
object
);
UINT
annotation_count
=
0
;
struct
d3dx_parameter
*
annotations
=
NULL
;
TRACE
(
"iface %p, object %p, index %u
\n
"
,
This
,
object
,
index
);
struct
d3dx_parameter
*
param
=
get_valid_parameter
(
base
,
object
);
struct
d3dx_pass
*
pass
=
get_valid_pass
(
base
,
object
);
struct
d3dx_technique
*
technique
=
get_valid_technique
(
base
,
object
);
if
(
pass
)
{
annotation_count
=
pass
->
annotation_count
;
annotations
=
pass
->
annotations
;
*
annotations
=
pass
->
annotations
;
return
pass
->
annotation_count
;
}
else
if
(
technique
)
{
annotation_count
=
technique
->
annotation_count
;
annotations
=
technique
->
annotations
;
*
annotations
=
technique
->
annotations
;
return
technique
->
annotation_count
;
}
else
if
(
param
)
{
annotation_count
=
param
->
annotation_count
;
annotations
=
param
->
annotations
;
*
annotations
=
param
->
annotations
;
return
param
->
annotation_count
;
}
else
{
FIXME
(
"Functions are not handled, yet!
\n
"
);
return
0
;
}
}
static
D3DXHANDLE
WINAPI
ID3DXBaseEffectImpl_GetAnnotation
(
ID3DXBaseEffect
*
iface
,
D3DXHANDLE
object
,
UINT
index
)
{
struct
ID3DXBaseEffectImpl
*
base
=
impl_from_ID3DXBaseEffect
(
iface
);
struct
d3dx_parameter
*
annotations
=
NULL
;
UINT
annotation_count
=
0
;
TRACE
(
"iface %p, object %p, index %u
\n
"
,
iface
,
object
,
index
);
annotation_count
=
get_annotation_from_object
(
base
,
object
,
&
annotations
);
if
(
index
<
annotation_count
)
{
...
...
@@ -1425,15 +1433,12 @@ static D3DXHANDLE WINAPI ID3DXBaseEffectImpl_GetAnnotation(ID3DXBaseEffect *ifac
static
D3DXHANDLE
WINAPI
ID3DXBaseEffectImpl_GetAnnotationByName
(
ID3DXBaseEffect
*
iface
,
D3DXHANDLE
object
,
LPCSTR
name
)
{
struct
ID3DXBaseEffectImpl
*
This
=
impl_from_ID3DXBaseEffect
(
iface
);
struct
d3dx_parameter
*
param
=
get_valid_parameter
(
This
,
object
);
struct
d3dx_pass
*
pass
=
get_valid_pass
(
This
,
object
);
struct
d3dx_technique
*
technique
=
get_valid_technique
(
This
,
object
);
struct
d3dx_parameter
*
anno
=
NULL
;
UINT
annotation_count
=
0
;
struct
ID3DXBaseEffectImpl
*
base
=
impl_from_ID3DXBaseEffect
(
iface
);
struct
d3dx_parameter
*
annotation
=
NULL
;
struct
d3dx_parameter
*
annotations
=
NULL
;
UINT
annotation_count
=
0
;
TRACE
(
"iface %p, object %p, name %s
\n
"
,
This
,
object
,
debugstr_a
(
name
));
TRACE
(
"iface %p, object %p, name %s
\n
"
,
iface
,
object
,
debugstr_a
(
name
));
if
(
!
name
)
{
...
...
@@ -1441,31 +1446,13 @@ static D3DXHANDLE WINAPI ID3DXBaseEffectImpl_GetAnnotationByName(ID3DXBaseEffect
return
NULL
;
}
if
(
pass
)
{
annotation_count
=
pass
->
annotation_count
;
annotations
=
pass
->
annotations
;
}
else
if
(
technique
)
{
annotation_count
=
technique
->
annotation_count
;
annotations
=
technique
->
annotations
;
}
else
if
(
param
)
{
annotation_count
=
param
->
annotation_count
;
annotations
=
param
->
annotations
;
}
else
{
FIXME
(
"Functions are not handled, yet!
\n
"
);
}
annotation_count
=
get_annotation_from_object
(
base
,
object
,
&
annotations
);
anno
=
get_annotation_by_name
(
annotation_count
,
annotations
,
name
);
if
(
anno
)
anno
tation
=
get_annotation_by_name
(
annotation_count
,
annotations
,
name
);
if
(
anno
tation
)
{
TRACE
(
"Returning parameter %p
\n
"
,
anno
);
return
get_parameter_handle
(
anno
);
TRACE
(
"Returning parameter %p
\n
"
,
anno
tation
);
return
get_parameter_handle
(
anno
tation
);
}
WARN
(
"Invalid argument specified
\n
"
);
...
...
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