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
e798d001
Commit
e798d001
authored
Apr 18, 2011
by
Rico Schüller
Committed by
Alexandre Julliard
Apr 18, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Implement ID3DXBaseEffect::GetParameter().
parent
d64eb469
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
106 additions
and
1 deletion
+106
-1
effect.c
dlls/d3dx9_36/effect.c
+106
-1
No files found.
dlls/d3dx9_36/effect.c
View file @
e798d001
...
...
@@ -171,6 +171,90 @@ struct d3dx_technique *is_valid_technique(struct ID3DXBaseEffectImpl *base, D3DX
return
NULL
;
}
struct
d3dx_parameter
*
is_valid_sub_parameter
(
struct
d3dx_parameter
*
param
,
D3DXHANDLE
parameter
)
{
unsigned
int
i
,
count
;
struct
d3dx_parameter
*
p
;
for
(
i
=
0
;
i
<
param
->
annotation_count
;
++
i
)
{
if
(
param
->
annotation_handles
[
i
]
==
parameter
)
{
return
get_parameter_struct
(
parameter
);
}
p
=
is_valid_sub_parameter
(
get_parameter_struct
(
param
->
annotation_handles
[
i
]),
parameter
);
if
(
p
)
return
p
;
}
if
(
param
->
element_count
)
count
=
param
->
element_count
;
else
count
=
param
->
member_count
;
for
(
i
=
0
;
i
<
count
;
++
i
)
{
if
(
param
->
member_handles
[
i
]
==
parameter
)
{
return
get_parameter_struct
(
parameter
);
}
p
=
is_valid_sub_parameter
(
get_parameter_struct
(
param
->
member_handles
[
i
]),
parameter
);
if
(
p
)
return
p
;
}
return
NULL
;
}
struct
d3dx_parameter
*
is_valid_parameter
(
struct
ID3DXBaseEffectImpl
*
base
,
D3DXHANDLE
parameter
)
{
unsigned
int
i
,
k
,
m
;
struct
d3dx_parameter
*
p
;
for
(
i
=
0
;
i
<
base
->
parameter_count
;
++
i
)
{
if
(
base
->
parameter_handles
[
i
]
==
parameter
)
{
return
get_parameter_struct
(
parameter
);
}
p
=
is_valid_sub_parameter
(
get_parameter_struct
(
base
->
parameter_handles
[
i
]),
parameter
);
if
(
p
)
return
p
;
}
for
(
i
=
0
;
i
<
base
->
technique_count
;
++
i
)
{
struct
d3dx_technique
*
technique
=
get_technique_struct
(
base
->
technique_handles
[
i
]);
for
(
k
=
0
;
k
<
technique
->
pass_count
;
++
k
)
{
struct
d3dx_pass
*
pass
=
get_pass_struct
(
technique
->
pass_handles
[
k
]);
for
(
m
=
0
;
m
<
pass
->
annotation_count
;
++
m
)
{
if
(
pass
->
annotation_handles
[
i
]
==
parameter
)
{
return
get_parameter_struct
(
parameter
);
}
p
=
is_valid_sub_parameter
(
get_parameter_struct
(
pass
->
annotation_handles
[
m
]),
parameter
);
if
(
p
)
return
p
;
}
}
for
(
k
=
0
;
k
<
technique
->
annotation_count
;
++
k
)
{
if
(
technique
->
annotation_handles
[
k
]
==
parameter
)
{
return
get_parameter_struct
(
parameter
);
}
p
=
is_valid_sub_parameter
(
get_parameter_struct
(
technique
->
annotation_handles
[
k
]),
parameter
);
if
(
p
)
return
p
;
}
}
return
NULL
;
}
static
void
free_parameter
(
D3DXHANDLE
handle
,
BOOL
element
,
BOOL
child
)
{
unsigned
int
i
;
...
...
@@ -448,7 +532,28 @@ static D3DXHANDLE WINAPI ID3DXBaseEffectImpl_GetParameter(ID3DXBaseEffect *iface
{
struct
ID3DXBaseEffectImpl
*
This
=
impl_from_ID3DXBaseEffect
(
iface
);
FIXME
(
"iface %p, parameter %p, index %u stub
\n
"
,
This
,
parameter
,
index
);
TRACE
(
"iface %p, parameter %p, index %u
\n
"
,
This
,
parameter
,
index
);
if
(
!
parameter
)
{
if
(
index
<
This
->
parameter_count
)
{
TRACE
(
"Returning parameter %p
\n
"
,
This
->
parameter_handles
[
index
]);
return
This
->
parameter_handles
[
index
];
}
}
else
{
struct
d3dx_parameter
*
param
=
is_valid_parameter
(
This
,
parameter
);
if
(
param
&&
!
param
->
element_count
&&
index
<
param
->
member_count
)
{
TRACE
(
"Returning parameter %p
\n
"
,
param
->
member_handles
[
index
]);
return
param
->
member_handles
[
index
];
}
}
WARN
(
"Invalid argument specified.
\n
"
);
return
NULL
;
}
...
...
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