Commit 62a26e1a authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

d3dx9: Pass a struct d3dx_effect to add_param_to_tree().

parent f9351bae
......@@ -5072,7 +5072,7 @@ static int param_rb_compare(const void *key, const struct wine_rb_entry *entry)
return strcmp(name, param->full_name);
}
static void add_param_to_tree(struct d3dx9_base_effect *base, struct d3dx_parameter *param,
static void add_param_to_tree(struct d3dx_effect *effect, struct d3dx_parameter *param,
struct d3dx_parameter *parent, char separator, unsigned int element)
{
const char *parent_name = parent ? parent->full_name : NULL;
......@@ -5127,18 +5127,18 @@ static void add_param_to_tree(struct d3dx9_base_effect *base, struct d3dx_parame
memcpy(param->full_name, param->name, len);
}
TRACE("Full name is %s.\n", param->full_name);
wine_rb_put(&base->param_tree, param->full_name, &param->rb_entry);
wine_rb_put(&effect->base_effect.param_tree, param->full_name, &param->rb_entry);
if (is_top_level_parameter(param))
for (i = 0; i < param->top_level_param->annotation_count; ++i)
add_param_to_tree(base, &param->top_level_param->annotations[i], param, '@', 0);
add_param_to_tree(effect, &param->top_level_param->annotations[i], param, '@', 0);
if (param->element_count)
for (i = 0; i < param->element_count; ++i)
add_param_to_tree(base, &param->members[i], param, '[', i);
add_param_to_tree(effect, &param->members[i], param, '[', i);
else
for (i = 0; i < param->member_count; ++i)
add_param_to_tree(base, &param->members[i], param, '.', 0);
add_param_to_tree(effect, &param->members[i], param, '.', 0);
}
static HRESULT d3dx_parse_effect_typedef(struct d3dx_effect *effect, struct d3dx_parameter *param,
......@@ -6013,7 +6013,7 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U
}
walk_parameter_tree(&base->parameters[i].param, param_set_top_level_param,
&base->parameters[i]);
add_param_to_tree(base, &base->parameters[i].param, NULL, 0, 0);
add_param_to_tree(effect, &base->parameters[i].param, NULL, 0, 0);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment