d3dx9: Build with nameless unions.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6cf61d4239
commit
514bac00cc
|
@ -23,7 +23,6 @@
|
|||
#define __WINE_D3DX9_PRIVATE_H
|
||||
|
||||
#include <stdint.h>
|
||||
#define NONAMELESSUNION
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
#include "wine/rbtree.h"
|
||||
|
|
|
@ -826,7 +826,7 @@ static void get_matrix(struct d3dx_parameter *param, D3DXMATRIX *matrix, BOOL tr
|
|||
{
|
||||
for (k = 0; k < 4; ++k)
|
||||
{
|
||||
FLOAT *tmp = transpose ? (FLOAT *)&matrix->u.m[k][i] : (FLOAT *)&matrix->u.m[i][k];
|
||||
FLOAT *tmp = transpose ? (FLOAT *)&matrix->m[k][i] : (FLOAT *)&matrix->m[i][k];
|
||||
|
||||
if ((i < param->rows) && (k < param->columns))
|
||||
set_number(tmp, D3DXPT_FLOAT, (DWORD *)param->data + i * param->columns + k, param->type);
|
||||
|
@ -844,12 +844,12 @@ static void set_matrix(struct d3dx_parameter *param, const D3DXMATRIX *matrix, v
|
|||
{
|
||||
if (param->columns == 4)
|
||||
{
|
||||
memcpy(dst_data, matrix->u.m, param->rows * 4 * sizeof(float));
|
||||
memcpy(dst_data, matrix->m, param->rows * 4 * sizeof(float));
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 0; i < param->rows; ++i)
|
||||
memcpy((float *)dst_data + i * param->columns, matrix->u.m + i, param->columns * sizeof(float));
|
||||
memcpy((float *)dst_data + i * param->columns, matrix->m + i, param->columns * sizeof(float));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -858,7 +858,7 @@ static void set_matrix(struct d3dx_parameter *param, const D3DXMATRIX *matrix, v
|
|||
{
|
||||
for (k = 0; k < param->columns; ++k)
|
||||
set_number((FLOAT *)dst_data + i * param->columns + k, param->type,
|
||||
&matrix->u.m[i][k], D3DXPT_FLOAT);
|
||||
&matrix->m[i][k], D3DXPT_FLOAT);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -871,7 +871,7 @@ static void set_matrix_transpose(struct d3dx_parameter *param, const D3DXMATRIX
|
|||
for (k = 0; k < param->columns; ++k)
|
||||
{
|
||||
set_number((FLOAT *)dst_data + i * param->columns + k, param->type,
|
||||
&matrix->u.m[k][i], D3DXPT_FLOAT);
|
||||
&matrix->m[k][i], D3DXPT_FLOAT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2368,22 +2368,22 @@ BOOL WINAPI D3DXIntersectTri(const D3DXVECTOR3 *p0, const D3DXVECTOR3 *p1, const
|
|||
TRACE("p0 %p, p1 %p, p2 %p, praypos %p, praydir %p, pu %p, pv %p, pdist %p.\n",
|
||||
p0, p1, p2, praypos, praydir, pu, pv, pdist);
|
||||
|
||||
m.u.m[0][0] = p1->x - p0->x;
|
||||
m.u.m[1][0] = p2->x - p0->x;
|
||||
m.u.m[2][0] = -praydir->x;
|
||||
m.u.m[3][0] = 0.0f;
|
||||
m.u.m[0][1] = p1->y - p0->y;
|
||||
m.u.m[1][1] = p2->y - p0->y;
|
||||
m.u.m[2][1] = -praydir->y;
|
||||
m.u.m[3][1] = 0.0f;
|
||||
m.u.m[0][2] = p1->z - p0->z;
|
||||
m.u.m[1][2] = p2->z - p0->z;
|
||||
m.u.m[2][2] = -praydir->z;
|
||||
m.u.m[3][2] = 0.0f;
|
||||
m.u.m[0][3] = 0.0f;
|
||||
m.u.m[1][3] = 0.0f;
|
||||
m.u.m[2][3] = 0.0f;
|
||||
m.u.m[3][3] = 1.0f;
|
||||
m.m[0][0] = p1->x - p0->x;
|
||||
m.m[1][0] = p2->x - p0->x;
|
||||
m.m[2][0] = -praydir->x;
|
||||
m.m[3][0] = 0.0f;
|
||||
m.m[0][1] = p1->y - p0->y;
|
||||
m.m[1][1] = p2->y - p0->y;
|
||||
m.m[2][1] = -praydir->y;
|
||||
m.m[3][1] = 0.0f;
|
||||
m.m[0][2] = p1->z - p0->z;
|
||||
m.m[1][2] = p2->z - p0->z;
|
||||
m.m[2][2] = -praydir->z;
|
||||
m.m[3][2] = 0.0f;
|
||||
m.m[0][3] = 0.0f;
|
||||
m.m[1][3] = 0.0f;
|
||||
m.m[2][3] = 0.0f;
|
||||
m.m[3][3] = 1.0f;
|
||||
|
||||
vec.x = praypos->x - p0->x;
|
||||
vec.y = praypos->y - p0->y;
|
||||
|
@ -3772,11 +3772,11 @@ static HRESULT load_mesh_container(struct ID3DXFileData *filedata, DWORD options
|
|||
char *name = NULL;
|
||||
|
||||
mesh_data.Type = D3DXMESHTYPE_MESH;
|
||||
mesh_data.u.pMesh = NULL;
|
||||
mesh_data.pMesh = NULL;
|
||||
|
||||
hr = D3DXLoadSkinMeshFromXof(filedata, options, device,
|
||||
&adjacency, &materials, &effects, &num_materials,
|
||||
&skin_info, &mesh_data.u.pMesh);
|
||||
&skin_info, &mesh_data.pMesh);
|
||||
if (FAILED(hr)) return hr;
|
||||
|
||||
hr = filedata_get_name(filedata, &name);
|
||||
|
@ -3794,7 +3794,7 @@ cleanup:
|
|||
if (effects) ID3DXBuffer_Release(effects);
|
||||
if (adjacency) ID3DXBuffer_Release(adjacency);
|
||||
if (skin_info) IUnknown_Release(skin_info);
|
||||
if (mesh_data.u.pMesh) IUnknown_Release(mesh_data.u.pMesh);
|
||||
if (mesh_data.pMesh) IUnknown_Release(mesh_data.pMesh);
|
||||
HeapFree(GetProcessHeap(), 0, name);
|
||||
return hr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue