mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[WINESYNC] d3dx9: Move object_count out of struct d3dx9_base_effect.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 54bdc66acf4abe1f1fa38238ed824c2372e1ff91 by Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
parent
8237867116
commit
44ec74a6a4
2 changed files with 7 additions and 7 deletions
|
@ -157,7 +157,6 @@ struct d3dx9_base_effect
|
||||||
struct d3dx_effect *effect;
|
struct d3dx_effect *effect;
|
||||||
|
|
||||||
UINT technique_count;
|
UINT technique_count;
|
||||||
UINT object_count;
|
|
||||||
|
|
||||||
struct d3dx_top_level_parameter *parameters;
|
struct d3dx_top_level_parameter *parameters;
|
||||||
struct d3dx_technique *techniques;
|
struct d3dx_technique *techniques;
|
||||||
|
@ -180,6 +179,7 @@ struct d3dx_effect
|
||||||
|
|
||||||
struct d3dx9_base_effect base_effect;
|
struct d3dx9_base_effect base_effect;
|
||||||
unsigned int parameter_count;
|
unsigned int parameter_count;
|
||||||
|
unsigned int object_count;
|
||||||
|
|
||||||
struct ID3DXEffectStateManager *manager;
|
struct ID3DXEffectStateManager *manager;
|
||||||
struct IDirect3DDevice9 *device;
|
struct IDirect3DDevice9 *device;
|
||||||
|
@ -711,7 +711,7 @@ static void d3dx9_base_effect_cleanup(struct d3dx9_base_effect *base)
|
||||||
|
|
||||||
if (base->objects)
|
if (base->objects)
|
||||||
{
|
{
|
||||||
for (i = 0; i < base->object_count; ++i)
|
for (i = 0; i < base->effect->object_count; ++i)
|
||||||
{
|
{
|
||||||
free_object(&base->objects[i]);
|
free_object(&base->objects[i]);
|
||||||
}
|
}
|
||||||
|
@ -6274,10 +6274,10 @@ static HRESULT d3dx_parse_effect(struct d3dx_effect *effect, const char *data, U
|
||||||
|
|
||||||
skip_dword_unknown(&ptr, 1);
|
skip_dword_unknown(&ptr, 1);
|
||||||
|
|
||||||
read_dword(&ptr, &base->object_count);
|
read_dword(&ptr, &effect->object_count);
|
||||||
TRACE("Object count: %u.\n", base->object_count);
|
TRACE("Object count: %u.\n", effect->object_count);
|
||||||
|
|
||||||
base->objects = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*base->objects) * base->object_count);
|
base->objects = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*base->objects) * effect->object_count);
|
||||||
if (!base->objects)
|
if (!base->objects)
|
||||||
{
|
{
|
||||||
ERR("Out of memory.\n");
|
ERR("Out of memory.\n");
|
||||||
|
@ -6403,7 +6403,7 @@ err_out:
|
||||||
|
|
||||||
if (base->objects)
|
if (base->objects)
|
||||||
{
|
{
|
||||||
for (i = 0; i < base->object_count; ++i)
|
for (i = 0; i < effect->object_count; ++i)
|
||||||
{
|
{
|
||||||
free_object(&base->objects[i]);
|
free_object(&base->objects[i]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc
|
||||||
include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h,
|
include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h,
|
||||||
include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h,
|
include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h,
|
||||||
include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h}
|
include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h}
|
||||||
tags: {wine: 42839d15e3ec829f939fe1f99ac6b025f64b18de}
|
tags: {wine: 54bdc66acf4abe1f1fa38238ed824c2372e1ff91}
|
||||||
|
|
Loading…
Reference in a new issue