"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dlls/d3dx9_36/mesh.c" between
wine-5.12.tar.xz and wine-5.13.tar.xz

About: Wine is an Open Source implementation of the MS Windows API on top of X, OpenGL, and Unix. Think of Wine as a compatibility layer for running Windows programs. Development release.

mesh.c  (wine-5.12.tar.xz):mesh.c  (wine-5.13.tar.xz)
skipping to change at line 2409 skipping to change at line 2409
if (pu) *pu = vec.x; if (pu) *pu = vec.x;
if (pv) *pv = vec.y; if (pv) *pv = vec.y;
if (pdist) *pdist = fabsf( vec.z ); if (pdist) *pdist = fabsf( vec.z );
return TRUE; return TRUE;
} }
} }
return FALSE; return FALSE;
} }
BOOL WINAPI D3DXSphereBoundProbe(const D3DXVECTOR3 *pcenter, float radius, BOOL WINAPI D3DXSphereBoundProbe(const D3DXVECTOR3 *center, float radius,
const D3DXVECTOR3 *prayposition, const D3DXVECTOR3 *praydirection) const D3DXVECTOR3 *ray_position, const D3DXVECTOR3 *ray_direction)
{ {
D3DXVECTOR3 difference; D3DXVECTOR3 difference = {0};
FLOAT a, b, c, d; float a, b, c, d;
a = D3DXVec3LengthSq(praydirection); D3DXVec3Subtract(&difference, ray_position, center);
if (!D3DXVec3Subtract(&difference, prayposition, pcenter)) return FALSE;
b = D3DXVec3Dot(&difference, praydirection);
c = D3DXVec3LengthSq(&difference) - radius * radius; c = D3DXVec3LengthSq(&difference) - radius * radius;
if (c < 0.0f)
return TRUE;
a = D3DXVec3LengthSq(ray_direction);
b = D3DXVec3Dot(&difference, ray_direction);
d = b * b - a * c; d = b * b - a * c;
if ( ( d <= 0.0f ) || ( sqrt(d) <= b ) ) return FALSE; return d >= 0.0f && (b <= 0.0f || d > b * b);
return TRUE;
} }
/************************************************************************* /*************************************************************************
* D3DXCreateMesh * D3DXCreateMesh
*/ */
HRESULT WINAPI D3DXCreateMesh(DWORD numfaces, DWORD numvertices, DWORD options, HRESULT WINAPI D3DXCreateMesh(DWORD numfaces, DWORD numvertices, DWORD options,
const D3DVERTEXELEMENT9 *declaration, struct IDirect3DDevice9 *device, s truct ID3DXMesh **mesh) const D3DVERTEXELEMENT9 *declaration, struct IDirect3DDevice9 *device, s truct ID3DXMesh **mesh)
{ {
HRESULT hr; HRESULT hr;
DWORD fvf; DWORD fvf;
 End of changes. 5 change blocks. 
9 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)